Python — PyPi共享你的代码
来源:互联网 发布:免费淘宝培训班义乌 编辑:程序博客网 时间:2024/06/05 20:49
1、注册帐号(https://pypi.python.org)
2、准备发布
(1)文件夹Demo1
(2)Demo1.py
(3)setup.py
#从python发布工具包导入“setup”函数from distutils.core import setup#将模块的元数据与setup函数的参数关联,这个文件中的参数要根据自己的元数据去写setup( name = 'Demo1', version = '1.0.0', py_modules = ['Demo1'], author = 'peerslee', )
3、构建发布
(1)在该文件夹只喔咕打开终端窗口
python3 setup.py sdist
(2)将发布安装到自己的本地副本中
sudo python3 setup.py install
4、预览
5、上传代码
(1)python3 setup.py register
We need to know who you are, so please choose either:
1. use your existing login,
2. register as a new user,
3. have the server generate a new password for you (and email it to you), or
4. quit
Your selection [default 1]:
1
Username: peerslee
Password:
Registering Demo1 to https://pypi.python.org/pypi
Server response (200): OK
I can store your PyPI login so future submissions will be faster.
(the login will be stored in /home/peerslee/.pypirc)
Save your login (y/N)?y
(2)python3 setup.py sdist upload
writing manifest file 'MANIFEST'
creating Demo1-1.0.0
making hard links in Demo1-1.0.0...
hard linking Demo1.py -> Demo1-1.0.0
hard linking setup.py -> Demo1-1.0.0
Creating tar archive
removing 'Demo1-1.0.0' (and everything under it)
running upload
Submitting dist/Demo1-1.0.0.tar.gz to https://pypi.python.org/pypi
Server response (200): OK
- Python — PyPi共享你的代码
- python共享你的代码
- 使用镜像服务器加速你的Python PyPi
- 将自己写的Python代码打包放到PyPI上
- python代码打包dist并发送到pypi网站的方法
- Windows下Python的强力助手——Pypi
- 发布自己的python轮子——上传PyPI
- 如何将自己的Python代码打包发布到pypi上
- 如何将自己的Python代码打包发布到pypi上
- 转载:将自己写的Python代码打包放到PyPI上
- 发布python的包至pypi服务器
- 发布python的包至pypi服务器
- head.First.python:注册pypi、上传代码、更新代码
- Python初入门(二) 可共享的函数模板(Head First Python 第二章 共享你的代码)
- PyPI中国镜像知多少和国内的python用户如何使用pypi镜像源
- https://pypi.python.org/pypi/ssh
- https://pypi.python.org/pypi/lxml/2.3/
- 上传代码到PyPI
- iOS开发 UI 自动轮播图
- mmseg分词算法及实现
- java 中Json的使用
- github简单指令
- 华为机试——查找组成一个偶数最接近的两个素数
- Python — PyPi共享你的代码
- Linux下查看文件夹下文件个数
- 实现自己的HashMap
- 算法洗脑系列(8篇)——第六篇 回溯思想
- C# winform 动态添加控件之GroupBox和TextBox
- SQLite学习手册(开篇)
- Android 4.4.4 DataFormatException:stream error
- AlarmManager的简单使用方法
- 免费馅饼 OJ 613