{ "info": { "author": "(the author)", "author_email": "mdilligaf@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Package versions\n-------------------------------\n\nImplements version numbers, e.g. for use in your custom package/module/extension/addon system.\n\nVersion ranges are stored as VersionRange and can be created using syntax similar to pip:\n\n.. code-block:: python\n\n VersionRange('==3')\n # >=3.0,<4.0\n VersionRange('<=2.5,>1')\n # >=2.0,<=2.5\n VersionRange('==2.*')\n # >=2.0,<3.0\n\nThe main functionality is the combination of version ranges as best as possible, which is needed in case two packages rely on the same third package, but with different version limitations:\n\n.. code-block:: python\n\n VersionRange('<=2.5,>1') & VersionRange('==2.*')\n #>=2.0,<=2.5\n VersionRange('<4.4') & VersionRange('>0,<=7')\n #>=1.0,<4.4\n VersionRange('<4.4') & VersionRange('>5.3')\n #==5.3 and an optional warning or error (due to the mismatch in range)\n\nIt can also choose the most appropriate version among a list of options:\n\n.. code-block:: python\n\n options = ['0.0.0', '2.8.', '2.1.unordered', '1.0.dev1', '2.2.words', '2.9.9', '999.999.0']\n VersionRange('>=2.2,<2.9').choose(options)\n # 2.8\n VersionRange('>2.2,<2.8').choose(options)\n # 2.8. and an optional warning or error (due to no match in range)\n VersionRange('>2.2').choose(options)\n # 999.999.0\n\nAnd parse package dependencies:\n\n.. code-block:: python\n\n parse_dependency('package>=3')\n # ('package', VersionRange(>=3.0))\n parse_dependency('specialname123>2.0,<3')\n # ('specialname123', VersionRange(>=2.1,<3.0))\n parse_dependencies('packA>1.3,<6\\n#packskip==*\\n\\npackB<3.4#,>1.2')\n # OrderedDict([('packa', VersionRange(>=1.4,<6.0)), ('packb', VersionRange(<=3.3))])\n\nFor a lot more examples, see the unit tests.\n\nInstallation\n-------------------------------\n\nInstall using:\n\n pip install package-versions\n\nImport using:\n\n from package_versions import VersionRange, parse_dependencies\n\nYou're ready to go!\n\nRestrictions\n-------------------------------\n\nA restriction this package imposes is that it assumed that feature versions are pairs of at most two integers, like `11.7` but not `11.7.3` or `1.7dev`.\n\nVersion `11.7.3` is assumed to contain only bug-fixes compared to `11.7`, and as such will always be preferred. Personally I like this unambiguous interpretation, but it's up to you if you accept it.\n\nDue to internal representation, there is a maximum for major and minor versions of 46340.\n\nPackage names roughly follow Python module naming guide (start with a letter, lowercase, not too long). Note that some systems treat upper and lower case as the same, so it's probably wise to keep this restriction.\n\nTests\n-------------------------------\n\nThere are a lot of py.test unit tests that you can run using:\n\n.. code-block:: bash\n\n python3 -m pytest\n\nLicense\n-------------------------------\n\nBSD 3-clause \u201cRevised\u201d License. Keep the license file and understand that I'm not to be held liable, and then you're free to do pretty much whatever.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mverleg/package_versions", "keywords": null, "license": "BSD 3-clause \u201cRevised\u201d License", "maintainer": null, "maintainer_email": null, "name": "package-versions", "package_url": "https://pypi.org/project/package-versions/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/package-versions/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mverleg/package_versions" }, "release_url": "https://pypi.org/project/package-versions/1.1/", "requires_dist": null, "requires_python": null, "summary": "Version numbers for your package system: parsing of requirements, comparison of version ranges, etc.", "version": "1.1" }, "last_serial": 1960257, "releases": { "0.0": [ { "comment_text": "", "digests": { "md5": "eb3da52d7a543706723a876462dc7c37", "sha256": "70acccadf6be73af0f7007959ab451ab3253d26550c5d0e1767881640f686d1e" }, "downloads": -1, "filename": "package-versions-0.0.tar.gz", "has_sig": false, "md5_digest": "eb3da52d7a543706723a876462dc7c37", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10090, "upload_time": "2015-11-03T00:58:45", "url": "https://files.pythonhosted.org/packages/7f/ef/720ef43d8c1108135a11004a5d0c6cae1d5afa6790340606531b476672bc/package-versions-0.0.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "596465d70ddb4e7c8de4d74fd69dd40d", "sha256": "cb20bcbf2b2c257675e7fd48856e62d0b37b92931ebd9541a3e02061f56c59ad" }, "downloads": -1, "filename": "package-versions-1.0.tar.gz", "has_sig": false, "md5_digest": "596465d70ddb4e7c8de4d74fd69dd40d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10093, "upload_time": "2015-11-03T01:02:16", "url": "https://files.pythonhosted.org/packages/ac/66/7aecf6d98d00f88bc9d8433c5dcdf0a90af3636592171b17afd035633f68/package-versions-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "5cc45c7e272a478d164f3670e3d15a15", "sha256": "151d2b50b5184230785cee32d7d8c30dd850fc64213c51c189256fefc43ce576" }, "downloads": -1, "filename": "package-versions-1.1.tar.gz", "has_sig": false, "md5_digest": "5cc45c7e272a478d164f3670e3d15a15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10591, "upload_time": "2016-02-16T22:26:06", "url": "https://files.pythonhosted.org/packages/be/a5/86d42e2ad7fc4b568ddf7290cdc13abd419d9f5159a417ee5d9a91f47e9d/package-versions-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5cc45c7e272a478d164f3670e3d15a15", "sha256": "151d2b50b5184230785cee32d7d8c30dd850fc64213c51c189256fefc43ce576" }, "downloads": -1, "filename": "package-versions-1.1.tar.gz", "has_sig": false, "md5_digest": "5cc45c7e272a478d164f3670e3d15a15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10591, "upload_time": "2016-02-16T22:26:06", "url": "https://files.pythonhosted.org/packages/be/a5/86d42e2ad7fc4b568ddf7290cdc13abd419d9f5159a417ee5d9a91f47e9d/package-versions-1.1.tar.gz" } ] }