I'm dipping into both Rails and a Python project right now (non-Django), both for the first time, and had difficulty "listing required packages to go along the source" in Python.
I looked into pip, but it seems I have to package my src into a Python module and install that. setup.py doesn't make sense for my project since it's not a module meant for redistribution. I intend to use py2exe. Basically I just need a way to install dependencies for development.
foreach thing in file
pip install thing
is the best that I can come up with. This is admittedly not terrible, but I feel like there is a better way and I just don't know about it.
Can I use pip to just install the dependencies without packaging my project as a module? I understand that pip installs "my module" to site packages or a directory under virtualenv. This is not what I need. I don't have a "my module" to install. I just need to make sure that the dependencies are installed on the machine/virtualenv that I'm using for development.
I studied the requirement file documentation and I couldn't find a solution. It seems that to take advantage of this feature in pip I have to write a setup.py, and as I've mentioned that really doesn't make sense for my type of project. Or am I misunderstanding something?
Now whenever you go to develop, pip install -f requirements.txt, when you update dependent packages, pip freeze.
You are by no means required to make your source code a module or anything like that. If you use the above with a virtualenv you can isolate different models for different projects and have them frozen at different versions. You are also able to modify requirements.txt to include version specific information. packagename==3.4.0 now locks packagename to 3.4.0 when pip goes to install it.
In Rails/Ruby I can use Bundler:
I'd like to do the same for a python project: I looked into pip, but it seems I have to package my src into a Python module and install that. setup.py doesn't make sense for my project since it's not a module meant for redistribution. I intend to use py2exe. Basically I just need a way to install dependencies for development. is the best that I can come up with. This is admittedly not terrible, but I feel like there is a better way and I just don't know about it.