0

我无法将我的包上传到 pypi。我以前只能使用python setup.py sdist upload -r pypi,但现在这会导致错误:

Upload failed (400): requires: Must be a valid Python identifier.
error: Upload failed (400): requires: Must be a valid Python identifier.

我已经尝试了一些方法来使其正常工作,但一切都失败了,并出现了同样的错误。

我删除了根目录中的当前dist,buildegg文件夹。然后我将我的包版本号增加了 1 个微版本。我确保我的~/.pypirc文件符合说明:

[distutils]
index-servers = 
    pypi


[pypi]
username: c.welsh2
password: ...

和更新piptwinesetuptools。我使用创建一个构建

python setuptools.py bdist_wheel 

它创建了构建,/package_root/dist/*我尝试使用上传到 pypi

twine upload dist/*

我再次得到:

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''')
4

1 回答 1

0

原来有一个相当不可原谅的错字。matplotlib.pyplot自调用以来,我无法提供requires 参数matplotlib

于 2017-07-30T18:42:36.693 回答