A small example package
Project description
mypk1
测试项目
打包安装上传流程
安装相关工具
## 打包工具
python -m pip install --upgrade setuptools wheel
## 打包工具2
python -m pip install --upgrade build
## 上传工具twine
python -m pip install --upgrade twine
准备工作
到https://test.pypi.org/simple/和 https://pypi.org/project注册相关账号,并将token分别保存到`~/.pypirc`
测试环境
- 编译打包方式一 这里打两种包sdist打包为tar.gz,bdist_wheel打包为whl
python setup.py sdist bdist_wheel
- 编译打包方式二 也是打包为两个包,作用一样
python -m build
- 使用本地包安装
python -m pip install ./dist/mypk1-0.0.3.tar.gz
- twine上传
python -m twine upload --repository testpypi dist/*
- 从远程安装
pip install -i https://test.pypi.org/simple/ mypk1
pip install -i https://test.pypi.org/simple/ mypk1==0.0.1
pip install -i https://test.pypi.org/simple/ mypk1==0.0.2
- 升级安装
pip install --upgrade -i https://test.pypi.org/simple/ mypk1
- 卸载
pip uninstall mypk1
正式环境
- 上传
python -m twine upload --repository pypi dist/*
- 安装
pip install -i https://pypi.org/project mypk1
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
mypk1-0.0.5.tar.gz
(3.1 kB
view details)
Built Distribution
mypk1-0.0.5-py3-none-any.whl
(3.0 kB
view details)
File details
Details for the file mypk1-0.0.5.tar.gz
.
File metadata
- Download URL: mypk1-0.0.5.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.56.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82e20bb83e084f11bb667deaee5515101933d1aad389fa773b81aa82353f34c0 |
|
MD5 | ff6e4598763d2ac51a53a039a69365e0 |
|
BLAKE2b-256 | 75599ee57d2ff71c6ed28fcff1f80728b74fb188e0f94fba504375221720682b |
File details
Details for the file mypk1-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: mypk1-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.56.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e255b7d94f2080f8c1c315cabc3a23fd66ac415c81196ac78049e2139ba3ba99 |
|
MD5 | 595f56b33dc80bbdca31a167d3552f22 |
|
BLAKE2b-256 | e4783e4d8be586ff9fc43213d3b12a5bab21bd8f320c09bfcefa5dcd4765aa30 |