Skip to main content

学习如何构建python模块,并打包上传pypi

Project description

# -!- coding: utf-8 -!-

# 这是我尝试进行构建的第一个python包

# 配置文件的优先级 setup.py < MANIFEST.in < setup.cfg

#创建.pypirc # windows的用户文件夹目录为: # C:UsersAdministrator.pypirc # .pypirc内容: # # [distutils] # index-servers = pypi # # [pypi] # username: 用户名 # password: 密码

#python setup.py register

#本地打包 #python setup.py sdist build #python setup.py bdist_wheel –universal

#上传到pypi #python setup.py sdist upload #python setup.py bdist_wheel upload

#或者使用twine上传,先安装twine # pip install twine #

rm -rf src/hello_python_demo_demo.egg-info dist build && python setup.py sdist build && python setup.py bdist_wheel –universal twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hello_python_demo-1.0.3.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

hello_python_demo-1.0.3-py2.py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page