简体   繁体   中英

Installing Python package from version control where setup.py is not in the project root

I'm trying to include the pyobjc package in my pip requirements file, but I need a committed version that doesn't have a release yet in order to pull in a much needed bug fix. The pyobjc package is a pseudo-package to install all the other framework dependencies.

I can specify the HG path in the pip requirements just fine. The problem I'm facing is that the repository doesn't have a setup.py in the root directory. Instead it has a subdirectory labeled pyobjc (with all the framework subdirectories alongside) that contains setup.py. In the root directory of the repo, there's a file labeled install.py that pyobjc's readme recommends using when installing from source.

Does anyone have any idea how to call install.py from pip instead of setup.py or point to the subdirectory location?

In the pyobjc/pyobjc subdirectory I see setup.py , not `install.py.

pip can be advised to look into a subdirectory of a VCS repository for setup.py :

pip install -e 'hg+https://bitbucket.org/ronaldoussoren/pyobjc@39c254b20bf2d63ef2891cb57bba027dfe7e06e8#egg=pyobjc&subdirectory=pyobjc'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM