{ "info": { "author": "Cloudreach Software - Conductor", "author_email": "sw-conductor-dev@cloudreach.com", "bugtrack_url": null, "classifiers": [], "description": "# `setuptools_scm_git_semver`\n\n[SemVer]-compatible hooks for [`setuptools_scm`].\n\nThis package was created because `setuptools_scm` produces [PEP 440] compliant version numbers,\nwhich are not compatible with SemVer.\n\n## Installation\n\nInstall using [pip], e.g.\n\n```sh\npip install setuptools_scm_git_semver\n```\n\n## Usage\n\nTo configure `setuptools` to generate SemVer compatible numbers through `setuptools_scm` you could\nuse:\n\n```py\n# setup.py\nfrom setuptools import setup\nfrom setuptools_scm_git_semver import parse\n\nsetup(\n ...\n use_scm_version={\n 'parse': parse,\n 'version_scheme': 'semver',\n 'local_scheme': 'semver'\n },\n setup_requires=['setuptools_scm', 'setuptools_scm_git_semver'],\n ...\n)\n\n# $ python setup.py --version\n# 1.2.4-rc.0.20190927T181700Z+ddb8be7\n```\n\nTo retrieve the same version programmatically you could instead use:\n\n```py\nfrom setuptools_scm_git_semver import get_version\n\nget_version()\n# 1.2.4-rc.0.20190927T181700Z+ddb8be7\n```\n\n## Developing\n\nThere are no tests for this, so be careful. I'm not proud \u2013 I just want SemVer versions!\n\n## Releases\n\nThe package should be released to PyPI. The first release will be performed manually, and CI will be\nwritten later.\n\n## API\n\nThis package defines a [`parse`] function, as well as [`version_scheme`] and [`local_scheme`]\nimplementations that together can create valid SemVer version numbers from git. See the\n[configuration documentation] for how to configure `setuptools_scm` to use these.\n\nAdditionally, there is a [`get_version`] convenience function that obtains a version number using\nthe configuration in this package.\n\n### Entrypoints\n\n#### `setuptools_scm.version_scheme` (`semver`)\n\nThe `semver` version scheme formats clean (no commits or unstaged changes since last tag) versions\nas the last tag, verbatim. If there *are* commits or unstaged changes, the behaviour depends on the\nlast tag:\n\n- If the last tag is a pre-release, then an ISO 8601 date and time will be added as an extra\n pre-release segment. If there are no unstaged changes, the commit time of the current `HEAD` will\n be used. If there are unstaged changes, the current time will be used (hence note that unstaged\n changes will cause different versions to be generated every time).\n\n **Examples**\n\n Given a latest tag of `1.2.3-rc.1`, and no unstaged changes with a last commit time of 18:17:00\n UTC on 27th September 2019, the version scheme result would be:\n\n ```\n 1.2.3-rc.1.20190927T181700Z\n ```\n\n If there were unstaged changes, and the current time was 15:49:32 BST on 8th October 2019, the\n version scheme result would be:\n\n ```\n 1.2.3-rc.1.20191008T144932Z\n ```\n\n- If the last tag is *not* a pre-release, the 'patch' number of the last tag is bumped and an ISO\n 8601 date and time is added as a pre-release segment, as above.\n\n **Examples**\n\n Given a latest tag of `1.2.3`, and no unstaged changes with a last commit time of 18:17:00 UTC on\n 27th September 2019, the version scheme result would be:\n\n ```\n 1.2.4-20190927T181700Z\n ```\n\n If there were unstaged changes, and the current time was 15:49:32 BST on 8th October 2019, the\n version scheme result would be:\n\n ```\n 1.2.4-20191008T144932Z\n ```\n\nThese choices ensure that versions generated from newer commits (or at a later time, when there are\nunstaged changes) will be sorted higher than versions from older commits (or earlier times).\n\n#### `setuptools_scm.local_scheme` (`semver`)\n\nThe `semver` local scheme does nothing when there are no commits since the last tag. When there are,\nit returns a build metadata segment with a short hash for the latest commit.\n\n**Example**\n\nGiven there are commits since the last tag and the latest commit's hash is\n`ddb8be7ecb639fe0d5f72aeb46fe0b86eb77d00d`, the local scheme result would be:\n\n```\n+ddb8be7\n```\n\nPer the spec, build metadata has no effect on ordering so this is for additional context only.\n\n### Functions\n\n#### `git.parse`\n\nConstructs a `setuptools_scm.version.ScmVersion` from a given `root` directory and `config`, parsing\nand storing the discovered git tag using [`semver.VersionInfo`].\n\nThis behaves very similarly to to `setuptools_scm.git.parse` except that it also prevents\n`setuptools_scm` from parsing the tag using [`pkg_resources.parse_version`], since that results in\n[PEP 440] versions that are not SemVer-compatible.\n\n#### `get_version`\n\nA trivial wrapper around `setuptools_scm.get_version` that sets the `parse`, `version_scheme`, and\n`local_scheme` configuration to the implementations in this package. The the `setuptools_scm`\n[configuration documentation] for all options.\n\n[SemVer]: https://semver.org\n[`setuptools_scm`]: https://github.com/pypa/setuptools_scm\n[PEP 440]: https://www.python.org/dev/peps/pep-0440/#version-scheme\n[pip]: https://pip.pypa.io/en/stable/\n[`parse`]: #gitparse\n[`version_scheme`]: #setuptools_scmversion_scheme-semver\n[`local_scheme`]: #setuptools_scmlocal_scheme-semver\n[`get_version`]: #get_version\n[configuration documentation]: https://github.com/pypa/setuptools_scm/#configuration-parameters\n[`semver.VersionInfo`]: https://python-semver.readthedocs.io/en/latest/api.html#semver.VersionInfo\n[`pkg_resources.parse_version`]: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#parsing-utilities\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": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "setuptools-scm-git-semver", "package_url": "https://pypi.org/project/setuptools-scm-git-semver/", "platform": "", "project_url": "https://pypi.org/project/setuptools-scm-git-semver/", "project_urls": null, "release_url": "https://pypi.org/project/setuptools-scm-git-semver/0.1.1/", "requires_dist": [ "python-dateutil (<3,>=2.8)", "semver (<3,>=2.8)", "setuptools-scm (<4,>=3.3)" ], "requires_python": "", "summary": "SemVer-compatible plugin for setuptools_scm.", "version": "0.1.1" }, "last_serial": 5955763, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e7a892671e6ce131ad542668ebe93079", "sha256": "93e7a8927364ade87df90f30459116240b5cbdaa270c85bebc07112c7906988e" }, "downloads": -1, "filename": "setuptools_scm_git_semver-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e7a892671e6ce131ad542668ebe93079", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4125, "upload_time": "2019-10-10T15:54:17", "url": "https://files.pythonhosted.org/packages/76/04/a7995c7ac958d9021c600d3dd75c47d37437b4d3407458b2495c57bf5743/setuptools_scm_git_semver-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5244421388defd331fe379b5f69cf1a1", "sha256": "2b5d13619e3b7f75e4306dd92b0df5c0f76da0601f2aeadb31865a47056684f6" }, "downloads": -1, "filename": "setuptools_scm_git_semver-0.1.0.tar.gz", "has_sig": false, "md5_digest": "5244421388defd331fe379b5f69cf1a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5359, "upload_time": "2019-10-10T15:54:20", "url": "https://files.pythonhosted.org/packages/95/ef/e39dff8cdba33729910f1c9cd1aee75dd7c83ba74b5abdf43eded87e8e1a/setuptools_scm_git_semver-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e913966f6babe936716d7713c803dec1", "sha256": "b36762a00eb1bef41ecf9b8df679d6f19eff1bf3ec2ab21fdd29cb6737d37dc9" }, "downloads": -1, "filename": "setuptools_scm_git_semver-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e913966f6babe936716d7713c803dec1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6057, "upload_time": "2019-10-10T16:08:37", "url": "https://files.pythonhosted.org/packages/e6/e6/62976887b0a03049c5b329c6eac57211dbe1156589160ecabfc8b28dd497/setuptools_scm_git_semver-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8203d1d4f959a17798c65561ae2b9c6e", "sha256": "fe306ae186bafb83628a3eefd7ea0462a2c7a644458fbdd5db1fc3cb6d0c168b" }, "downloads": -1, "filename": "setuptools_scm_git_semver-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8203d1d4f959a17798c65561ae2b9c6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5966, "upload_time": "2019-10-10T16:08:39", "url": "https://files.pythonhosted.org/packages/77/c5/24879f12938aea27c73655ca8699a9b378e62acf384c732981cbcb7cbd08/setuptools_scm_git_semver-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e913966f6babe936716d7713c803dec1", "sha256": "b36762a00eb1bef41ecf9b8df679d6f19eff1bf3ec2ab21fdd29cb6737d37dc9" }, "downloads": -1, "filename": "setuptools_scm_git_semver-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e913966f6babe936716d7713c803dec1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6057, "upload_time": "2019-10-10T16:08:37", "url": "https://files.pythonhosted.org/packages/e6/e6/62976887b0a03049c5b329c6eac57211dbe1156589160ecabfc8b28dd497/setuptools_scm_git_semver-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8203d1d4f959a17798c65561ae2b9c6e", "sha256": "fe306ae186bafb83628a3eefd7ea0462a2c7a644458fbdd5db1fc3cb6d0c168b" }, "downloads": -1, "filename": "setuptools_scm_git_semver-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8203d1d4f959a17798c65561ae2b9c6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5966, "upload_time": "2019-10-10T16:08:39", "url": "https://files.pythonhosted.org/packages/77/c5/24879f12938aea27c73655ca8699a9b378e62acf384c732981cbcb7cbd08/setuptools_scm_git_semver-0.1.1.tar.gz" } ] }