Initial Commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,74 @@
|
||||
Incremental
|
||||
-----------
|
||||
|
||||
This project includes code from the Twisted Project, which is licensed as below.
|
||||
|
||||
Copyright (c) 2001-2015
|
||||
Allen Short
|
||||
Amber Hawkie Brown
|
||||
Andrew Bennetts
|
||||
Andy Gayton
|
||||
Antoine Pitrou
|
||||
Apple Computer, Inc.
|
||||
Ashwini Oruganti
|
||||
Benjamin Bruheim
|
||||
Bob Ippolito
|
||||
Canonical Limited
|
||||
Christopher Armstrong
|
||||
David Reid
|
||||
Divmod Inc.
|
||||
Donovan Preston
|
||||
Eric Mangold
|
||||
Eyal Lotem
|
||||
Google Inc.
|
||||
Hybrid Logic Ltd.
|
||||
Hynek Schlawack
|
||||
Itamar Turner-Trauring
|
||||
James Knight
|
||||
Jason A. Mobarak
|
||||
Jean-Paul Calderone
|
||||
Jessica McKellar
|
||||
Jonathan D. Simms
|
||||
Jonathan Jacobs
|
||||
Jonathan Lange
|
||||
Julian Berman
|
||||
Jürgen Hermann
|
||||
Kevin Horn
|
||||
Kevin Turner
|
||||
Laurens Van Houtven
|
||||
Mary Gardiner
|
||||
Massachusetts Institute of Technology
|
||||
Matthew Lefkowitz
|
||||
Moshe Zadka
|
||||
Paul Swartz
|
||||
Pavel Pergamenshchik
|
||||
Rackspace, US Inc.
|
||||
Ralph Meijer
|
||||
Richard Wall
|
||||
Sean Riley
|
||||
Software Freedom Conservancy
|
||||
Tavendo GmbH
|
||||
Thijs Triemstra
|
||||
Thomas Herve
|
||||
Timothy Allen
|
||||
Tom Prince
|
||||
Travis B. Hartwell
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,136 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: incremental
|
||||
Version: 22.10.0
|
||||
Summary: "A small library that versions your Python projects."
|
||||
Home-page: https://github.com/twisted/incremental
|
||||
Maintainer: Amber Brown
|
||||
Maintainer-email: hawkowl@twistedmatrix.com
|
||||
License: MIT
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Programming Language :: Python :: 2
|
||||
Classifier: Programming Language :: Python :: 2.7
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python :: 3.4
|
||||
Classifier: Programming Language :: Python :: 3.5
|
||||
Classifier: Programming Language :: Python :: 3.6
|
||||
Classifier: Programming Language :: Python :: 3.7
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
License-File: LICENSE
|
||||
Provides-Extra: mypy
|
||||
Requires-Dist: click (>=6.0) ; extra == 'mypy'
|
||||
Requires-Dist: twisted (>=16.4.0) ; extra == 'mypy'
|
||||
Requires-Dist: mypy (==0.812) ; extra == 'mypy'
|
||||
Provides-Extra: scripts
|
||||
Requires-Dist: click (>=6.0) ; extra == 'scripts'
|
||||
Requires-Dist: twisted (>=16.4.0) ; extra == 'scripts'
|
||||
|
||||
Incremental
|
||||
===========
|
||||
|
||||
|gha|
|
||||
|pypi|
|
||||
|coverage|
|
||||
|
||||
Incremental is a small library that versions your Python projects.
|
||||
|
||||
API documentation can be found `here <https://twisted.github.io/incremental/docs/>`_.
|
||||
|
||||
|
||||
Quick Start
|
||||
-----------
|
||||
|
||||
Add this to your ``setup.py``\ 's ``setup()`` call, removing any other versioning arguments:
|
||||
|
||||
.. code::
|
||||
|
||||
setup(
|
||||
use_incremental=True,
|
||||
setup_requires=['incremental'],
|
||||
install_requires=['incremental'], # along with any other install dependencies
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
Install Incremental to your local environment with ``pip install incremental[scripts]``.
|
||||
Then run ``python -m incremental.update <projectname> --create``.
|
||||
It will create a file in your package named ``_version.py`` and look like this:
|
||||
|
||||
.. code::
|
||||
|
||||
from incremental import Version
|
||||
|
||||
__version__ = Version("widgetbox", 17, 1, 0)
|
||||
__all__ = ["__version__"]
|
||||
|
||||
|
||||
Then, so users of your project can find your version, in your root package's ``__init__.py`` add:
|
||||
|
||||
.. code::
|
||||
|
||||
from ._version import __version__
|
||||
|
||||
|
||||
Subsequent installations of your project will then use Incremental for versioning.
|
||||
|
||||
|
||||
Incremental Versions
|
||||
--------------------
|
||||
|
||||
``incremental.Version`` is a class that represents a version of a given project.
|
||||
It is made up of the following elements (which are given during instantiation):
|
||||
|
||||
- ``package`` (required), the name of the package this ``Version`` represents.
|
||||
- ``major``, ``minor``, ``micro`` (all required), the X.Y.Z of your project's ``Version``.
|
||||
- ``release_candidate`` (optional), set to 0 or higher to mark this ``Version`` being of a release candidate (also sometimes called a "prerelease").
|
||||
- ``post`` (optional), set to 0 or higher to mark this ``Version`` as a postrelease.
|
||||
- ``dev`` (optional), set to 0 or higher to mark this ``Version`` as a development release.
|
||||
|
||||
You can extract a PEP-440 compatible version string by using the ``.public()`` method, which returns a ``str`` containing the full version. This is the version you should provide to users, or publicly use. An example output would be ``"13.2.0"``, ``"17.1.2dev1"``, or ``"18.8.0rc2"``.
|
||||
|
||||
Calling ``repr()`` with a ``Version`` will give a Python-source-code representation of it, and calling ``str()`` with a ``Version`` will provide a string similar to ``'[Incremental, version 16.10.1]'``.
|
||||
|
||||
|
||||
Updating
|
||||
--------
|
||||
|
||||
Incremental includes a tool to automate updating your Incremental-using project's version called ``incremental.update``.
|
||||
It updates the ``_version.py`` file and automatically updates some uses of Incremental versions from an indeterminate version to the current one.
|
||||
It requires ``click`` from PyPI.
|
||||
|
||||
``python -m incremental.update <projectname>`` will perform updates on that package.
|
||||
The commands that can be given after that will determine what the next version is.
|
||||
|
||||
- ``--newversion=<version>``, to set the project version to a fully-specified version (like 1.2.3, or 17.1.0dev1).
|
||||
- ``--rc``, to set the project version to ``<year-2000>.<month>.0rc1`` if the current version is not a release candidate, or bump the release candidate number by 1 if it is.
|
||||
- ``--dev``, to set the project development release number to 0 if it is not a development release, or bump the development release number by 1 if it is.
|
||||
- ``--patch``, to increment the patch number of the release. This will also reset the release candidate number, pass ``--rc`` at the same time to increment the patch number and make it a release candidate.
|
||||
- ``--post``, to set the project postrelease number to 0 if it is not a postrelease, or bump the postrelease number by 1 if it is. This will also reset the release candidate and development release numbers.
|
||||
|
||||
If you give no arguments, it will strip the release candidate number, making it a "full release".
|
||||
|
||||
Incremental supports "indeterminate" versions, as a stand-in for the next "full" version. This can be used when the version which will be displayed to the end-user is unknown (for example "introduced in" or "deprecated in"). Incremental supports the following indeterminate versions:
|
||||
|
||||
- ``Version("<projectname>", "NEXT", 0, 0)``
|
||||
- ``<projectname> NEXT``
|
||||
|
||||
When you run ``python -m incremental.update <projectname> --rc``, these will be updated to real versions (assuming the target final version is 17.1.0):
|
||||
|
||||
- ``Version("<projectname>", 17, 1, 0, release_candidate=1)``
|
||||
- ``<projectname> 17.1.0rc1``
|
||||
|
||||
Once the final version is made, it will become:
|
||||
|
||||
- ``Version("<projectname>", 17, 1, 0)``
|
||||
- ``<projectname> 17.1.0``
|
||||
|
||||
|
||||
.. |coverage| image:: https://codecov.io/gh/twisted/incremental/branch/master/graph/badge.svg?token=K2ieeL887X
|
||||
.. _coverage: https://codecov.io/gh/twisted/incremental
|
||||
|
||||
.. |gha| image:: https://github.com/twisted/incremental/actions/workflows/tests.yaml/badge.svg
|
||||
.. _gha: https://github.com/twisted/incremental/actions/workflows/tests.yaml
|
||||
|
||||
.. |pypi| image:: http://img.shields.io/pypi/v/incremental.svg
|
||||
.. _pypi: https://pypi.python.org/pypi/incremental
|
||||
@@ -0,0 +1,20 @@
|
||||
incremental-22.10.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
incremental-22.10.0.dist-info/LICENSE,sha256=0EO8iJm0aV3h9FEdj1B7kn4RcjuYHOYA-j73tzlUr6U,1945
|
||||
incremental-22.10.0.dist-info/METADATA,sha256=aE2SWQmPA0Uv1KtqIMZtB3SJGpP9aRHPybNQbDZhB44,6039
|
||||
incremental-22.10.0.dist-info/RECORD,,
|
||||
incremental-22.10.0.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
|
||||
incremental-22.10.0.dist-info/entry_points.txt,sha256=V66p2TqEwgXUOTD4jBnQMUaPoa5ikrknFbI4TLG9jzk,70
|
||||
incremental-22.10.0.dist-info/top_level.txt,sha256=dVpYwi6ag8TlocBDEAfD7HydlIWoVmh6ESMv04izUdc,12
|
||||
incremental/__init__.py,sha256=15HKscHXNYqiyxyf4PT0n9FaWsDeb54YRFsfL42aPHI,11093
|
||||
incremental/__pycache__/__init__.cpython-39.pyc,,
|
||||
incremental/__pycache__/_version.cpython-39.pyc,,
|
||||
incremental/__pycache__/update.cpython-39.pyc,,
|
||||
incremental/_version.py,sha256=OVo-Va6V18S4UR-riZC8hdS7DwL5_BYpTX_b3izDTl8,273
|
||||
incremental/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
incremental/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
incremental/tests/__pycache__/__init__.cpython-39.pyc,,
|
||||
incremental/tests/__pycache__/test_update.cpython-39.pyc,,
|
||||
incremental/tests/__pycache__/test_version.cpython-39.pyc,,
|
||||
incremental/tests/test_update.py,sha256=GtKIbAs3Cl7IFWJyGMlXX81oRKYbLPXWXKop4EDr0M0,34010
|
||||
incremental/tests/test_version.py,sha256=2V6qI9ELyYGDLOTuxZT5sxk9Oe6n4dSFruvdneNdSh4,18554
|
||||
incremental/update.py,sha256=yycUL1ra_CZOYpWdRWECU66a-cMcTycWqvIwygeyZnM,8882
|
||||
@@ -0,0 +1,6 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.37.1)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py2-none-any
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
[distutils.setup_keywords]
|
||||
use_incremental = incremental:_get_version
|
||||
@@ -0,0 +1 @@
|
||||
incremental
|
||||
Reference in New Issue
Block a user