2
votes

Preface The official python package python-openid (as distributed through pypi.org) does not work with Google Apps. Somebody wrote a fix to this and uploaded the patched source to github. Now I want to create a package which should link to this forked package.

Now when installing this package, everything is well. The forked package is installed and everything is fine. However, when doing a pip freeze, there is no mentioning of where the package came from. As the forked package should be used, including the official package breaks deployments. How can I link to a forked package in my own package and also list the forked package in pip freeze?

Update

Ok, so I created the tag 2.2.5-bouke0, created a distribution and uploaded it to github. My setup.py of the referencing package now looks like this:

dependency_links=[
    'http://github.com/Bouke/python-openid/downloads',
],
install_requires=[
    'python-openid == 2.2.5-bouke0',
],

When building and installing this package everything is fine. The referenced package is downloaded from github and installed correctly. However, pip freeze does not show where the package came from:

django-federated-login==0.1.3
python-openid==2.2.5-bouke0

As the version 2.2.5-bouke0 cannot be found on pypi, the deployment of such a requirements.txt will fail. How can I instruct pip freeze to reference the alternative source from where to get the package?

1

1 Answers

1
votes

Make a tag 2.2.5 in the repository.

Put -f https://github.com/adieu/python-openid/downloads into the requirements.txt file.

To be sure, change version number to something like 2.2.5-bouke1. Read semver.org for details.