Merge pull request #244162 from SuperSandro2000/python-include-pythonm

This commit is contained in:
Artturi 2023-09-03 19:13:34 +03:00 committed by GitHub
commit 67088d4153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -429,8 +429,6 @@ in with passthru; stdenv.mkDerivation {
done
touch $out/lib/${libPrefix}/test/__init__.py
ln -s "$out/include/${executable}m" "$out/include/${executable}"
# Determinism: Windows installers were not deterministic.
# We're also not interested in building Windows installers.
find "$out" -name 'wininst*.exe' | xargs -r rm -f
@ -458,6 +456,9 @@ in with passthru; stdenv.mkDerivation {
# This allows build Python to import host Python's sysconfigdata
mkdir -p "$out/${sitePackages}"
ln -s "$out/lib/${libPrefix}/"_sysconfigdata*.py "$out/${sitePackages}/"
'' + lib.optionalString (pythonOlder "3.8") ''
# This is gone in Python >= 3.8
ln -s "$out/include/${executable}m" "$out/include/${executable}"
'' + optionalString stripConfig ''
rm -R $out/bin/python*-config $out/lib/python*/config-*
'' + optionalString stripIdlelib ''