【发布时间】:2014-12-04 17:58:34
【问题描述】:
我正在学习如何按照Python Packaging User Guide 中的建议发布 Python 包。我根据 setuptools 文档的Basic Use 部分中的示例创建了一个简单的setup.py:
from setuptools import setup, find_packages
setup(
name="HelloWorld",
version="0.1",
packages=find_packages(),
# metadata for upload to PyPI
author="Me",
author_email="me@example.com",
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 包,并使用 twine 将包的 tarball 上传到了 Test 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
【问题讨论】: