Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Pdm
提交
ad82aad8
P
Pdm
项目概览
后端镜像
/
Pdm
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Pdm
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ad82aad8
编写于
1月 21, 2020
作者:
F
frostming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update README.md
上级
85aff9f9
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
35 addition
and
18 deletion
+35
-18
.github/workflows/.ci.yml
.github/workflows/.ci.yml
+3
-3
README.md
README.md
+11
-2
pdm/builders/base.py
pdm/builders/base.py
+8
-4
pdm/project/meta.py
pdm/project/meta.py
+13
-0
requirements.txt
requirements.txt
+0
-9
未找到文件。
.github/workflows/.ci.yml
浏览文件 @
ad82aad8
...
...
@@ -34,9 +34,9 @@ jobs:
python-version
:
${{ matrix.python-version }}
-
name
:
Install dependencies
run
:
|
python -m pip install
-r requirements.txt
p
ython -m p
dm install -d
python -m pip install
pdm
pdm install -d
-
name
:
Test
run
:
|
p
ython -m p
dm run pytest --cov pdm tests
pdm run pytest --cov pdm tests
README.md
浏览文件 @
ad82aad8
...
...
@@ -16,7 +16,16 @@ you can probably find some goodness in `pdm`.
## Installation:
> It is still a WIP project and not published to PyPI.
```
bash
$
pipx
install
pdm
```
It is recommended to install
`pdm`
in an isolated enviroment, with
`pipx`
.
Or you can install it under user site:
```
bash
$
pip
install
--user
pdm
```
## Usage
...
...
@@ -32,7 +41,7 @@ you can probably find some goodness in `pdm`.
-
[x] Console scripts are injected with local paths.
-
[x] A neet CLI.
-
[x]
`add`
,
`lock`
,
`list`
,
`update`
,
`remove`
commands.
-
[
] PEP 517 build backends.
-
[
x
] PEP 517 build backends.
-
[x] Continuous Integration.
...
...
pdm/builders/base.py
浏览文件 @
ad82aad8
...
...
@@ -46,7 +46,6 @@ Version: {version}
Summary: {description}
Home-page: {homepage}
License: {license}
Description: {readme}
"""
...
...
@@ -292,12 +291,14 @@ class Builder:
for
classifier
in
meta
.
classifiers
or
[]:
content
+=
"Classifier: {}
\n
"
.
format
(
classifier
)
for
extra
in
sorted
(
meta
.
_extras
or
[]):
content
+=
"Provides-Extra: {}
\n
"
.
format
(
extra
)
for
dep
in
sorted
(
meta
.
install_requires
):
content
+=
"Requires-Dist: {}
\n
"
.
format
(
dep
)
for
extra
,
reqs
in
sorted
(
self
.
meta
.
requires_extra
.
items
()):
content
+=
"Provides-Extra: {}
\n
"
.
format
(
extra
)
for
dep
in
reqs
:
content
+=
"Requires-Dist: {}
\n
"
.
format
(
dep
)
for
url
in
sorted
(
meta
.
project_urls
or
{}):
content
+=
"Project-URL: {}, {}
\n
"
.
format
(
url
,
meta
.
project_urls
[
url
])
...
...
@@ -306,6 +307,9 @@ class Builder:
meta
.
long_description_content_type
)
if
meta
.
readme
:
content
+=
"
\n
"
+
Path
(
meta
.
readme
).
read_text
(
"utf-8"
)
+
"
\n
"
return
content
def
ensure_setup_py
(
self
)
->
None
:
...
...
pdm/project/meta.py
浏览文件 @
ad82aad8
...
...
@@ -10,6 +10,7 @@ import vistir
from
pkg_resources
import
safe_name
from
pdm.exceptions
import
ProjectError
from
pdm.models.markers
import
Marker
if
TYPE_CHECKING
:
from
pdm.project
import
Project
...
...
@@ -90,6 +91,18 @@ class PackageMeta:
for
extra
in
self
.
_extras
}
@
property
def
requires_extra
(
self
)
->
Dict
[
str
,
List
[
str
]]:
if
not
self
.
_extras
:
return
{}
result
=
{}
for
extra
in
self
.
_extras
:
current
=
result
[
extra
]
=
[]
for
r
in
self
.
project
.
get_dependencies
(
extra
).
values
():
r
.
marker
=
Marker
(
f
"extra ==
{
extra
!
r
}
"
)
&
r
.
marker
current
.
append
(
r
.
as_line
())
return
result
@
property
def
python_requires
(
self
)
->
str
:
return
str
(
self
.
project
.
python_requires
)
...
...
requirements.txt
已删除
100644 → 0
浏览文件 @
85aff9f9
distlib
pip
>=19.3.1
pip_shims
tomlkit
appdirs
pythonfinder
halo
click
crayons
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录