Void python package deliberately composed along with this guide
Intended to be a future reference for creating a clean structured packages
Contains Windows-specific scripts
- clone the repo / download the source distribution
cdto project directorypip install .
- 'src-less' package layout
- packages are declared statically:
packages=[...](withoutfind_packages()) - package version is specified statically:
version=...(only insetup.py) README.mdis automatically copied intolong_description- distribution contents are declared by
MANIFEST.in(not bypackage_dataargument) - deps are declared in
setup_requires(norequirements.txt) - extra deps for testing are specified with
extras_require. Usage:pip install samplepackage[test] setup.pyis protected against unintended imports (prevents issues with editable installs)- sample
/testsdirectory containing tests to check that:pytestis able to import the packagemodule.pycan accessres/test_res.txt
- learn how to create clean and maintainable python package
- provide a reference for creating, installing, maintaining, testing and distributing a package in future
- provide a template for future python packages
- clone the repo / download the source distribution
cdto project directorypip install .[test]
To run tests, there are 3 options:
- Test local package:
python -m pytest - Test installed package:
pip install .andpytest - Test editable install:
pip install -e .andpytest