A simple importable Python package
Project description
This repository demonstrates steps needed to publish an importable Python package first to TestPyPI, and second to PyPI. If this demonstration deviates from best practice in any way, please submit an issue on GitHub.
Inside import-ready is a package called huntsville_havoc
that divulges a couple of bona fide secrets that most diehard SPHL Huntsville Havoc fans don't know.
Publish to TestPyPI
Follow these general suggestions to publish your Python package to TestPyPI:
- Prepare your environment before installing Python packages.
- Update version in setup.py per semantic versioning guidance. Match this version in the
tests/requirements_test_*.txt
files used below. - Git commit, tag, & push all desired edits for release.
- Create a new release in GitHub to mirror your new version.
- Generate distribution archives for your package.
- Upload your package to TestPyPI.
Test import-ready
Test import-ready from two different perspectives:
- Unit tests: Development time, pre-publish test. Run as follows from the top level directory in a clean venv:
python -m pip install -r requirements_travis_ci.txt python -m pytest -s tests
- Package tests: Post-publish test, importing import-ready itself back from TestPyPI. Run as follows from inside the
tests
directory in a clean venv:python -m pip install -r requirements_test_TestPyPI.txt python -m pytest -s
Publish to PyPI
After completing the above steps, upload your package to PyPI.
Test the real deal
Post-publish test, importing import-ready itself back from PyPI. Run as follows from inside the tests
directory in a clean venv:
python -m pip install -r requirements_test_PyPI.txt python -m pytest -s
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for import_ready-0.9.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99d50f32a820c16f68395b800d0b583ab56cb7437d19a9d89625b9f339e851a8 |
|
MD5 | d96eaf044826fe3dcef729c180b54d2f |
|
BLAKE2b-256 | daf4776ee73cd9ad9aae36f1025dd2bd9080eadc4ab02e4f95fdda6fa3bdf2d5 |