Repository: pypa/auditwheel

Issue:
Add manylinux_2_27 policy
Hey team!

We at @robotpy build wheels on Ubuntu 18.04 (as our upstream targets 18.04). We've been manually tagging our wheels as `manylinux_2_27` as we wanted to get our wheels on PyPI quickly early this year. It'd be awesome if we could use auditwheel instead to check that our wheels are actually compliant.

Discussion:
codecov[bot]: # [Codecov](https://codecov.io/gh/pypa/auditwheel/pull/300?src=pr&el=h1) Report
> Merging [#300](https://codecov.io/gh/pypa/auditwheel/pull/300?src=pr&el=desc) (e474199) into [master](https://codecov.io/gh/pypa/auditwheel/commit/bcf80837381beb88b62607dd87722ccbdc316fc3?el=desc) (bcf8083) will **decrease** coverage by `0.54%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pypa/auditwheel/pull/300/graphs/tree.svg?width=650&height=150&src=pr&token=Em0HVspBmj)](https://codecov.io/gh/pypa/auditwheel/pull/300?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #300      +/-   ##
==========================================
- Coverage   91.24%   90.70%   -0.55%     
==========================================
  Files          20       20              
  Lines        1097     1097              
  Branches      237      237              
==========================================
- Hits         1001      995       -6     
- Misses         54       57       +3     
- Partials       42       45       +3     
```


| [Impacted Files](https://codecov.io/gh/pypa/auditwheel/pull/300?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [auditwheel/main\_addtag.py](https://codecov.io/gh/pypa/auditwheel/pull/300/diff?src=pr&el=tree#diff-YXVkaXR3aGVlbC9tYWluX2FkZHRhZy5weQ==) | `78.94% <0.00%> (-7.90%)` | :arrow_down: |
| [auditwheel/wheel\_abi.py](https://codecov.io/gh/pypa/auditwheel/pull/300/diff?src=pr&el=tree#diff-YXVkaXR3aGVlbC93aGVlbF9hYmkucHk=) | `96.03% <0.00%> (-2.39%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pypa/auditwheel/pull/300?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pypa/auditwheel/pull/300?src=pr&el=footer). Last update [bcf8083...e474199](https://codecov.io/gh/pypa/auditwheel/pull/300?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/auditwheel/policy/policy.json b/auditwheel/policy/policy.json
index a490df4..0ed5d38 100644
--- a/auditwheel/policy/policy.json
+++ b/auditwheel/policy/policy.json
@@ -154,6 +154,56 @@
          "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22"]
        }
      },
+     "lib_whitelist": [
+         "libgcc_s.so.1",
+         "libstdc++.so.6",
+         "libm.so.6", "libdl.so.2", "librt.so.1",
+         "libc.so.6", "libnsl.so.1", "libutil.so.1", "libpthread.so.0",
+         "libX11.so.6", "libXext.so.6", "libXrender.so.1", "libICE.so.6",
+         "libSM.so.6", "libGL.so.1", "libgobject-2.0.so.0",
+         "libgthread-2.0.so.0", "libglib-2.0.so.0", "libresolv.so.2"
+     ]},
+    {"name": "manylinux_2_27",
+     "aliases": [],
+     "priority": 65,
+     "symbol_versions": {
+       "i686": {
+         "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "FLOAT128", "TM_1"],
+         "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "4.0.0", "4.2.0", "4.3.0", "4.4.0", "4.5.0", "4.7.0", "4.8.0", "7.0.0"],
+         "GLIBC": ["2.0", "2.1", "2.1.1", "2.1.2", "2.1.3", "2.2", "2.2.1", "2.2.2", "2.2.3", "2.2.4", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"],
+         "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"]
+       },
+       "x86_64": {
+         "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "FLOAT128", "TM_1"],
+         "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "4.8.0", "7.0.0"],
+         "GLIBC": ["2.2.5", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"],
+         "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"]
+       },
+       "aarch64": {
+         "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "TM_1"],
+         "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.5.0", "4.7.0", "7.0.0"],
+         "GLIBC": ["2.0", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"],
+         "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"]
+       },
+       "ppc64le": {
+         "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "LDBL_1.3", "TM_1"],
+         "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"],
+         "GLIBC": ["2.0", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"],
+         "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24", "LDBL_3.4", "LDBL_3.4.10", "LDBL_3.4.21", "LDBL_3.4.7"]
+       },
+       "s390x": {
+         "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "LDBL_1.3", "TM_1"],
+         "GCC": ["3.0", "3.3", "3.3.1", "3.4", "3.4.2", "3.4.4", "4.0.0", "4.1.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"],
+         "GLIBC": ["2.2", "2.2.1", "2.2.2", "2.2.3", "2.2.4", "2.2.6", "2.3", "2.3.2", "2.3.3", "2.3.4", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.19", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"],
+         "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24", "LDBL_3.4", "LDBL_3.4.10", "LDBL_3.4.21", "LDBL_3.4.7"]
+       },
+       "armv7l": {
+         "CXXABI": ["1.3", "1.3.1", "1.3.2", "1.3.3", "1.3.4", "1.3.5", "1.3.6", "1.3.7", "1.3.8", "1.3.9", "1.3.10", "1.3.11", "ARM_1.3.3", "TM_1"],
+         "GCC": ["3.0", "3.3", "3.3.1", "3.3.4", "3.4", "3.4.2", "3.5", "4.0.0", "4.2.0", "4.3.0", "4.7.0", "7.0.0"],
+         "GLIBC": ["2.0", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14", "2.15", "2.16", "2.17", "2.18", "2.22", "2.23", "2.24", "2.25", "2.26", "2.27"],
+         "GLIBCXX": ["3.4", "3.4.1", "3.4.2", "3.4.3", "3.4.4", "3.4.5", "3.4.6", "3.4.7", "3.4.8", "3.4.9", "3.4.10", "3.4.11", "3.4.12", "3.4.13", "3.4.14", "3.4.15", "3.4.16", "3.4.17", "3.4.18", "3.4.19", "3.4.20", "3.4.21", "3.4.22", "3.4.23", "3.4.24"]
+       }
+     },
      "lib_whitelist": [
          "libgcc_s.so.1",
          "libstdc++.so.6",


Test patch:
diff --git a/tests/unit/test_policy.py b/tests/unit/test_policy.py
index 11b2632..6694ad7 100644
--- a/tests/unit/test_policy.py
+++ b/tests/unit/test_policy.py
@@ -100,6 +100,7 @@ class TestPolicyAccess:
 
     def test_get_by_priority(self):
         _arch = get_arch_name()
+        assert get_policy_name(65) == f'manylinux_2_27_{_arch}'
         assert get_policy_name(70) == f'manylinux_2_24_{_arch}'
         assert get_policy_name(80) == f'manylinux_2_17_{_arch}'
         if _arch in {'x86_64', 'i686'}:
@@ -120,6 +121,7 @@ class TestPolicyAccess:
 
     def test_get_by_name(self):
         _arch = get_arch_name()
+        assert get_priority_by_name(f"manylinux_2_27_{_arch}") == 65
         assert get_priority_by_name(f"manylinux_2_24_{_arch}") == 70
         assert get_priority_by_name(f"manylinux2014_{_arch}") == 80
         assert get_priority_by_name(f"manylinux_2_17_{_arch}") == 80