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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file incremental-15.0.0.tar.gz.
File metadata
- Download URL: incremental-15.0.0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01df6dc39d6d0adaf2880ccb032a77d572143eeb0db1993dfbf3eb282ec1a8af
|
|
| MD5 |
3e81d70e5cacdf569568e9c0811c2f6f
|
|
| BLAKE2b-256 |
a6a995c310b8c082d129fe8b433a38e75d257dc3bc280921de823c95665e0f21
|
File details
Details for the file incremental-15.0.0-py2-none-any.whl.
File metadata
- Download URL: incremental-15.0.0-py2-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41324606c7fbf51b5c0b70e3b1fe448b9fc6d8ef89dc42acc80f7015845a88db
|
|
| MD5 |
4a3e1094804eb9998c43097241025823
|
|
| BLAKE2b-256 |
3564f641578af2596655b730b686f8c31ae223f7b94d1b2ad7a92ad8677f6a2a
|