setup_utility
Utility functions for setuptools utilities - my standard source checks, testing, cleanup, deployment, etc.
See LICENSE for important licensing information.
Installing
Your setup.py will need jfaleiro.setup_utility to start - so you either make sure you have it pre-installed using pip:
pip install jfaleiro.setup_utility
or add this on the very top of your setup.py and forget about it moving forward.
try:
import setup_utility
except ModuleNotFoundError as e:
from pip._internal import main
assert main('install jfaleiro.setup_utility'.split()) == 0
from setup_utility import (
BehaveTestCommand,
CleanCommand,
LicenseHeaderCommand,
version_from_git,
)
and
cmd_classes = {
'license_headers': LicenseHeaderCommand,
'behave_test': BehaveTestCommand,
'clean': CleanCommand,
}
Using
python setup.py --help-commands
You should have commands license_headers, clean, and behave_test listed. To know what you can configure try python setup.py <command> --help:
python setup.py license_headers --help
You can use command line parameters or add the same commands on setup.cfg:
[license_headers]
header-file = HEADER
[aliases]
test=pytest
[tool:pytest]
addopts = --cov=setup_utility --cov-report html
You can also produce your version number from standard git information (tag, branch name, and number of differences):
setup(
...
version=version_from_git(),
...
)
Release tags release/<version> with nnn differences from master will produce version <version>.dev<nnn> and a tagged version <tag> on master will produce the version <tag>. Everything else will produce master.dev<nnn> for master or no-version.dev<nnn> for any other branch.
Enjoy.
Metadata
Release files for jfaleiro.setup-utility 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jfaleiro.setup_utility-0.0.1.tar.gz | 17.1 kB | Without provenance | Details for jfaleiro.setup_utility-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jfaleiro.setup_utility-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for jfaleiro.setup_utility-0.0.1-py3-none-any.whl |
Total release size: 33.6 kB
Release files / jfaleiro.setup_utility-0.0.1.tar.gz
| Download URL | jfaleiro.setup_utility-0.0.1.tar.gz |
|---|---|
| Size | 17.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28c2a263274ea384b0280f015347bc26f12e000c86cf0d849ed4c5080acd968c
|
|
BLAKE2b-256 checksum How to use checksums |
662c82593035212eecdc7bf91ab22e4cfcf9156108f1610954dad3d5a503f3cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Release files / jfaleiro.setup_utility-0.0.1-py3-none-any.whl
| Download URL | jfaleiro.setup_utility-0.0.1-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
059afe7da8465a5c7f40935fd136dec1ed7905cbeb87edf074f79fed756aec37
|
|
BLAKE2b-256 checksum How to use checksums |
99670c0ccbf5ee823ac1f0e225380797507ff508c9cada042ef411d5951baa09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Security for jfaleiro.setup-utility 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.