Requirements
python3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
python3 -m pip install --upgrade setuptools wheel
Download repository:
git clone https://github.com/johanneskruse/pypi_template.git
Upload:
In pyproject.toml you can set the name of the pacakage
Run the following to upload:
Generating distribution archives
Stand inside the project, i.e.
cd pypi_template
Next build the package:
python3 -m build
This command should output a lot of text and once completed should generate two files in the dist directory:
dist/
├── sampleproject-0.0.1-py3-none-any.whl
└── sampleproject-0.0.1.tar.gz
Uploading the distribution archives
twine upload dist/*
The user name and the password is the following:
[pypi]
username = __token__
password = .....
Where you'll need to generate the API Token as password.
Go to https://pypi.org/ to see the package!
Inspiration
setup.py vs setup.cfg in Python
TODO:
- Setup with pyproject.toml file
- Note that if you want to install packages in editable mode (i.e. by running pip install -e .) you must have a valid setup.py file apart from setup.cfg and pyproject.toml. TRY TO RUN INSTEAD: pip install -e . -f .
Acronym Generator (help generate the name)
Release files for wolverines 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 | |
|---|---|---|---|
| wolverines-0.0.1.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wolverines-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 kB
Release files / wolverines-0.0.1.tar.gz
| Download URL | wolverines-0.0.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9c05fdfc5b6f7e066435d743a4e0e0dd542816c2d128f4ee6480fc4826d1447
|
|
BLAKE2b-256 checksum How to use checksums |
0a6d6486ea66ad056cff1ec5bbdbe7b6c338a10039a581a5f91ee5d6e6c394ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|
Release files / wolverines-0.0.1-py3-none-any.whl
| Download URL | wolverines-0.0.1-py3-none-any.whl |
|---|---|
| Size | 2.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ea0ef94415e38a58126453fa4a69891761161fb294d72e4d0d026488c932a66
|
|
BLAKE2b-256 checksum How to use checksums |
1ae68451a8e897321fc64f8b7abb3491f1982d90917217fc6c23616fea8cbdd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.8
|