Shortening the boilerplate in Tryton modules
Tryton modules normally contain and require a lot of boilerplate in setup.py. Not only this is a lot of duplicate code, also it is a burden to maintain this between different versions of Tryton.
This package allows moving most all the meta-data and options being somewhat “static” between Tryton modules and Tryton Versions into setup.cfg and using a quite terse setup.py only.
trytoncommunity-setuptools also supports the ‘module prefix mapping` quite some developers and integrators use.
Example setup.py:
from trytoncommunity_setuptools import setup, get_require_version
requires = ['lxml']
tests_require = [
get_require_version('proteus'),
'pycountry',
]
setup('trytoncommunity', 'country_order',
requires=requires, tests_require=tests_require)
Corresponding example setup.cfg:
[metadata] ; name will be filled by trytoncommunity-setuptools description = Precedence rating for countries in Tryton long_description = file: README.rst long_description_content_type = text/x-rst url = https://tryton.community author = Hartmut Goebel author_email = h.goebel@crazy-compilers.com license = GPL-3.0-or-later license_files = LICENSE-GPL-3.0.txt keywords = tryton, country classifiers = Development Status :: 5 - Production/Stable License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) Natural Language :: English Natural Language :: German ;; These classifiers will be added by trytoncommunity-setuptools, ; Environment :: Plugins ; Framework :: Tryton ; Intended Audience :: Developers ; Programming Language :: Python :: … filled according to Tryton version ; Programming Language :: Python :: Implementation :: CPython ; Topic :: Office/Business ; Operating System :: OS Independent [options] ;python_requires = … # filled by trytoncommunity-setuptools ;include_package_data = True # enforced by trytoncommunity-setuptools ;zip_safe = False # enforced by trytoncommunity-setuptools
When using a PEP 517 compliant build tool e.g. build, you need to also provide a pyproject.toml file:
[build-system] requires = ["trytoncommunity-setuptools >= 0.3"] build-backend = "setuptools.build_meta:__legacy__"
Metadata
Release files for trytoncommunity-setuptools 0.4.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 |
|---|---|---|---|---|
| trytoncommunity_setuptools-0.4.1.tar.gz | 27.7 kB | Without provenance | Details for trytoncommunity_setuptools-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trytoncommunity_setuptools-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for trytoncommunity_setuptools-0.4.1-py3-none-any.whl |
Total release size: 33.9 kB
Release files / trytoncommunity_setuptools-0.4.1.tar.gz
| Download URL | trytoncommunity_setuptools-0.4.1.tar.gz |
|---|---|
| Size | 27.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74de6085bfd74602295f5ab1d8439c44f2e5dc7524b19aa223d51af135a4449e
|
|
BLAKE2b-256 checksum How to use checksums |
9ef07d900de453bf9e3d71556d4f883fa8c5c3ea098c92222566668f78776cfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / trytoncommunity_setuptools-0.4.1-py3-none-any.whl
| Download URL | trytoncommunity_setuptools-0.4.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
862549a2218fecd880c7becd326cdb230d84b322b86785be2444ccd8e39ea305
|
|
BLAKE2b-256 checksum How to use checksums |
aeca881ed4e2bae6fb3d90b65d998e306fa15fb99d4fc0d8a3ec08afd404a571
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for trytoncommunity-setuptools 0.4.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.