From e9f522eee13629bb39a30950d4db1493596778c4 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Mon, 16 Dec 2019 16:22:21 +0100 Subject: [PATCH] python: remove _manylinux.py This will turn manylinux support back on by default. PIP will now do runtime checks against the compatible glibc version to determine if the current interpreter is compatible with a given manylinux specification. However it will not check if any of the required libraries are present. The motivation here is that we want to support building python packages with wheels that require manylinux support. There is no real change for users of source builds as they are still buildings packages from source. The real noticeable(?) change is that impure usages (e.g. running `pip install package`) will install manylinux packages that previously refused to install. Previously we did claim that we were not compatible with manylinux and thus they wouldn't be installed at all. Now impure users will have basically the same situation as before: If you require some wheel only package it didn't work before and will not properly work now. Now the program will fail during runtime vs during installation time. I think it is a reasonable trade-off since it allows us to install manylinux packages with nix expressions and enables tools like poetry2nix. This should be a net win for users as it allows wheels, that we previously couldn't really support, to be used. --- pkgs/development/interpreters/python/cpython/2.7/default.nix | 3 --- pkgs/development/interpreters/python/cpython/default.nix | 3 --- pkgs/development/interpreters/python/pypy/default.nix | 3 --- 3 files changed, 9 deletions(-) diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index de980f1ca6877..e6b3dff433b3a 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -234,9 +234,6 @@ in with passthru; stdenv.mkDerivation ({ ln -s $out/lib/${libPrefix}/pdb.py $out/bin/pdb${sourceVersion.major}.${sourceVersion.minor} ln -s $out/share/man/man1/{python2.7.1.gz,python.1.gz} - # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484 - echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py - rm "$out"/lib/python*/plat-*/regen # refers to glibc.dev # Determinism: Windows installers were not deterministic. diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 43d2d159e36a7..e75bd0a09875e 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -208,9 +208,6 @@ in with passthru; stdenv.mkDerivation { ln -s "$out/include/${executable}m" "$out/include/${executable}" - # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484 - echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py - # Determinism: Windows installers were not deterministic. # We're also not interested in building Windows installers. find "$out" -name 'wininst*.exe' | xargs -r rm -f diff --git a/pkgs/development/interpreters/python/pypy/default.nix b/pkgs/development/interpreters/python/pypy/default.nix index 8154a87f667d8..b220bfa0f9345 100644 --- a/pkgs/development/interpreters/python/pypy/default.nix +++ b/pkgs/development/interpreters/python/pypy/default.nix @@ -137,9 +137,6 @@ in with passthru; stdenv.mkDerivation rec { # verify cffi modules $out/bin/${executable} -c ${if isPy3k then "'import tkinter;import sqlite3;import curses;import lzma'" else "'import Tkinter;import sqlite3;import curses'"} - # Python on Nix is not manylinux1 compatible. https://github.com/NixOS/nixpkgs/issues/18484 - echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py - # Include a sitecustomize.py file cp ${../sitecustomize.py} $out/lib/${libPrefix}/${sitePackages}/sitecustomize.py '';