Skip to content

Add support for manylinux2014 #186

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

Merged
merged 2 commits into from
Aug 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Changelog

.. note:: This version is not yet released and is under active development.

* Remove dependency on ``attrs`` (:issue:`178`, :issue:`179`)

* Use appropriate fallbacks for CPython ABI tag (:issue:`181`, :issue:`185`)

* Add manylinux2014 support (:issue:`186`)

19.1 - 2019-07-30
~~~~~~~~~~~~~~~~~

Expand Down
8 changes: 5 additions & 3 deletions packaging/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,11 @@ def _linux_platforms(is_32bit=_32_BIT_INTERPRETER):
linux = _normalize_string(distutils.util.get_platform())
if linux == "linux_x86_64" and is_32bit:
linux = "linux_i686"
# manylinux1: CentOS 5 w/ glibc 2.5.
# manylinux2010: CentOS 6 w/ glibc 2.12.
manylinux_support = ("manylinux2010", (2, 12)), ("manylinux1", (2, 5))
manylinux_support = (
("manylinux2014", (2, 17)), # CentOS 7 w/ glibc 2.17 (PEP 599)
("manylinux2010", (2, 12)), # CentOS 6 w/ glibc 2.12 (PEP 571)
("manylinux1", (2, 5)), # CentOS 5 w/ glibc 2.5 (PEP 513)
)
manylinux_support_iter = iter(manylinux_support)
for name, glibc_version in manylinux_support_iter:
if _is_manylinux_compatible(name, glibc_version):
Expand Down
17 changes: 17 additions & 0 deletions tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,23 @@ def test_linux_platforms_manylinux2010(monkeypatch):
assert platforms == expected


def test_linux_platforms_manylinux2014(monkeypatch):
monkeypatch.setattr(
tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2014"
)
if platform.system() != "Linux":
monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64")
platforms = tags._linux_platforms(is_32bit=False)
arch = platform.machine()
expected = [
"manylinux2014_" + arch,
"manylinux2010_" + arch,
"manylinux1_" + arch,
"linux_" + arch,
]
assert platforms == expected


def test_sys_tags_linux_cpython(monkeypatch):
if platform.python_implementation() != "CPython":
monkeypatch.setattr(platform, "python_implementation", lambda: "CPython")
Expand Down