a python package test project
Project description
This is a test package project.
This is a simple example package. You can use Github-flavored Markdown to write your content.
生成wheel文件
pip install wheel
python setup.py bdist_wheel
之后会在 dist目录下生成类似的文件: name-x.x.x-py3-none-any.whl
上传到pypi
现在已经可以使用该whl文件本地安装了,也可以传到 pypi 供所有人使用。
• 首先要注册个账号 • 然后安装twine • 上传
# 1. Generating distribution archives
pip install twine
# python -m pip install --user --upgrade setuptools wheel
# 生成whl
python setup.py sdist bdist_wheel
# 2. 在用户名下创建用户验证文件(C:\Users\YOUR_USER_NAME\.config) (这一步好像没有用)
文件内容如下
-------------------------------
[distutils]
index-servers=pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = xxxx
password = xxxx
-------------------------------
# 3. 注册包 (可忽略,这一步现在非必须了)
python setup.py register
# 4. Uploading the distribution archives
# python -m pip install --user --upgrade twine
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
# 5. 升级发布包
编写完成后,删除dist 目录,重新生成可发布的文件。然后验证和重新发布上传。
安装、卸载方式
# 源码方式
python setup.py install
# 在线安装方式
pip install lib_name
# 升级安装方式
pip install --upgrade lib_name
# 卸载
pip unintall lib_name
REF
- onenote: 0124 python packagings
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
weng-pkgtest-1.0.2.tar.gz
(7.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file weng-pkgtest-1.0.2.tar.gz.
File metadata
- Download URL: weng-pkgtest-1.0.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5e04714c27e4d550b3a5f2ce1f9d20e89bf44caae94bdb2a65dfa4435f91cbb
|
|
| MD5 |
da7e0b3306f94df620b4cb1feab25bef
|
|
| BLAKE2b-256 |
13e32298b1b7e674ce06da98e2bd9bfbf4f591c97f9f766c4532d02fcffae228
|
File details
Details for the file weng_pkgtest-1.0.2-py3-none-any.whl.
File metadata
- Download URL: weng_pkgtest-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ef3635d265184c422304cfe32db1ff7201ed49ffef862c7896e7a484c0cbb42
|
|
| MD5 |
3fb5150e358792b5b2420406c627ebb6
|
|
| BLAKE2b-256 |
31aaead8683e6bbfe2d1b5fbf8f163d798784713023185d34c689a96e892d7ba
|