我正在尝试创建我的第一个python包。为了不打乱整个交易,我一直试图将其上传到testpypi服务器。这似乎很好(sdist创建和上传没有显示任何错误)。但是,当我尝试从https://testpypi.python.org/pypi将其安装到新的virtualenv时,它抱怨我的安装要求,例如:
pip install -i https://testpypi.python.org/pypi poirot
Collecting poirot
Downloading https://testpypi.python.org/packages/source/p/poirot/poirot-0.0.15.tar.gz
Collecting tqdm==3.4.0 (from poirot)
Could not find a version that satisfies the requirement tqdm==3.4.0 (from poirot) (from versions: )
No matching distribution found for tqdm==3.4.0 (from poirot)
tqdm和Jinja2是我唯一的要求。我尝试指定版本,但未指定-每种方式都出错。
看来它正在尝试在testpypi服务器上找到tqdm和Jinja2而不是找到它们(因为它们仅在常规pypi上可用)。将软件包上传到非测试服务器并运行pip install即可。
在上传到testpypi时,我需要添加到setup.py文件(如下)中以查找需求的什么内容?
谢谢!
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='poirot',
version='0.0.15',
description="Search a git repository's revision history for text patterns.",
url='https://github.com/dcgov/poirot',
license='https://raw.githubusercontent.com/DCgov/poirot/master/LICENSE.md',
packages=['poirot'],
install_requires=['tqdm==3.4.0', 'Jinja2==2.8'],
test_suite='nose.collector',
tests_require=['nose-progressive'],
classifiers=[
'Environment :: Console',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
],
include_package_data=True,
scripts=['bin/big-grey-cells', 'bin/little-grey-cells'],
zip_safe=False)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句