3 ms·
For dependency management needs, 99% of what you need can be done easily with vanilla virtualenv, vanilla pip, vanilla setup.py, and a Makefile. A small shell w
by 0xbadcafebee 7y ago
For dependency management needs, 99% of what you need can be done easily with vanilla virtualenv, vanilla pip, vanilla setup.py, and a Makefile. A small shell wrapper that sources bin/activate and runs your Python app is all you need to allow anyone to run your code without additional steps.
The biggest problem with Python packages isn't a dependency manager, it's that Python developers don't reuse and extend existing projects. They just keep churning out new similar projects with different features. All of the most commonly used Python packages are basically one-offs that use a bunch of other one-offs. This creates a cycle of reinventing the wheel and friction in ramping up on existing technology, due to all the extra integration work and split development, and later lift-and-shift into completely different dependencies that implement the same thing. PyPI is awash with duplicate abandoned one-offs to the point that just trying to just find a useful module to do what you want can take a long time.
- bbmario 7y ago> done easily with vanilla virtualenv, vanilla pip, vanilla setup.py, and a Makefile I wouldn't call that "easy", but OK.
- 0xbadcafebee 7y agoWould you consider this easy? # Makefile venv: python3 -m virtualenv --version 1>/dev/null 2>/dev/null || \ ( echo "Please install virtualenv (python3 -m pip install virtualenv wheel setuptools)" && false ) [ -d venv.d ] || python3 -m virtualenv -p python3 venv.d ./venv.d/bin/pip install -r requirements.txt $ make venv # Running your project without setup.py $ ./venv.d/bin/python3 my-program.py # Running your project with setup.py $ ./venv.d/bin/pip install . $ ./venv.d/bin/my-program.py The setup.py you can copy from another project and customize to your liking.