Getting setuptools to ignore PyPI repository

孤人 提交于 2019-12-11 01:48:41

问题


I have in my packages setup.py:

from setuptools import setup

setup(
    dependency_links=['http://local.mirror'],
    install_requires=[
        'many',
        'different',
        'packages',
    ],
    ...
 )

What seems to happen is that setuptools will load entries from install_requires in reverse order, and it will respect the dependency_links entry for only the last entry in install_requires (it installs things in reverse order).

There's plenty of discussion about how to add packages that aren't in PyPI, but I can't seem to find my way about ensuring that my local entry is used first, or exclusively.


回答1:


Placing the following setup.cfg file in the same location as setup.py has addressed this:

[easy_install]
allow_hosts = local.mirror


来源:https://stackoverflow.com/questions/13299439/getting-setuptools-to-ignore-pypi-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!