{ "info": { "author": "David Bradford", "author_email": "david.bradford@mongodb.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# pylibversion\n\n[![CircleCI](https://circleci.com/gh/dbradf/pylibverions.svg?style=svg)](https://circleci.com/gh/dbradf/pylibverions)\n\nA library to help manage versions in python libraries.\n\nThis package assumes that there is a main package with a `__init__.py` file with the `VERSION` defined as a tuple.\n\nFor example,\n\n```python\nVERSION = (0, 0, 1)\n```\n\n## Usage\n\n### String based version\n\nYou can add a string based version as described in (PEP 396)[https://www.python.org/dev/peps/pep-0396/] to your\n`__init__.py` file or in other locations with the `version_tuple_to_str` function:\n\n```python\nfrom pylibversion import version_tuple_to_str\n\nVERSION = (0, 0, 1)\n__version__ = version_tuple_to_str(VERSION)\n```\n\n### Include the version in setup.py\n\nYou can lookup the module version to include in setup.py with the `lookup_local_module_version` function:\n\n```python\nfrom pylibversion import lookup_local_module_version\n\n...\nsetup(\n version=lookup_local_module_version(os.path.join(\"src\", \"module_name\")),\n ...\n)\n```\n\n### Compare current version to what is published to PyPi\n\nYou can compare the current version to what is published in PyPi with the `lookup_latest_version_in_pypi` function:\n\n```python\ndef test_version_has_been_updated():\n module_name = \"my_module\"\n pypi_version = lookup_latest_version_in_pypi(module_name)\n my_version = my_module.__version__\n\n assert my_version != pypi_version\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dbradf/pylibversion", "keywords": "", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "pylibversion", "package_url": "https://pypi.org/project/pylibversion/", "platform": "", "project_url": "https://pypi.org/project/pylibversion/", "project_urls": { "Homepage": "https://github.com/dbradf/pylibversion" }, "release_url": "https://pypi.org/project/pylibversion/0.1.0/", "requires_dist": [ "requests (~=2.0)" ], "requires_python": "", "summary": "A library to help manage python library versions", "version": "0.1.0" }, "last_serial": 5782445, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "86310d43709e8d01c2a68437b12f8b79", "sha256": "b58100fdad08ff887d8a813f5e42c51349f5789f8e4a2f8a5a3b3c84a34680e4" }, "downloads": -1, "filename": "pylibversion-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "86310d43709e8d01c2a68437b12f8b79", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7331, "upload_time": "2019-09-04T16:58:56", "url": "https://files.pythonhosted.org/packages/0f/8a/8f8c9910a4f83d44f0c0f15195d567391468498c4e0f5f59893b2d41a2ec/pylibversion-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0fa23eca51ec1b5c348f0040da12e4e6", "sha256": "3fff4c481b68029ea49a7f6fea36ea408249301a68255bd810be7dcf4240f0af" }, "downloads": -1, "filename": "pylibversion-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0fa23eca51ec1b5c348f0040da12e4e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2923, "upload_time": "2019-09-04T16:58:58", "url": "https://files.pythonhosted.org/packages/2c/a1/1b1a73bf742ddc03dd710116259e6bd84dc773358265581700cc6f4ebd83/pylibversion-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "86310d43709e8d01c2a68437b12f8b79", "sha256": "b58100fdad08ff887d8a813f5e42c51349f5789f8e4a2f8a5a3b3c84a34680e4" }, "downloads": -1, "filename": "pylibversion-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "86310d43709e8d01c2a68437b12f8b79", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7331, "upload_time": "2019-09-04T16:58:56", "url": "https://files.pythonhosted.org/packages/0f/8a/8f8c9910a4f83d44f0c0f15195d567391468498c4e0f5f59893b2d41a2ec/pylibversion-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0fa23eca51ec1b5c348f0040da12e4e6", "sha256": "3fff4c481b68029ea49a7f6fea36ea408249301a68255bd810be7dcf4240f0af" }, "downloads": -1, "filename": "pylibversion-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0fa23eca51ec1b5c348f0040da12e4e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2923, "upload_time": "2019-09-04T16:58:58", "url": "https://files.pythonhosted.org/packages/2c/a1/1b1a73bf742ddc03dd710116259e6bd84dc773358265581700cc6f4ebd83/pylibversion-0.1.0.tar.gz" } ] }