我正在尝试为setup.py
具有公共和私有依赖项的私有项目编写安装文件。公共的托管在 PyPI 上,而私有的托管在运行simplepypi的服务器上。
我希望在安装过程中解析和获取公共和私有依赖项。
因此,我将依赖项添加到setup.py
:
setup(
...
install_requires = [
# public dependencies
'argparse==1.2.1',
'beautifulsoup4==4.1.3',
'lxml==3.1.0',
'mongoengine==0.8.2',
'pymongo==2.5.2',
'requests==1.1.0',
'Cython==0.18',
# private dependencies
'myprivatepackage1',
'myprivatepackage2'
],
dependency_links=['http://pypi.myserver.com/packages'],
...
)
我使用命令构建包 tarballpython setup.py sdist
并使用pip install --verbose path/to/tarball.tar.gz
.
但是,pip 日志行在任何地方都没有提到我的私有 PyPI 服务器,而且https://pypi.python.org/simple/似乎已经被查询了两次。
Running setup.py egg_info for package from file:///home/b/code/mapado/mypackage/dist/mypackage-0.5.1.tar.gz
running egg_info
creating pip-egg-info/mypackage.egg-info
writing requirements to pip-egg-info/mypackage.egg-info/requires.txt
writing pip-egg-info/mypackage.egg-info/PKG-INFO
writing top-level names to pip-egg-info/mypackage.egg-info/top_level.txt
writing dependency_links to pip-egg-info/mypackage.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/mypackage.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/mypackage.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pip-egg-info/mypackage.egg-info/SOURCES.txt'
Downloading/unpacking myprivatepackage (from mypackage==0.5.1)
Could not fetch URL https://pypi.python.org/simple/myprivatepackage/: HTTP Error 404: Not Found (myprivatepackage does not have any releases)
Will skip URL https://pypi.python.org/simple/myprivatepackage/ when looking for download links for myprivatepackage (from mypackage==0.5.1)
Could not fetch URL https://pypi.python.org/simple/myprivatepackage/: HTTP Error 404: Not Found (myprivatepackage does not have any releases)
Will skip URL https://pypi.python.org/simple/myprivatepackage/ when looking for download links for myprivatepackage (from mypackage==0.5.1)
Could not find any downloads that satisfy the requirement myprivatepackage (from mypackage==0.5.1)
Cleaning up...
我错过了什么?