The one thing that really pisses me off is that it's apparently impossible to package a project with all it's dependencies in Python. I'd love to use setup.py to create RPMs (it can do that out of the box), but I just can't figure out how to include the dependencies.
You can generate binary packages (wheels in python jargon) of all dependencies with pip wheel -r requirements --wheel-dir=wheels Create the wheel for the package with python setup bdist_wheel --dist-dir=wheels Then install them using pip install wheels/*.whl.
Hopefully PyPA will normalize the dependency and packaging situation over time, they've already made good progress with pip and pypi.org
I swear that at no point I came across anyone saying you could make all dependencies into a wheel or egg. This seems to do half of what I want (at least it's the harder half), as I'd still need to manually add my own project wheel to the one that is created, as it's not available on pypi.
51
u/ursvp Apr 30 '18 edited Apr 30 '18
egg vs wheel
universal vs pure wheel
setuptools vs distutils
install_requires vs requirements.txt
data_files vs MANIFEST.in
package vs distribution vs binaries
pip vs conda
install -e vs install
install from PyPI vs .git vs .tar.gz
build vs environment
virtualenv vs venv vs pipenv
for each above: python2 vs python3
2to3 vs six
absolute vs relative vs circular import
oh, pip is incapable of true dependency resolution
complexity behind
__version__... in contradiction of Pythonic principle of clarity and simplicity.