Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Pdm
提交
76f34f28
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,发现更多精彩内容 >>
未验证
提交
76f34f28
编写于
3月 29, 2020
作者:
F
Frost Ming
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix lockfile
上级
63fa7b5b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
38 addition
and
8 deletion
+38
-8
pdm.lock
pdm.lock
+29
-0
pdm/models/environment.py
pdm/models/environment.py
+0
-7
pdm/project/core.py
pdm/project/core.py
+8
-1
pdm/utils.py
pdm/utils.py
+1
-0
未找到文件。
pdm.lock
浏览文件 @
76f34f28
...
...
@@ -96,6 +96,16 @@ termcolor = ">=1.1.0"
colorama = ">=0.3.9"
six = ">=1.12.0"
[[package]]
name = "importlib-metadata"
sections = ["dev"]
version = "1.6.0"
marker = "python_version >= \"3.5\" and python_version < \"3.8\""
summary = "Read metadata from Python packages"
[package.dependencies]
zipp = ">=0.5"
[[package]]
name = "incremental"
sections = ["dev"]
...
...
@@ -267,6 +277,9 @@ version = "0.13.1"
marker = "python_version >= \"3.5\""
summary = "plugin and hook calling mechanisms for python"
[package.dependencies]
importlib-metadata = {marker = "python_version < \"3.8\"", version = ">=0.12"}
[[package]]
name = "py"
sections = ["dev"]
...
...
@@ -312,6 +325,7 @@ attrs = ">=17.4.0"
more-itertools = ">=4.0.0"
pluggy = "<1.0,>=0.12"
wcwidth = "*"
importlib-metadata = {marker = "python_version < \"3.8\"", version = ">=0.12"}
atomicwrites = {marker = "sys_platform == \"win32\"", version = ">=1.0"}
colorama = {marker = "sys_platform == \"win32\"", version = "*"}
...
...
@@ -462,6 +476,13 @@ version = "0.34.2"
marker = "python_version >= \"2.7\" and python_version not in \"3.0, 3.1, 3.2, 3.3, 3.4\""
summary = "A built-package format for Python"
[[package]]
name = "zipp"
sections = ["dev"]
version = "3.1.0"
marker = "python_version >= \"3.6\" and python_version < \"3.8\""
summary = "Backport of pathlib-compatible object wrapper for zip files"
[metadata]
"apipkg 1.5" = [
{file = "apipkg-1.5.tar.gz", hash = "sha256:37228cda29411948b422fae072f57e31d3396d2ee1c9783775980ee9c9990af6"},
...
...
@@ -541,6 +562,10 @@ summary = "A built-package format for Python"
{file = "halo-0.0.29.tar.gz", hash = "sha256:a8aeb0164e269d7c96fb7444b2a4caaa09b8989fa0c85e6a26e8b2c6d1af3b9d"},
{file = "halo-0.0.29-py3-none-any.whl", hash = "sha256:67996649083229a9b7a93fe7c871c97d40bd2f1a988540eccf948a6b1844f644"},
]
"importlib-metadata 1.6.0" = [
{file = "importlib_metadata-1.6.0.tar.gz", hash = "sha256:34513a8a0c4962bc66d35b359558fd8a5e10cd472d37aec5f66858addef32c1e"},
{file = "importlib_metadata-1.6.0-py2.py3-none-any.whl", hash = "sha256:2a688cbaa90e0cc587f1df48bdc97a6eadccdcd9c35fb3f976a09e3b5016d90f"},
]
"incremental 17.5.0" = [
{file = "incremental-17.5.0.tar.gz", hash = "sha256:7b751696aaf36eebfab537e458929e194460051ccad279c72b755a167eebd4b3"},
{file = "incremental-17.5.0-py2.py3-none-any.whl", hash = "sha256:717e12246dddf231a349175f48d74d93e2897244939173b01974ab6661406b9f"},
...
...
@@ -741,6 +766,10 @@ summary = "A built-package format for Python"
{file = "wheel-0.34.2.tar.gz", hash = "sha256:8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96"},
{file = "wheel-0.34.2-py2.py3-none-any.whl", hash = "sha256:df277cb51e61359aba502208d680f90c0493adec6f0e848af94948778aed386e"},
]
"zipp 3.1.0" = [
{file = "zipp-3.1.0.tar.gz", hash = "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"},
{file = "zipp-3.1.0-py3-none-any.whl", hash = "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b"},
]
[root]
content_hash = "md5:fbac358de4e5b0747e3a27154febb055"
...
...
pdm/models/environment.py
浏览文件 @
76f34f28
...
...
@@ -18,7 +18,6 @@ from pythonfinder.environment import PYENV_INSTALLED, PYENV_ROOT
from
pdm.exceptions
import
NoPythonVersion
from
pdm.iostream
import
stream
from
pdm.models.specifiers
import
PySpecSet
from
pdm.utils
import
(
allow_all_wheels
,
cached_property
,
...
...
@@ -342,12 +341,6 @@ class GlobalEnvironment(Environment):
is_global
=
True
def
__init__
(
self
,
project
:
Project
)
->
None
:
super
().
__init__
(
project
)
self
.
python_requires
=
PySpecSet
(
"=="
+
get_python_version
(
self
.
python_executable
,
True
)
)
def
get_paths
(
self
)
->
Dict
[
str
,
str
]:
paths
=
get_sys_config_paths
(
self
.
python_executable
)
paths
[
"prefix"
]
=
paths
[
"data"
]
...
...
pdm/project/core.py
浏览文件 @
76f34f28
...
...
@@ -29,6 +29,7 @@ from pdm.utils import (
atomic_open_for_write
,
cached_property
,
find_project_root
,
get_python_version
,
get_venv_python
,
)
...
...
@@ -141,7 +142,13 @@ class Project:
@
cached_property
def
environment
(
self
)
->
Environment
:
if
self
.
is_global
:
return
GlobalEnvironment
(
self
)
env
=
GlobalEnvironment
(
self
)
# Rewrite global project's python requires to be
# compatible with the exact version
env
.
python_requires
=
PySpecSet
(
"=="
+
get_python_version
(
env
.
python_executable
,
True
)
)
return
env
if
self
.
config
[
"use_venv"
]
and
"VIRTUAL_ENV"
in
os
.
environ
:
self
.
project_config
[
"python.path"
]
=
get_venv_python
()
return
GlobalEnvironment
(
self
)
...
...
pdm/utils.py
浏览文件 @
76f34f28
...
...
@@ -423,6 +423,7 @@ def get_venv_python() -> Optional[str]:
@
contextmanager
def
atomic_open_for_write
(
filename
:
Union
[
Path
,
str
],
*
,
encoding
:
str
=
"utf-8"
):
fd
,
name
=
tempfile
.
mkstemp
(
"-atomic-write"
,
"pdm-"
)
filename
=
str
(
filename
)
try
:
f
=
open
(
fd
,
"w"
,
encoding
=
encoding
)
yield
f
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录