将包上传到 pypi 时 Sdist 显示错误

Sdist showing error while uploading package to pypi

我正在构建一个 Python 模块,并且正在关注 this tutorial。 但是,当我 运行 python setup.py sdist 时,我得到:

running sdist
running check
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)

error: package directory 'packagename' does not exist

这是我的目录结构:

packagename  
-setup.py  
-setup.cfg  
-LICENSE  
-README  
-__init__.py   
-(All other files)

Setup.py 文件(我已经用占位符替换了包名、作者、url 等内容。):

from distutils.core import setup
setup(
  name = 'packagename',
  packages = ['packagename'],
  version = '0.1.1',
  license='MIT',
  description = 'description',
  author = 'authorname',
  author_email = 'someone@somewhere.tld',
  url = 'url',
  download_url = 'url',
  keywords = ['GUI', 'Python', 'Tkinter', 'Simple'],
  classifiers=[
    'Development Status :: 4 - Beta',      # Choose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package
    'Intended Audience :: Developers',
    'Topic :: Software Development :: Build Tools',
    'License :: OSI Approved :: MIT License',
    'Programming Language :: Python :: 3.6',
    'Programming Language :: Python :: 3.7',
    'Programming Language :: Python :: 3.8',
    'Programming Language :: Python :: 3.9',
  ],
)

我不得不按照@phd 在评论部分第 3 条评论中的建议将安装文件移动到主包之上。