我正在尝试构建一个包并将其上传到pypi,我已经过了这一点并且上传成功,让我引导您完成我正在做的事情:
setup.py
:
from setuptools import setup, find_packages
setup(
name='project_name',
version='1.0',
packages=find_packages(),
url='url',
license='license',
author='author',
author_email='email_here@some_mail.com',
description='description',
install_requires=[
'oauth2client',
'pyarrow',
'pandas',
'requests',
'gcloud'
],
)
我愿意:
% python3 setup.py sdist bdist_wheel
其次是
% python3 -m twine upload -u username -p password --repository-url https://test.pypi.org/legacy/ dist/*
两者都运行得很好,没有错误/警告......
然后我得到一个包含以下内容的网址:
% pip install -i https://test.pypi.org/simple/ project_name==1.0
所以我创建一个virtualenv环境并尝试安装:
% virtualenv test_env
% source test_env/bin/activate
% pip install -i https://test.pypi.org/simple/ project_name==1.0
出于某种原因,我一开始就明白了:
ERROR: Could not find a version that satisfies the requirement gcloud (from project_name==1.0) (from versions: none)
ERROR: No matching distribution found for gcloud (from project_name==1.0)
然后,在重试(未应用任何更改)运行最后一个命令后,我得到了其他结果,并且还得到了其他结果。那么……怎么了?
米琪卡哇伊
相关分类