-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: PDM - Package Manager #415
Comments
PDM: Python 包管理工具
Update: 2024-04:
PK 其他:(试用报告)
PDM 安装:
pip install pipx
pipx install pdm[all]
|
PDM 功能:添加包依赖:pdm add requests # add requests
pdm add requests==2.25.1 # add requests with version constraint
pdm add requests[socks] # add requests with extra dependency
pdm add "flask>=1.0" flask-sqlalchemy # add multiple dependencies with different specifiers
# 本地包:
pdm add ./sub-package
pdm add ./first-1.0.0-py2.py3-none-any.whl
# 基于 URL:
# Install gzipped package from a plain URL
pdm add "https://github.com/numpy/numpy/releases/download/v1.20.0/numpy-1.20.0.tar.gz"
# Install wheel from a plain URL
pdm add "https://github.com/explosion/spacy-models/releases/download/en_core_web_trf-3.5.0/en_core_web_trf-3.5.0-py3-none-any.whl"
dev 分组:pdm add -dG test pytest
# 开发分组:
# A relative path to the directory
pdm add -e ./sub-package --dev
# A file URL to a local directory
pdm add -e file:///path/to/sub-package --dev
# A VCS URL
pdm add -e git+https://github.com/pallets/click.git@main#egg=click --dev
[tool.pdm.dev-dependencies]
lint = [
"flake8",
"black"
]
test = ["pytest", "pytest-cov"]
doc = ["mkdocs"]
|
PDM Script 功能: 🌟🌟🌟
[tool.pdm.scripts]
start = {cmd = [
"flask",
"run",
# Important comment here about always using port 54321
"-p", "54321"
]}
|
PDM 创建项目:pdm init --cookiecutter gh:cjolowicz/cookiecutter-hypermodern-python
# or
pdm init --copier gh:pawamoy/copier-pdm --UNSAFE |
1 |
3 similar comments
1 |
1 |
1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📖 Abstract:
💯 Related:
The text was updated successfully, but these errors were encountered: