我的长篇描述并未显示在PyPi上?

时间:2018-03-25 16:27:46

标签: python pypi

我在制作轮子时尝试使用long_description打印,打印得很好。但是当我上传到PyPi时,它并没有在那里展示我的长篇描述。这是我的setup.py,希望有人能帮到解决这个问题。

from setuptools import setup
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()
setup(
    name='matchmod',
    version='1.2.1',
    description='Simple Rust-like pattern matching for Python, with some added features',
    long_description=long_description,
    url='https://github.com/AN3223/rustlike-pattern-matching-for-python',
    author='AN3223',
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Build Tools',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    keywords='rust rustlang procedural',
    py_modules=['matchmod']
)
编辑:我刚刚意识到我在构建方向盘Error while finding module specification for 'setup.py' (AttributeError: module 'setup' has no attribute '__path__')时遇到此错误,不知道如何解决此问题?我尝试以这种方式打开文件,如yausername建议的链接,但仍然出现相同的错误

from pkg_resources import resource_string

long_description = resource_string(__name__, 'README.rst').decode('utf-8')

0 个答案:

没有答案