{ "info": { "author": "Sekom Yazilim", "author_email": "info@sekomyazilim.com.tr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "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 :: 3.6", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Version Control", "Topic :: System :: Software Distribution", "Topic :: Utilities" ], "description": "setuptools_sky\n===============\n\n:code:`setuptools_sky` handles managing your python package versions\nin scm metadata instead of declaring them as the version argument\nor in a scm managed file.\n\nIt also handles file finders for the supported scm's.\n\nSetup.py usage\n--------------\n\nTo use setuptools_sky just modify your project's setup.py file like this:\n\n1. Add :code:`'setuptools_sky'` to the :code:`setup_requires` parameter\n2. Add the :code:`use_scm_version` parameter and set it to ``True``\n\n E.g.:\n\n .. code:: python\n\n from setuptools import setup\n setup(\n ...,\n use_scm_version=True,\n setup_requires=['setuptools_sky'],\n ...,\n )\n\n Arguments to ``get_version()`` (see below) may be passed as a\n dictionary to ``use_scm_version``. For example:\n\n .. code:: python\n\n from setuptools import setup\n setup(\n ...,\n use_scm_version = {\"root\": \"..\", \"relative_to\": __file__},\n setup_requires=['setuptools_sky'],\n ...,\n )\n\n\n3. Access the version number in your package via :code:`pkg_resources`\n\n E.g. (`PEP-0396 `_):\n\n .. code:: python\n\n from pkg_resources import get_distribution, DistributionNotFound\n try:\n __version__ = get_distribution(__name__).version\n except DistributionNotFound:\n # package is not installed\n pass\n\n\nProgrammatic usage\n------------------\n\nIn order to use ``setuptools_sky`` from code that is one directory deeper\nthan the project's root, you can use:\n\n.. code:: python\n\n from setuptools_sky import get_version\n version = get_version(root='..', relative_to=__file__)\n\nSee `setup.py Usage`_ above for how to use this within setup.py.\n\n\nUsage from sphinx\n-----------------\n\nIt is discouraged to use setuptools_sky from sphinx itself,\ninstead use ``pkg_resources`` after editable/real installation:\n\n.. code:: python\n\n from pkg_resources import get_distribution\n release = get_distribution('myproject').version\n # for example take major/minor\n version = '.'.join(release.split('.')[:2])\n\nThe underlying reason is, that services like readthedocs sometimes change\nthe workingdirectory for good reasons and using the installed metadata prevents\nusing needless volatile data there.\n\nNotable Plugins\n----------------\n\n`setuptools_sky_git_archive `_\nprovides partial support for obtaining versions from git archives\nthat belong to tagged versions. The only reason for not including\nit in setuptools-scm itself is git/github not supporting\nsufficient metadata for untagged/followup commits,\nwhich is preventing a consistent UX.\n\n\nDefault versioning scheme\n--------------------------\n\nIn the standard configuration setuptools_sky takes a look at 3 things:\n\n1. latest tag (with a version number)\n2. the distance to this tag (e.g. number of revisions since latest tag)\n3. workdir state (e.g. uncommitted changes since latest tag)\n\nand uses roughly the following logic to render the version:\n\n:code:`no distance and clean`:\n :code:`{tag}`\n:code:`distance and clean`:\n :code:`{next_version}.dev{distance}+{scm letter}{revision hash}`\n:code:`no distance and not clean`:\n :code:`{tag}+dYYYMMMDD`\n:code:`distance and not clean`:\n :code:`{next_version}.dev{distance}+{scm letter}{revision hash}.dYYYMMMDD`\n\nThe next version is calculated by adding ``1`` to the last numeric component\nof the tag.\n\nFor git projects, the version relies on `git describe `_,\nso you will see an additional ``g`` prepended to the ``{revision hash}``.\n\nSemantic Versioning (SemVer)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nDue to the default behavior it's necessary to always include a\npatch version (the ``3`` in ``1.2.3``), or else the automatic guessing\nwill increment the wrong part of the semver (e.g. tag ``2.0`` results in\n``2.1.devX`` instead of ``2.0.1.devX``). So please make sure to tag\naccordingly.\n\n.. note::\n\n Future versions of setuptools_sky will switch to\n `SemVer `_ by default hiding the the old behavior\n as an configurable option.\n\n\nBuiltin mechanisms for obtaining version numbers\n--------------------------------------------------\n\n1. the scm itself (git/hg)\n2. :code:`.hg_archival` files (mercurial archives)\n3. PKG-INFO\n\n.. note::\n\n git archives are not supported due to git shortcomings\n\n\nConfiguration Parameters\n------------------------------\n\nIn order to configure the way ``use_scm_version`` works you can provide\na mapping with options instead of simple boolean value.\n\nThe Currently supported configuration keys are:\n\n:root:\n cwd relative path to use for finding the scm root, defaults to :code:`.`\n\n:version_scheme:\n configures how the local version number is constructed.\n either an entrypoint name or a callable\n\n:local_scheme:\n configures how the local component of the version is constructed\n either an entrypoint name or a callable\n:write_to:\n declares a text file or python file which is replaced with a file\n containing the current version.\n its ideal or creating a version.py file within the package\n\n .. warning::\n\n only :code:`*.py` and :code:`*.txt` have builtin templates,\n for other extensions it is necessary\n to provide a :code:`write_to_template`\n:write_to_template:\n a newstyle format string thats given the current version as\n the :code:`version` keyword argument for formatting\n\n:relative_to:\n a file from which root may be resolved. typically called by a\n script or module that is not\n in the root of the repository to direct setuptools_sky to the\n root of the repository by supplying ``__file__``.\n\n:parse:\n a function that will be used instead of the discovered scm for parsing the version,\n use with caution, this is a expert function and you should be closely familiar\n with the setuptools_sky internals to use it\n\n\nTo use setuptools_sky in other Python code you can use the\n``get_version`` function:\n\n.. code:: python\n\n from setuptools_sky import get_version\n my_version = get_version()\n\nIt optionally accepts the keys of the ``use_scm_version`` parameter as\nkeyword arguments.\n\n\nEnvironment Variables\n---------------------\n\n:setuptools_sky_PRETEND_VERSION:\n when defined and not empty,\n its used as the primary source for the version number\n in which case it will be a unparsed string\n\n\nExtending setuptools_sky\n------------------------\n\nsetuptools_sky ships with a few setuptools entrypoints based hooks to extend\nits default capabilities.\n\nAdding a new SCM\n~~~~~~~~~~~~~~~~\n\nsetuptools_sky provides 2 entrypoints for adding new SCMs\n\n``setuptools_sky.parse_scm``\n A function used to parse the metadata of the current workdir\n using the name of the control directory/file of your SCM as the\n entrypoint's name. E.g. for the built-in entrypoint for git the\n entrypoint is named :code:`.git` and references\n :code:`'setuptools_sky.git:parse'`.\n\n The return value MUST be a :code:`setuptools.version.ScmVersion` instance\n created by the function :code:`setuptools_sky.version:meta`.\n\n``setuptools_sky.files_command``\n Either a string containing a shell command that prints all SCM managed\n files in its current working directory or a callable, that given a\n pathname will return that list.\n\n Also use then name of your SCM control directory as name of the entrypoint.\n\nVersion number construction\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``setuptools_sky.version_scheme``\n Configures how the version number is constructed given a\n :code:`setuptools.version.ScmVersion` instance and should return a string\n representing the version.\n\n Available implementations:\n\n :guess-next-dev: automatically guesses the next development version (default)\n :post-release: generates post release versions (adds :code:`postN`)\n\n``setuptools_sky.local_scheme``\n Configures how the local part of a version is rendered given a\n :code:`setuptools.version.ScmVersion` instance and should return a string\n representing the local version.\n\n Available implementations:\n\n :node-and-date: adds the node on dev versions and the date on dirty\n workdir (default)\n :dirty-tag: adds :code:`+dirty` if the current workdir has changes\n\n\nImporting in setup.py\n~~~~~~~~~~~~~~~~~~~~~\n\nTo support usage in :code:`setup.py` passing a callable into use_scm_version\nis supported.\n\nWithin that callable, setuptools_sky is available for import.\nThe callable must return the configuration.\n\n\n.. code:: python\n\n def myversion():\n from setuptools_sky.version import dirty_tag\n def clean_scheme(version):\n return dirty_tag(version) if version.dirty else '+clean'\n\n return {'local_scheme': clean_scheme}\n\n\nCode of Conduct\n---------------\n\nEveryone interacting in the setuptools_sky project's codebases, issue trackers,\nchat rooms, and mailing lists is expected to follow the\n`PyPA Code of Conduct`_.\n\n.. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/sekomy/setuptools-sky", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "setuptools_sky", "package_url": "https://pypi.org/project/setuptools_sky/", "platform": "", "project_url": "https://pypi.org/project/setuptools_sky/", "project_urls": { "Homepage": "https://bitbucket.org/sekomy/setuptools-sky" }, "release_url": "https://pypi.org/project/setuptools_sky/0.1.7/", "requires_dist": null, "requires_python": "", "summary": "the blessed package to manage your versions by scm tags", "version": "0.1.7" }, "last_serial": 4312244, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "55844fc13673c86987768eb037bf3db5", "sha256": "70328b20a28e90278eecdf70a7ceca9e303c68c1b3e5cdfee5e4c56c635b4e82" }, "downloads": -1, "filename": "setuptools_sky-0.1.5.tar.gz", "has_sig": false, "md5_digest": "55844fc13673c86987768eb037bf3db5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16082, "upload_time": "2018-07-16T14:05:26", "url": "https://files.pythonhosted.org/packages/ce/dc/76992394c9cdbf9c428b04e7a58202f8038b59d11ba59053b82c5564ee63/setuptools_sky-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "9d3bf88c28d93d6c38d90e78898bd2d3", "sha256": "0692df806d8a519bd4f3fdf713c68a9ddcb960a479e1bb38a4bfcf8733cb893e" }, "downloads": -1, "filename": "setuptools_sky-0.1.6.tar.gz", "has_sig": false, "md5_digest": "9d3bf88c28d93d6c38d90e78898bd2d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16342, "upload_time": "2018-07-18T06:59:51", "url": "https://files.pythonhosted.org/packages/4b/7d/41cbbbeba6badfce2c232c827ab76fc3e907e05f06092d935d47d1c75109/setuptools_sky-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "10cf776246f44f125114fa4ff0520b05", "sha256": "16d408fc3871ed22cdecd6ac7a88e329567257b715d7075541077a73ce1b71f4" }, "downloads": -1, "filename": "setuptools_sky-0.1.7.tar.gz", "has_sig": false, "md5_digest": "10cf776246f44f125114fa4ff0520b05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16204, "upload_time": "2018-09-26T12:35:03", "url": "https://files.pythonhosted.org/packages/52/5f/360fc54aebec0671cb96a1dfe2bf6b513fc496ac26a3b894699e4042aa99/setuptools_sky-0.1.7.tar.gz" } ], "0.1.7b1": [ { "comment_text": "", "digests": { "md5": "fcbc754a873af801fe04bc0192b47ded", "sha256": "09bb59f99e028c8e356c4c1ce45a7f52e60c875a0aa89bd42da30e03b6a00e1a" }, "downloads": -1, "filename": "setuptools_sky-0.1.7b1.tar.gz", "has_sig": false, "md5_digest": "fcbc754a873af801fe04bc0192b47ded", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16166, "upload_time": "2018-09-20T11:18:59", "url": "https://files.pythonhosted.org/packages/d5/88/d524fa68593b2a63e4c97999770681b35caf61393b7c914a113cac0cdf87/setuptools_sky-0.1.7b1.tar.gz" } ], "0.1.7b2": [ { "comment_text": "", "digests": { "md5": "678d6c96cdb98c4089199b7d5ae5ac4c", "sha256": "39ea6fc7875ee1edab99cb50cb637785aa848b0514cd8a3696bbd70335bf68bb" }, "downloads": -1, "filename": "setuptools_sky-0.1.7b2.tar.gz", "has_sig": false, "md5_digest": "678d6c96cdb98c4089199b7d5ae5ac4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16212, "upload_time": "2018-09-26T07:46:17", "url": "https://files.pythonhosted.org/packages/e1/2f/38489b59f315797c43f57fc41182cbbe7311eb65363825f04deb74e07b4f/setuptools_sky-0.1.7b2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "10cf776246f44f125114fa4ff0520b05", "sha256": "16d408fc3871ed22cdecd6ac7a88e329567257b715d7075541077a73ce1b71f4" }, "downloads": -1, "filename": "setuptools_sky-0.1.7.tar.gz", "has_sig": false, "md5_digest": "10cf776246f44f125114fa4ff0520b05", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16204, "upload_time": "2018-09-26T12:35:03", "url": "https://files.pythonhosted.org/packages/52/5f/360fc54aebec0671cb96a1dfe2bf6b513fc496ac26a3b894699e4042aa99/setuptools_sky-0.1.7.tar.gz" } ] }