{ "info": { "author": "Adam Talsma", "author_email": "se-adam.talsma@ccpgames.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Topic :: Software Development", "Topic :: System :: Archiving :: Packaging", "Topic :: Utilities" ], "description": "setuphelpers\n============\n\nHelper functions for writing setup.py's.\n\n|Build Status| |Coverage Status| |Version| |Download format| |Downloads\nthis month| |Development Status| |License|\n\nHelper functions\n----------------\n\n``setuphelpers`` provides the following:\n\n``git_version``\n~~~~~~~~~~~~~~~\n\nUse to supply your package's version string from git. If the latest\ncommit is tagged, the version will be that tag. If it is not tagged, it\nwill be the last version + 1 minor/patch version .devN number of commits\nsince last tag. If building off a branch other than master, the branch\nname is used as a local version identifier.\n\nExamples: ``0.0.1``, ``0.0.2.dev1``, ``0.0.2.dev1+featureX``\n\n.. code:: python\n\n from setuptools import setup\n from setuphelpers import git_version\n\n setup(name=\"my_thing\", version=git_version())\n\nNote that you cannot deploy a sdist package using ``git_version``, due\nto needing access to ``.git``. But please don't start including\n``.git``'s in your packages. There is a pattern you can use to have\n``git_version`` write out to a file to include, but I would argue that\nthere's not a need to do that, as it's already included in the written\npackage metadata anyway (wheels > \\*). But if you must:\n\n.. code:: python\n\n import os\n import io\n from setuptools import setup\n from setuphelpers import git_version\n from setuphelpers import find_version\n\n # VER_FILE should not exist in your checked in source\n VER_FILE = os.path.join(\"my_thing\", \"__version__.py\")\n if os.path.isfile(VER_FILE):\n # this should only be run during rebuilding a sdist package\n VERSION = find_version(VER_FILE)\n else:\n # this should be run only during the actual packaging\n VERSION = git_version()\n with io.open(VER_FILE, \"w\", encoding=\"utf-8\") as openversion:\n openversion.write('__version__ = \"{}\"'.format(VERSION))\n\n setup(name=\"my_thing\", version=VERSION)\n\n``long_description``\n~~~~~~~~~~~~~~~~~~~~\n\nUse to fill in the long\\_description field with the contents of your\nREADME. If no README is found, will fallback to the docstring of your\nsetup.py.\n\n.. code:: python\n\n from setuptools import setup\n from setuphelpers import long_description\n\n setup(name=\"my_thing\", version=\"1.0\", long_description=long_description())\n\n``find_version``\n~~~~~~~~~~~~~~~~\n\nUsed to find the value assigned to \\_\\_version\\_\\_ in the specified\nfilepath.\n\n.. code:: python\n\n from setuptools import setup\n from setuphelpers import find_version\n\n setup(name=\"my_thing\", version=find_version(\"my_thing/__init__.py\"))\n\n``test_command``\n~~~~~~~~~~~~~~~~\n\nUsed to build a test command class for running unit tests with\n``python setup.py test``. Default support is for py.test, but nose and\nunittest are also both possible. The return from ``test_command`` can be\npassed to ``cmdclass``.\n\nNote that the ``tests_require`` dependancies still need to be provided,\nincluding coverage, if you're using it (plus whatever else you need to\ntest with).\n\n.. code:: python\n\n from setuptools import setup\n from setuphelpers import test_command\n\n setup(\n name=\"my_thing\",\n version=\"1.0\",\n tests_require=[\"pytest\", \"pytest-cov\"],\n cmdclass=test_command(cover=\"my_thing\"),\n )\n\nA note on ``setup_requires``\n----------------------------\n\nYou can (and should) put ``setuphelpers`` in the ``setup_requires``\nargument of your setup.py. But you also need to be careful to avoid\ndependency problems during build. To accomplish this, you can use this\npattern (for each/any of the used functions):\n\n.. code:: python\n\n from setuptools import setup\n try:\n from setuphelpers import (\n find_version, # not used, but for completeness\n git_version,\n long_description,\n test_command,\n )\n except ImportError:\n find_version = lambda x: \"0.0.0\"\n git_version = lambda: \"0.0.0\"\n long_description = lambda: __doc__\n test_command = lambda **_: {}\n\n\n setup(\n name=\"my_thing\",\n version=git_version(), # find_version(\"my_thing/__init__.py\"),\n description=long_description(),\n tests_require=[\"pytest\", \"pytest-cov\"],\n setup_requires=[\"setuphelpers\"],\n cmdclass=test_command(cover=\"my_thing\"),\n )\n\nNow ``python setup.py install`` should pull in ``setuphelpers`` if it's\nmissing, and re-exec itself to fill in the arguments as expected. You\nneed to manually avoid both the ``ImportError`` and the ``NameError``\nthough, so mock callables need to be created in the case of missing\n``setuphelpers``.\n\nCopyright and License\n=====================\n\nsetuphelpers was written by Adam Talsma\n\nCopyright (c) 2016 CCP hf.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n.. |Build Status| image:: https://travis-ci.org/ccpgames/setuphelpers.svg?branch=master\n :target: https://travis-ci.org/ccpgames/setuphelpers\n.. |Coverage Status| image:: https://coveralls.io/repos/ccpgames/setuphelpers/badge.svg?branch=master\n :target: https://coveralls.io/r/ccpgames/setuphelpers?branch=master\n.. |Version| image:: https://img.shields.io/pypi/v/setuphelpers.svg\n :target: https://pypi.python.org/pypi/setuphelpers/\n.. |Download format| image:: https://img.shields.io/badge/format-wheel-green.svg?\n :target: https://pypi.python.org/pypi/setuphelpers/\n.. |Downloads this month| image:: https://img.shields.io/pypi/dm/setuphelpers.svg\n :target: https://pypi.python.org/pypi/setuphelpers/\n.. |Development Status| image:: https://img.shields.io/badge/status-pre--alpha-red.svg\n :target: https://pypi.python.org/pypi/setuphelpers/\n.. |License| image:: https://img.shields.io/github/license/ccpgames/setuphelpers.svg\n :target: https://pypi.python.org/pypi/setuphelpers/\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/ccpgames/setuphelpers/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ccpgames/setuphelpers/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "setuphelpers", "package_url": "https://pypi.org/project/setuphelpers/", "platform": "", "project_url": "https://pypi.org/project/setuphelpers/", "project_urls": { "Download": "https://github.com/ccpgames/setuphelpers/", "Homepage": "https://github.com/ccpgames/setuphelpers/" }, "release_url": "https://pypi.org/project/setuphelpers/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Setuptools helper functions", "version": "0.1.2" }, "last_serial": 3242304, "releases": { "0.0.2": [], "0.0.4": [ { "comment_text": "", "digests": { "md5": "4f177a1f9d29119f9aa448ef93a23f0b", "sha256": "316b2507e578f9428321d92efc889dbb48531e08bd4439097f4ffc5f9bc16611" }, "downloads": -1, "filename": "setuphelpers-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4f177a1f9d29119f9aa448ef93a23f0b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8133, "upload_time": "2016-05-25T21:02:05", "url": "https://files.pythonhosted.org/packages/a1/bc/d8de33b020befe4f56d99b11a9974cd7edd3a4b326e64cc208dd7962e36f/setuphelpers-0.0.4-py2.py3-none-any.whl" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "ba462fc47a7047d2f0f2a872f86d6542", "sha256": "19c26dc8c7a60f51e2c1e13ca50e7d536118e9dbe6b2ef1f9eeac54ff9552fcf" }, "downloads": -1, "filename": "setuphelpers-0.0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ba462fc47a7047d2f0f2a872f86d6542", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9998, "upload_time": "2016-05-25T21:17:30", "url": "https://files.pythonhosted.org/packages/f0/42/fa80d4a2c1906e59a532ca9d5dd461519900c625c02bb4a27613db22820d/setuphelpers-0.0.5-py2.py3-none-any.whl" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "ee25d4658043dfc0fe5ea29218867d7f", "sha256": "a40292bafc6c6d1afa5823544566bee873c41175e93108c90bae97d5f715698c" }, "downloads": -1, "filename": "setuphelpers-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ee25d4658043dfc0fe5ea29218867d7f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10022, "upload_time": "2016-05-25T23:04:34", "url": "https://files.pythonhosted.org/packages/bc/3c/0ec050868916d77862f6cb9fa0a734b6aca39ce22d0e41197a242b4d63ef/setuphelpers-0.0.6-py2.py3-none-any.whl" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "1a3f4377ea562c97915517a8d7b2bff6", "sha256": "f805128907a5ebc1d0baa3977cace522618b61069c7c4547c84facb030c090f3" }, "downloads": -1, "filename": "setuphelpers-0.0.7-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1a3f4377ea562c97915517a8d7b2bff6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10021, "upload_time": "2016-05-25T23:13:44", "url": "https://files.pythonhosted.org/packages/58/c7/b815ea81e2b198f1a9b31688629e5a3bcf12d42ed66ed9a32cc5ea70c405/setuphelpers-0.0.7-py2.py3-none-any.whl" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "64694b0872f82c887599ba242115671a", "sha256": "9188da080a0cc3991334e52061b32a29582b0dd6987dfeaea63658b8ea66b533" }, "downloads": -1, "filename": "setuphelpers-0.0.8-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "64694b0872f82c887599ba242115671a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10045, "upload_time": "2016-06-09T20:23:13", "url": "https://files.pythonhosted.org/packages/f2/91/2db49cefa6fa4cce192345ff7ca891a199103cf543c02b112e204b84e7ed/setuphelpers-0.0.8-py2.py3-none-any.whl" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "40f24d1f44b33479cbfa946792c9d7b3", "sha256": "c21138b81d01621bd8eadd2e77b1ef9001c270068fcff6a4fffa660c2c9614e8" }, "downloads": -1, "filename": "setuphelpers-0.0.9-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "40f24d1f44b33479cbfa946792c9d7b3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10200, "upload_time": "2016-06-15T18:36:56", "url": "https://files.pythonhosted.org/packages/78/04/8c4cb2fdfc811da67315a3545f3eaacbbb87ec47b682ce3d408e20d54a19/setuphelpers-0.0.9-py2.py3-none-any.whl" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "488ffaaa83bf3b00300066884e66cc79", "sha256": "6ae30bf6872d0b8667c6bc9d851790ad8cde8db40ebbfa1783c68d7abd70516d" }, "downloads": -1, "filename": "setuphelpers-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "488ffaaa83bf3b00300066884e66cc79", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10249, "upload_time": "2016-08-09T23:25:13", "url": "https://files.pythonhosted.org/packages/ae/29/3bc9d78536ae3ba0aee9e3fc48a6e2a3768619839db550a1649a2176b3eb/setuphelpers-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3472b05139762f360c486f0b249d8ea3", "sha256": "17112113206451e7bcdf7a9638dfb4917e6f9c08049499372ab850fd7fc80182" }, "downloads": -1, "filename": "setuphelpers-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3472b05139762f360c486f0b249d8ea3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10284, "upload_time": "2017-10-10T15:13:43", "url": "https://files.pythonhosted.org/packages/dd/d0/15810217a4cc48030f14c67f8065af2f1f69d5d158d25b9aa407218e131f/setuphelpers-0.1.1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "94d788e21caa9218e254500fcb3f86c4", "sha256": "44c59ae60c727fa4e02a3c0c5e381568c5f0388fc7dd8531fce51845ba0a62a1" }, "downloads": -1, "filename": "setuphelpers-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "94d788e21caa9218e254500fcb3f86c4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10293, "upload_time": "2017-10-11T14:55:53", "url": "https://files.pythonhosted.org/packages/2c/e4/5059a9d4f6e704859adf798c036933794914d0102f9b23c15421db0c1577/setuphelpers-0.1.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "94d788e21caa9218e254500fcb3f86c4", "sha256": "44c59ae60c727fa4e02a3c0c5e381568c5f0388fc7dd8531fce51845ba0a62a1" }, "downloads": -1, "filename": "setuphelpers-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "94d788e21caa9218e254500fcb3f86c4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10293, "upload_time": "2017-10-11T14:55:53", "url": "https://files.pythonhosted.org/packages/2c/e4/5059a9d4f6e704859adf798c036933794914d0102f9b23c15421db0c1577/setuphelpers-0.1.2-py2.py3-none-any.whl" } ] }