Metadata-Version: 2.1
Name: pypi_pdm_template
Version: 0.1.2
Summary: a template for build python package to upload pypi repository bu using pdm
Author-Email: lgf4591 <lgf4591@outlook.com>
License: MIT License
        
        Copyright (c) 2023 lgf4591
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Home, https://github.com/lgf4591/pypi_pdm_template
Project-URL: Changelog, https://github.com/lgf4591/pypi_pdm_template/blob/main/CHANGELOG.md
Project-URL: Docs, https://github.com/lgf4591/pypi_pdm_template/blob/main/README.md#yapf
Project-URL: Issues, https://github.com/lgf4591/pypi_pdm_template/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# pypi_pdm_template
a template for build python package to upload pypi repository bu using pdm



# init project

```powershell

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

```powershell
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"


```
