SDIST在将软件包上传到PYPI时显示错误
我正在构建一个python模块,并且正在关注此教程。 但是,当我运行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 = '[email protected]',
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',
],
)
I am building a Python Module, and am following this tutorial.
However when I run python setup.py sdist
, I get:
running sdist
running check
warning: sdist: manifest template 'MANIFEST.in' does not exist (using default file list)
error: package directory 'packagename' does not exist
Here is my directory structure:
packagename
-setup.py
-setup.cfg
-LICENSE
-README
-__init__.py
-(All other files)
Setup.py file (I have replaced things like package names, authors, urls with placeholders.):
from distutils.core import setup
setup(
name = 'packagename',
packages = ['packagename'],
version = '0.1.1',
license='MIT',
description = 'description',
author = 'authorname',
author_email = '[email protected]',
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',
],
)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我必须按照@PHD在评论部分的第三评论中建议将设置文件移至主包上方。
I had to move the setup file above the main package as suggested by @phd in the 3rd comment in the comment section.