I have a django project set up in a virtual environment. I want to turn into a package (may be a tar), which I will just make available for download so that any one can just download, extract & run the project without any hassles of installing dependencies.
Asked
Active
Viewed 1,579 times
1
-
2No, because virtualenvs are not relocatable and are tied to platform you are running on. Just provide them with a `requirements.txt` instead. – Martijn Pieters Apr 27 '15 at 13:02
-
1See [What parts of a virtualenv need to be changed to relocate it?](http://stackoverflow.com/q/6820109) – Martijn Pieters Apr 27 '15 at 13:02
1 Answers
1
No, you shouldn't just simply make a tar of your django project and distribute it. In the original documentation of Django there are instructions how reusable apps can be packaged and distributed. An explanation here would go beyond the scope of an answer. Please check the particular part of the documenation:
https://docs.djangoproject.com/en/1.8/intro/reusable-apps/
You can provide the dependencies for your package, which will be then automatically installed by pip
.

cezar
- 11,616
- 6
- 48
- 84
-
I don't see why not though, some of the reason's why crappy wordpress sites are so popular is that they can be easily redistributed. Django-Oscar is an entire ecommerce application that can be installed via PIP. – Chris Hawkes Apr 27 '15 at 13:08
-
@ChrisHawkes yes, installing by pip is fine; that's not what OP asked. As Martijn says, put the deps in a requirements.txt file. – Daniel Roseman Apr 27 '15 at 13:16
-
oh okay, thanks. This is good to know, since I've thought about this before. I'll read up on that link. – Chris Hawkes Apr 27 '15 at 13:17