我正在學習如何發佈Python包,方法是遵循Python Packaging User Guide中的建議。我創建了一個簡單setup.py
基於setuptools的文檔的Basic Use部分的示例:爲什麼我的Python包的分類器沒有出現在測試PyPI上?
from setuptools import setup, find_packages
setup(
name="HelloWorld",
version="0.1",
packages=find_packages(),
# metadata for upload to PyPI
author="Me",
author_email="[email protected]",
description="This is an Example Package",
url = "http://example.com/HelloWorld/",
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: Python Software Foundation License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
],
)
我建立了源代碼,在Test PyPI site註冊了HelloWorld包,並使用上傳包的壓縮包到測試的PyPI網站纏繞。但是,分類器不會出現在Test PyPI的包的頁面上。此外,他們不是在發佈的PKG-INFO:
# https://testpypi.python.org/pypi?name=HelloWorld&version=0.1&:action=display_pkginfo
Metadata-Version: 1.1
Name: HelloWorld
Version: 0.1
Author: Me
Author-email: me at example com
Home-page: http://example.com/HelloWorld/
Summary: This is an Example Package
Platform: UNKNOWN