-1

Can't figure out how to install this pull request:

https://github.com/shamanu4/dal_admin_filters/pull/23

I tried to find last commit:

https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b

and run:

pip install git+https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b

but it returns:

Collecting git+https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b
  Cloning https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b to /tmp/pip-req-build-3uyhi6ui
fatal: repository 'https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b/' not found
Command "git clone -q https://github.com/shamanu4/dal_admin_filters/pull/23/commits/43f33db7c57058613a5410776575ce5f0f78357b /tmp/pip-req-build-3uyhi6ui" failed with error code 128 in None

How to make it work? There is a fix I need on my Django project.

phd
  • 82,685
  • 13
  • 120
  • 165
Milano
  • 18,048
  • 37
  • 153
  • 353
  • 2
    Possible duplicate of [Is it possible to use pip to install a package from a private github repository?](https://stackoverflow.com/questions/4830856/is-it-possible-to-use-pip-to-install-a-package-from-a-private-github-repository) – Torxed Feb 11 '19 at 18:49
  • 2
    @Torxed This is not a dup as the answer doesn't provide an URL to pull request. – phd Feb 11 '19 at 20:37
  • 2
    Possible duplicate of [pip: how to install a git pull request](https://stackoverflow.com/questions/13561618/pip-how-to-install-a-git-pull-request) – phd Feb 11 '19 at 20:38
  • https://stackoverflow.com/search?q=%5Bpip%5D+install+pull+request – phd Feb 11 '19 at 20:38
  • I solved this by installing pip install git+https://github.com/belonesox/dal_admin_filters which is his fork which have all fixes I need. – Milano Feb 12 '19 at 10:29

2 Answers2

2

You can do this with pip install git+https://github.com/shamanu4/dal_admin_filters.git@refs/pull/23/head

or more generally, pip install git+https://github.com/<USERNAME>/<REPO>@refs/pull/<PR>/head

George Ogden
  • 596
  • 9
  • 15
0

The commit is not pushed into master.

➜  dal_admin_filters git:(master) git checkout 43f33db7c57058613a5410776575ce5f0f78357b
fatal: reference is not a tree: 43f33db7c57058613a5410776575ce5f0f78357b
➜  dal_admin_filters git:(master)

You should follow the steps described here.

Else, you can simply edit the files locally I think. There aren't much changes

Else, you can create your own git repo, clone that repo and include the changes from the __init__.py. However, in that case you can't track changes committed to the repo.

Kevin C
  • 4,851
  • 8
  • 30
  • 64
  • 1
    The thing is that I want it to be in requirements.txt so it can be automatically installed so I would not prefer editing files locally. – Milano Feb 11 '19 at 19:28