Or to checkout a specific branch just add branchname at the end: pip. I have to manually uninstall the package ( pip3 uninstall anotherpackage) and run pip3 install -e. PIP install from local git repository pip install git+ file : ///path/to/your/git/repo. again it doesn't detect the change (even when run with -upgrade). ![]() I also learned from the pip source code that the actual revision/branch/tag can be specified by appending so I can specify for example the tag 0.0.1 with the following in only issue that I still have is that when I change the revision and run pip3 install -e. So I fixed it then I was getting a different error - this time git command (invoked by pip) was complaining about repository URL checked the git documentation for the ssh:// URLs format and found out that hostname and organisation parts must be separated with / instead of URL works fine. The general form for the packages with URLs is and the URI must start with a ://. ![]() If there is any other recommended solution for my problem I would like to learn about it :)Īfter checking pip source code I found the correct syntax for private BitBucket repositories. It works but is suboptimal as I have to keep both setyp.py and requirements.txt in sync. I have a requirements.txt file with: -e I use pip3 install -r requirements.txt instead of pip3 install -e. It is currently a development version, so not in pips repositories. requirements.txt file with entries duplicated from install_requires entries According to documentation I've found, PEP 508 URLs should be used instead. I have already tried to use: dependency_links they are deprecated and they are ignored by pip3 install -e. Some additional insights into the internals of setuptools and. refers to the current working directory, so together, it means to install the current directory (i.e. Although somewhat cryptic, -e is short for -editable, and. I need to use ssh protocol for git URLs as all the users have their ssh keys configured and it would be cumbersome to ask all the users to configure their app passwords in BitBuckets (I have 2FA required and the regular user password doesn't work). Assuming you’re in the root of your project directory, then run: pip install -e. I would like to avoid the necessity for hosting my own PIP repository in the organisation and thus I am trying to use git URLs directly. I have an internal Python project that depends on multiple internally developed Python packages. What is the correct syntax for PEP 508 URLs with git+ssh protocol for install_requires dependency for private git repositories (in this case hosted on BitBucket)? What is the syntax for specifying a specific branch, tag or sha? More context to avoid XY problem I guess it is correct about the format of my URL as PEP 508 doesn't allow specifying git user name for ssh clone URLs. ![]() In my Python project where I have the following setup.py: from setuptools import it fails with: error in mypackage setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers Invalid URL given
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |