Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Pdm
提交
e1bec49b
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,发现更多精彩内容 >>
未验证
提交
e1bec49b
编写于
3月 20, 2020
作者:
F
frostming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Read config for json api
上级
d044ebcf
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
9 deletion
+13
-9
docs/docs/project.md
docs/docs/project.md
+1
-0
docs/docs/pyproject.md
docs/docs/pyproject.md
+3
-3
pdm/models/repositories.py
pdm/models/repositories.py
+4
-6
pdm/project/config.py
pdm/project/config.py
+5
-0
未找到文件。
docs/docs/project.md
浏览文件 @
e1bec49b
...
...
@@ -132,5 +132,6 @@ by the configuration item `use_venv`, when it is set to `True`, PDM will use the
|
`python.use_pyenv`
| Use the pyenv interpreter |
`True`
| Yes | |
|
`pypi.url`
| The URL of PyPI mirror | Read
`index-url`
in
`pip.conf`
, or
`https://pypi.org/simple`
if not found | Yes |
`PDM_PYPI_URL`
|
|
`pypi.verify_ssl`
| Verify SSL certificate when query PyPI | Read
`trusted-hosts`
in
`pip.conf`
, defaults to
`True`
| Yes | |
|
`pypi.json_api`
| Consult PyPI's JSON API for package metadata |
`True`
| Yes |
`PDM_PYPI_JSON_API`
|
*If the env var is set, the value will take precendence over what is saved in the config file.*
docs/docs/pyproject.md
浏览文件 @
e1bec49b
...
...
@@ -97,9 +97,9 @@ myplugin = "mypackage.plugin:pytest_plugin"
## Build C extensions
Currently building C extensions still rel
y
on
`setuptools`
. You should write a python script which contains
a function named
`build`
and accepts the
arguments dictionary of
`setup()`
as the only parameter
.
In the function, update the dictionary with your
`ext_modules`
settings
.
Currently building C extensions still rel
ies
on
`setuptools`
. You should write a python script which contains
a function named
`build`
and accepts the
parameter dictionary of
`setup()`
as the only argument
.
Update the dictionary with your
`ext_modules`
settings in the function
.
Here is an example taken from
`MarkupSafe`
:
...
...
pdm/models/repositories.py
浏览文件 @
e1bec49b
...
...
@@ -200,12 +200,10 @@ class PyPIRepository(BaseRepository):
raise
CandidateInfoNotFound
(
candidate
)
def
dependency_generators
(
self
)
->
Iterable
[
Callable
[[
Candidate
],
CandidateInfo
]]:
return
(
self
.
_get_dependencies_from_cache
,
# PyPI JSON API seems not trustable
# self._get_dependencies_from_json,
self
.
_get_dependencies_from_metadata
,
)
yield
self
.
_get_dependencies_from_cache
if
self
.
environment
.
project
.
config
[
"pypi.json_api"
]:
yield
self
.
_get_dependencies_from_json
yield
self
.
_get_dependencies_from_metadata
def
_find_named_matches
(
self
,
...
...
pdm/project/config.py
浏览文件 @
e1bec49b
...
...
@@ -86,6 +86,11 @@ class Config(MutableMapping):
"pypi.verify_ssl"
:
ConfigItem
(
"Verify SSL certificate when query PyPI"
,
verify_ssl
),
"pypi.json_api"
:
ConfigItem
(
"Consult PyPI's JSON API for package metadata"
,
True
,
env_var
=
"PDM_PYPI_JSON_API"
,
),
"use_venv"
:
ConfigItem
(
"Install packages into the activated venv site packages instead of PEP 582"
,
False
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录