Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specific GIT app as PIP package install requirement

I have this app https://github.com/staticdev/django-crud-utils that need to have django-sorting installed to work. But it can't be the original django-sorting, but a fork I made: https://github.com/staticdev/django-sorting

How do I put it in the setup.py file for packaging?

Tks.

like image 924
staticdev Avatar asked Aug 27 '12 12:08

staticdev


2 Answers

Edit your setup.py and add an entry to dependency_links:

dependency_links = [
    'https://github.com/staticdev/django-sorting/tarball/master#egg=django-sort',
],

While your install_requires has something like:

install_requires=[
    'Django>=1.3.1',
    'django-pagination>=1.0.7',
    'django-sort',
],

If you want to use requirements files, follow Yuval Adam's advice.

like image 161
Hugo Tavares Avatar answered Oct 14 '22 04:10

Hugo Tavares


Include it as an editable requirement, and note that you must explicitly mention the egg name:

-e git+https://github.com/staticdev/django-sorting#egg=django-sorting

For more options see http://www.pip-installer.org/en/latest/requirements.html

like image 8
Yuval Adam Avatar answered Oct 14 '22 04:10

Yuval Adam