1👍
There are many ways, but not all of them are clean/easy/possible.
If those dependencies are on github, bitbucket, or a similar code repository, you can:
- fork the dependency,
- edit your fork,
- point to the fork in your
requirements.txt
file.
This will allow you to track further changes to those dependencies, and easily merge your own modifications with future versions.
Otherwise, you can include the (modified) dependencies with your code. It’s not very clean and increases the size of your app, but that’s fine too.
Last but not least, you can write a very hackish postinstall
script, to locate the .py file to be modified (e.g. import foo ; foopath = foo.__file__
), then apply a patch on that file. This would probably cause most sysadmins to cringe in terror, but it’s worth mentioning 🙂
1👍
If you are using a requirements.txt
, no, there is not a way to do that from pypi, since Dotcloud is simply downloading the packages you’ve specified from pypi, and obviously your changes within your virtualenv are not going to be reflected by the canonical versions of the packages.
In order to use the edited versions of your dependencies, you’ll have to bundle them into your code like any other module you’ve written, and import
them from there.
- [Answered ]-Appending a 0 in front of a variable in Python
- [Answered ]-Django Models : same object types, different field types
- [Answered ]-Django login required not happening