Closed jamespacileo closed 13 years ago
I'd love to be able to git clone a mezzanine-starter-project, cd into the directory, and do a pip install -r requirements/project.txt.
As someone who uses a different toolset (mercurial and setuptools) I could use a hand here - where should the requirements file sit, inside the root of the project and therefore outside of the mezzanine package? Or in the root of the mezzanine package?
You can see the requirements inside setup.py as it stands now, I guess it the formats are compatible, it would be good to have setup.py just pull in the list from the requirements directory.
Thanks for you help.
Stephen, if you have the chance, take a look at pip. It's a wrapper around setuptools and once you've played with it, you won't be able to go back to easy_install.
pip is actually a wrapper around both setuptools and distribute, so no real extra work needs to be done on your part.
Here's an example requirements.txt that could be placed in the root of the project_template directory. The commented out lines allow you to install grappellisafe directly from the github repo. I always do this since I end up needing to fix grappelli to work for me. Note that just running pip install mezzanine will install filebrowser and grappelli, so the only extra dependency pulled in is PIL. But I consider a requirements.txt file a best practice for deployment so it's good to have it in there. Why is mezzanine included in the requirements.txt, well for me at least I create the project using the mezzanine command, then create an empty virtualenv, then install pip install everything that the project depends on. This allows the project to not depend on a global install of anything. So I can deploy a project into it's own space and know that it's up to date.
Note that the git links could he hg links as well. The activity just seems to be here.
Django>=1.1 PIL==1.1.7 filebrowser-safe>=0.1.1 grappelli-safe>=0.1.7
Mezzanine==0.11.1
It seems that pip will pick up dependencies from a package's setup.py when installed. Given that would it suffice to simply include a requirements file with only Mezzanine listed?
If it's addressing Audrey's request to be able to clone a project than that would really be all that would be necessary. (AFAIK) I think the only other "out-of-the-box" requirement is PIL. I say "out-of-the-box" just because the template project will not start without it. And really, who has a CMS or eCommerce site without images? :) But maybe I am missing the point..
Thanks for the helpful info. I've added an auto-generated requirements file:
mezzanine/project_template/requirements/project.txt
A PIP requirements file would be very useful.