Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
dbc1e1b9
Unverified
Commit
dbc1e1b9
authored
Apr 21, 2020
by
Maximilian Köhl
Committed by
GitHub
Apr 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: remove 'm' and 'd' ABI tags for Python 3.8 wheels
parent
dad6b084
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
11 deletions
+104
-11
poetry/masonry/utils/tags.py
+14
-11
poetry/utils/env.py
+11
-0
tests/masonry/utils/test_tags.py
+79
-0
No files found.
poetry/masonry/utils/tags.py
View file @
dbc1e1b9
...
...
@@ -76,19 +76,22 @@ def get_abi_tag(env):
env
,
"Py_DEBUG"
,
lambda
:
hasattr
(
sys
,
"gettotalrefcount"
),
warn
=
(
impl
==
"cp"
),
warn
=
(
impl
==
"cp"
and
env
.
version_info
<
(
3
,
8
)
),
):
d
=
"d"
if
get_flag
(
env
,
"WITH_PYMALLOC"
,
lambda
:
impl
==
"cp"
,
warn
=
(
impl
==
"cp"
)):
m
=
"m"
if
get_flag
(
env
,
"Py_UNICODE_SIZE"
,
lambda
:
sys
.
maxunicode
==
0x10FFFF
,
expected
=
4
,
warn
=
(
impl
==
"cp"
and
env
.
version_info
<
(
3
,
3
)),
)
and
env
.
version_info
<
(
3
,
3
):
u
=
"u"
if
env
.
version_info
<
(
3
,
8
):
if
get_flag
(
env
,
"WITH_PYMALLOC"
,
lambda
:
impl
==
"cp"
,
warn
=
(
impl
==
"cp"
)
):
m
=
"m"
if
get_flag
(
env
,
"Py_UNICODE_SIZE"
,
lambda
:
sys
.
maxunicode
==
0x10FFFF
,
expected
=
4
,
warn
=
(
impl
==
"cp"
and
env
.
version_info
<
(
3
,
3
)),
)
and
env
.
version_info
<
(
3
,
3
):
u
=
"u"
abi
=
"
%
s
%
s
%
s
%
s
%
s"
%
(
impl
,
get_impl_ver
(
env
),
d
,
m
,
u
)
elif
soabi
and
soabi
.
startswith
(
"cpython-"
):
abi
=
"cp"
+
soabi
.
split
(
"-"
)[
1
]
...
...
poetry/utils/env.py
View file @
dbc1e1b9
...
...
@@ -1151,6 +1151,7 @@ class MockEnv(NullEnv):
is_venv
=
False
,
pip_version
=
"19.1"
,
sys_path
=
None
,
config_vars
=
None
,
**
kwargs
):
super
(
MockEnv
,
self
)
.
__init__
(
**
kwargs
)
...
...
@@ -1162,6 +1163,7 @@ class MockEnv(NullEnv):
self
.
_is_venv
=
is_venv
self
.
_pip_version
=
Version
.
parse
(
pip_version
)
self
.
_sys_path
=
sys_path
self
.
_config_vars
=
config_vars
@property
def
version_info
(
self
):
# type: () -> Tuple[int]
...
...
@@ -1192,3 +1194,12 @@ class MockEnv(NullEnv):
def
is_venv
(
self
):
# type: () -> bool
return
self
.
_is_venv
def
config_var
(
self
,
var
):
# type: (str) -> Any
if
self
.
_config_vars
is
None
:
return
super
()
.
config_var
(
var
)
else
:
try
:
return
self
.
_config_vars
[
var
]
except
KeyError
:
return
None
tests/masonry/utils/test_tags.py
0 → 100644
View file @
dbc1e1b9
import
pytest
from
poetry.masonry.utils.tags
import
get_abi_tag
from
poetry.utils.env
import
MockEnv
def
test_tags_cpython38
():
assert
(
get_abi_tag
(
MockEnv
(
version_info
=
(
3
,
8
,
0
),
python_implementation
=
"CPython"
,
config_vars
=
{
"Py_DEBUG"
:
True
},
)
)
==
"cp38d"
)
assert
(
get_abi_tag
(
MockEnv
(
version_info
=
(
3
,
8
,
0
),
python_implementation
=
"CPython"
,
config_vars
=
{},
)
)
==
"cp38"
)
def
test_tags_cpython37
():
assert
(
get_abi_tag
(
MockEnv
(
version_info
=
(
3
,
7
,
3
),
python_implementation
=
"CPython"
,
config_vars
=
{
"Py_DEBUG"
:
True
,
"WITH_PYMALLOC"
:
True
},
)
)
==
"cp37dm"
)
assert
(
get_abi_tag
(
MockEnv
(
version_info
=
(
3
,
7
,
3
),
python_implementation
=
"CPython"
,
config_vars
=
{
"Py_DEBUG"
:
True
,
"WITH_PYMALLOC"
:
False
},
)
)
==
"cp37d"
)
assert
(
get_abi_tag
(
MockEnv
(
version_info
=
(
3
,
7
,
3
),
python_implementation
=
"CPython"
,
config_vars
=
{
"Py_DEBUG"
:
False
,
"WITH_PYMALLOC"
:
True
},
)
)
==
"cp37m"
)
assert
(
get_abi_tag
(
MockEnv
(
version_info
=
(
3
,
7
,
3
),
python_implementation
=
"CPython"
,
config_vars
=
{
"Py_DEBUG"
:
False
,
"WITH_PYMALLOC"
:
False
},
)
)
==
"cp37"
)
with
pytest
.
warns
(
RuntimeWarning
):
assert
(
get_abi_tag
(
MockEnv
(
version_info
=
(
3
,
7
,
3
),
python_implementation
=
"CPython"
,
config_vars
=
{
"Py_DEBUG"
:
False
},
)
)
==
"cp37m"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment