Python sample package with data
How to distribute a Python package with data.
Tested on Ubuntu 19.10, Python 3.7.5, wheel==0.32.3, setuptools==41.1.0, twine==3.1.1.
How end users use the package from https://pypi.org/project/python-sample-package-with-data/:
python3 -m pip install --user python-sample-package-with-data
python-sample-package-with-data
Expected output:
hello data
How maintainers publish it:
# One time setup.
python3 -m pip install --user setuptools wheel twine
# Every time you want to publish.
python setup.py sdist bdist_wheel
twine upload dist/*
Bibliography:
- https://stackoverflow.com/questions/47577762/how-do-i-distribute-my-pip-package-with-data-files-correctly
- https://stackoverflow.com/questions/47817944/python-pkg-resources-and-file-access-in-packages
- https://stackoverflow.com/questions/39104/finding-a-file-in-a-python-module-distribution
- https://stackoverflow.com/questions/14211575/any-python-function-to-get-data-files-root-directory
- https://stackoverflow.com/questions/14422340/manifest-in-package-data-and-data-files-clarification
- https://stackoverflow.com/questions/3596979/manifest-in-ignored-on-python-setup-py-install-no-data-files-installed/3597263#3597263
- https://stackoverflow.com/questions/11235820/setup-py-not-installing-data-files
Metadata
Release files for python-sample-package-with-data 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-sample-package-with-data-0.0.2.tar.gz | 2.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_sample_package_with_data-0.0.2-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 4.8 kB
Release files / python-sample-package-with-data-0.0.2.tar.gz
| Download URL | python-sample-package-with-data-0.0.2.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
911a9557eaee07de7df5917f6fefed65ac7fc0d2905a1e233dfc31948f656d74
|
|
BLAKE2b-256 checksum How to use checksums |
2573f7bbbb979e129123ed1f4c33a77d9e2fc6aa4d8dcc9419cdb326ead9ca5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.7.5
|
Release files / python_sample_package_with_data-0.0.2-py2-none-any.whl
| Download URL | python_sample_package_with_data-0.0.2-py2-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
b87ca1e6337e6e32074575f99d785c89d505b299ed4de2869f0b0ceadc7338b5
|
|
BLAKE2b-256 checksum How to use checksums |
bc638ccf9eb8753423bfc9fda6e1a04c2a214f75ea0d88b838d78cd3d917ad8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.7.5
|