0
我无法上传我的包到pypi。我以前可以只使用python setup.py sdist upload -r pypi
但现在导致一个错误:Pypi上传问题:必须是有效的Python标识符
Upload failed (400): requires: Must be a valid Python identifier.
error: Upload failed (400): requires: Must be a valid Python identifier.
我试过几件事情要得到这个工作,但是一切都已经失败,同样的错误。
我删除了当前的dist
,build
和egg
文件夹在我的根目录中。然后我增加了1个微版本的包版本号。我保证我的~/.pypirc
文件是应该按照指令:
[distutils]
index-servers =
pypi
[pypi]
username: c.welsh2
password: ...
和更新pip
,twine
和setuptools
。我创建一个使用一个构建
python setuptools.py bdist_wheel
这/package_root/dist/*
创建的构建和我尝试上传使用
twine upload dist/*
到PyPI中,我再次得到:
HTTPError: 400 Client Error: requires: Must be a valid Python identifier. for url: https://upload.pypi.org/legacy/
有谁知道是什么原因造成这个问题?
为了完整起见,这里是我的安装文件:
from distutils.core import setup
import setuptools
#version
MAJOR = 4
MINOR = 0
MICRO = 5
#=======
__version__ = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
setup(
name = 'PyCoTools',
packages = ['PyCoTools'], # this must be the same as the name above
version = __version__,
description = 'A python toolbox for COPASI',
author = 'Ciaran Welsh',
requires=['lxml','argparse','pandas','numpy','scipy','matplotlib.pyplot','scipy','seaborn','sklearn'],
package_data={'PyCoTools':['*.py','Documentation/*.pdf',
'logging_config.conf',
'Documentation/*.html','Licence.txt',
'ReadMe.md',
'Examples/KholodenkoExample/*',
'Examples/BioModelsWorkflowVersion1/*',
'Scripts/*.py',
'Tests/*.py',
'Tests/*.cps',
'PyCoToolsTutorial/*.pickle',
'PyCoToolsTutorial/*.py',
'PyCoToolsTutorial/*.ipynb',
'PyCoToolsTutorial/*.html',
'PyCoToolsTutorial/*.cps']},
author_email = '--<hidden>',
##
url = 'https://pypi.python.org/pypi/PyCoTools',
keywords = ['systems biology','modelling','biological',
'networks','copasi','identifiability analysis','profile likelihood'],
license='GPL4',
install_requires=['pandas','numpy','scipy','matplotlib',
'lxml'],
long_description='''Tools for using Copasi via Python and calculating profile likelihoods. See Github page and documentation for more details''')