a template for build python package to upload pypi repository bu using pdm
Project description
pypi_pdm_template
a template for build python package to upload pypi repository bu using pdm
init project
pip install pdm --upgrade
pipx install pdm --upgrade
pdm init
pdm config --local pypi.url "https://pypi.tuna.tsinghua.edu.cn/simple"
# pdm config --local pypi.url "https://test.pypi.org/simple"
# pdm config pypi.url https://pypi.tuna.tsinghua.edu.cn/simple
# pdm config pypi.extra.url "https://extra.pypi.org/simple"
pdm config --local pypi.extra.url "https://test.pypi.org/simple"
pdm add -dG test pytest pytest-cov
pdm add -dG lint pylint flake8 mypy
pdm add -dG format yapf isort black
pdm add -dG docs mkdocs
pdm plugin add pdm-publish
pdm list
pdm list --graph
pdm list pytest --graph
# 更新所有的 dev 依赖
pdm update -d
# 更新 dev 依赖下某个分组的某个包
pdm update -dG test pytest
如果你的依赖包有设置分组,还可以指定分组进行更新
pdm update -G format -G docs
也可以指定分组更新分组里的某个包
pdm update -G format yapf
publish package
config_path: "C:\Users\lgf\AppData\Local\pdm\pdm\config.toml"
pdm config repository.pypi.username "__token__"
pdm config repository.pypi.password "my-pypi-token"
pdm config repository.testpypi.username "__token__"
pdm config repository.testpypi.password "my-pypi-token"
pdm config repository.company.url "https://pypi.company.org/legacy/"
pdm config repository.company.ca_certs "/path/to/custom-cacerts.pem"
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
Built Distribution
Close
Hashes for pypi_pdm_template-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6339899007a6dec6d6f33c49759d735f20c2e7e468a7eba9d4a53d11bbfa3d6 |
|
MD5 | 2124fe8985abef621ec5b96ae5f4f2bc |
|
BLAKE2b-256 | 91306cf3ae37e66f6a06607d2e87921f02920116596c96b4f7aa7c1caff269b0 |