UNKNOWN
Project description
Incremental is a small library that versions your Python projects.
Quick Start
Add this to the top of your setup.py, assuming your code is called widgetbox:
my_project = 'widgetbox'
import os, importlib
def install_incremental():
import importlib
try:
importlib.import_module('incremental')
except ImportError:
import pip
pip.main(['install', 'incremental>=0.1.0'])
finally:
globals()['incremental'] = importlib.import_module('incremental')
install_incremental()
# PICK ONE OF:
# If you have a src/ dir
base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "src")
# If you do not
src_dir = os.path.dirname(__file__)
version = incremental.get_version_from_project(my_project, src_dir)
And in the setup call, add:
setup(
name=my_project,
version=version.base(),
...
}
Then in your project add a _version.py that contains:
from incremental import Version
__version__ = Version("widgetbox", 1, 2, 3)
__all__ = ["__version__"]
Then in your project’s __init__.py add:
from ._version import __version__
Subsequent installations of your project will use incremental for versioning.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
incremental-15.0.0.tar.gz
(9.5 kB
view hashes)
Built Distribution
Close
Hashes for incremental-15.0.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41324606c7fbf51b5c0b70e3b1fe448b9fc6d8ef89dc42acc80f7015845a88db |
|
MD5 | 4a3e1094804eb9998c43097241025823 |
|
BLAKE2b-256 | 3564f641578af2596655b730b686f8c31ae223f7b94d1b2ad7a92ad8677f6a2a |