I have a python program packaged with distutils, where a number of dependencies are specified in the setup.py file under the install_requires
section.
Up until now these python packages have been sourced from the default location on the internet. However, now I would like to use our internal Artifactory to source all python packages, and to throw an error if the dependency is not found in the internal Artifactory.
Is there a configuration option or ENV variable that may be changed to force distutils to source packages from an internal artifactory?
I would also like to force this requirement within certain virtual environments, such that pip will not install a package unless it can install it from the internal Artifactory
So you basically want to configure pip to use your internal Artifactory as index-url
.
Also you can try to restrict easy_install
with allow-hosts .
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.