Skip to content

Commit

Permalink
docs(python):
Browse files Browse the repository at this point in the history
  • Loading branch information
snakeclub committed Sep 12, 2019
1 parent 9e2a640 commit c17d13b
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions docs/python/将python包发布到PyPI和制作whl文件.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,13 @@ README.txt123456
输入以下命令进行打包,制作source distribution(源代码发布包),此命令将会把所有内容在dist/目录打包为pagtest-1.0.0.tar.gz

```
python setup.py sdist1
python setup.py sdist build
```

4.上传到PyPI上。上传时,可以建立一个账户验证文件~/.pypirc(Windows不可以,因为文件命名中含有非法字符),也可以在上传时输入账户和密码。

```
[distutils]
index-servers=pypi
4.将命令行定位到此文件夹下,输入命令对dist目录下的pagtest-1.0.0.tar.gzt包进行上传,twine为Python包需要安装(安装过程需要输入pipy官网的用户名和密码,注册地址:https://pypi.org/):

[pypi]
repository = https://upload.pypi.org/legacy/
username = <username>
password = <password>1234567
```

5.将命令行定位到此文件夹下,输入命令对dist目录下的pagtest-1.0.0.tar.gzt包进行上传,twine为Python包需要安装:

```
twine upload dist/*1
twine upload dist/*
```

# 制作python包为wheel文件
Expand Down

0 comments on commit c17d13b

Please sign in to comment.