This example covers a nice setup.py file, which gets name and description for the PyPI from the docstrings in itself as well as in the main file (babtools_EXAMPLE.py).
The changelog is automatically extracted from the file Changelog.txt and appended to the long description for the PyPI.
- To customize it, you need to change the following:
The first line of this files docstring - it will be your name and description in PyPI. You must keep the dash (” - “) as seperator between name and description to make getting name and description work.
Every occurrence of “babtools_EXAMPLE” in this file to the name of your module
- Author, author_email, etc. in setup() to your preferred settings.
A list of all classifiers can be found via python setup.py register –list-classifiers
This docstring to a mainly static description of your program.Things which may change at times should go into your main file (here it’s babtools_EXAMPLE.py).
Your main files docstring, which provides the second paragraph (its first line is ignored).
For updating your PyPI entry to a new version, you only need to change the __version__ parameter in your main file (here it is babtools_EXAMPLE.py) and then run “python setup.py register” (no file release) or “python setup.py register sdist upload” to include a file release (sources).
- Usage:
babscript.py
for default usage, or
babscript.py –help
for getting help
- Examples:
babscript.py
Print the help message, since we have nothing else to do right now.
- Plans:
None. At the moment I’m happy with this structure.
- Ideas:
Adding information, how to use Mercurial to use this structure in your own project and keep it up to date while keeping your changes.
Source URL (Mercurial): U{http://freehg.org/u/ArneBab/babtools_EXAMPLE/}
PyPI URL: U{http://pypi.python.org/pypi/babtools_EXAMPLE}
Changelog:
babtools_EXAMPLe 0.9
Added plans and ideas to the main file.
babtools_EXAMPLE 0.8
Added customization instructions.
babtools_EXAMPLE 0.7
Removed the title in the batools_EXAMPLE file from the PyPI description.”
babtools_EXAMPLE 0.6
Improved code comments.
babtools_EXAMPLE 0.5
Some cleaning up.
babtools_EXAMPLE 0.4
Improved description on PyPI.
babtools_EXAMPLE 0.3
Better documentation.
Removed the name from the description for PyPI.
babtools_EXAMPLE 0.2
Now reading changes from Changelog.txt
babtools_EXAMPLE 0.1
Created working example structure.
Metadata
Release files for babtools_EXAMPLE 0.9
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 | |
|---|---|---|---|---|
| babtools_EXAMPLE-0.9.tar.gz | 3.6 kB | Without provenance | Details |
Release files / babtools_EXAMPLE-0.9.tar.gz
| Download URL | babtools_EXAMPLE-0.9.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28c5c0b7501594b71a34ac6e9ffd31ee53b196bdd3f84e40309d94435fa17a83
|
|
BLAKE2b-256 checksum How to use checksums |
59a54e88e80b0881c8739ee51c259d55fa187d55395993b5df48acefb073a7dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for babtools_EXAMPLE 0.9
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.