Here is the example scenario.
There is a python package not-mine
and I have just found a small bug in it. I find the source code on github and fork the repository. I make the necessary changes and submit a pull request. Unfortunately the package author is on vacation and I have a deadline.
I need a way to install my forked repository rather than the authors version living on PyPI. I have tried the following with no success:
install_requires = [
'not-mine==1.0.0'
],
dependency_links = [
'http://github.com/my-username/not-mine/tarball/master#egg=not-mine-1.0.0'
]
What am I missing?
Resources I have stumbled on while investigating the issue: How can I make setuptools install a package that's not on PyPI?
Installing Python pip on your system allows you to manage PyPI packages easily. Many of these packages can be installed just by typing python -m pip install <package-name> into a terminal or command-line. Newer versions of Python 3 (3.4 and higher) and Python 2 (2.7. 9 and higher) come preloaded with pip.
You can deploy Git locally, or use it via a hosted service, such as Github, Gitlab or Bitbucket. One of the advantages of using pip together with Git is to install the latest commits of unreleased Python packages as branches from Github.
You should be able to point pip
at the URL of your forked repo with your bugfix because pip
can install directly from git repos.
$ pip install git+git://github.com/my-username/not-mine#egg=not-mine
You can modify the pip install
command to specify a particular commit, branch, tag, etc. with the "@" symbol before the "#".
$ pip install git+git://github.com/my-username/not-mine@bugfix_branch#egg=not-mine
If you just want to install your forked forked package on your system you can simply clone the package to your system and use python setup.py install
command to install that package locally on your system.
If you need to deploy application with your own modified package then, i recommend you to use the python virtual environment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With