mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 23:34:12 +03:00
Python 3.4: separate output for tkinter
This commit is contained in:
parent
cf0932ee84
commit
0bd4b31f87
@ -28,6 +28,7 @@ let
|
||||
pythonVersion = majorVersion;
|
||||
version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
|
||||
libPrefix = "python${majorVersion}";
|
||||
sitePackages = "lib/${libPrefix}/site-packages";
|
||||
|
||||
buildInputs = filter (p: p != null) [
|
||||
zlib
|
||||
@ -102,8 +103,25 @@ stdenv.mkDerivation {
|
||||
echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Get rid of retained dependencies on -dev packages, and remove
|
||||
# some $TMPDIR references to improve binary reproducibility.
|
||||
for i in $out/lib/python${majorVersion}/_sysconfigdata.py $out/lib/python${majorVersion}/config-${majorVersion}m/Makefile; do
|
||||
sed -i $i -e "s|-I/nix/store/[^ ']*||g" -e "s|-L/nix/store/[^ ']*||g" -e "s|$TMPDIR|/no-such-path|g"
|
||||
done
|
||||
|
||||
# FIXME: should regenerate this.
|
||||
rm $out/lib/python${majorVersion}/__pycache__/_sysconfigdata.cpython*
|
||||
|
||||
# tkinter goes in a separate output
|
||||
mkdir -p $tkinter/${sitePackages}
|
||||
mv $out/lib/${libPrefix}/lib-dynload/_tkinter* $tkinter/${sitePackages}/
|
||||
'';
|
||||
|
||||
outputs = ["out" "tkinter"];
|
||||
|
||||
passthru = rec {
|
||||
inherit libPrefix;
|
||||
inherit libPrefix sitePackages;
|
||||
zlibSupport = zlib != null;
|
||||
sqliteSupport = sqlite != null;
|
||||
dbSupport = db != null;
|
||||
@ -116,7 +134,6 @@ stdenv.mkDerivation {
|
||||
isPy3 = true;
|
||||
isPy34 = true;
|
||||
is_py3k = true; # deprecated
|
||||
sitePackages = "lib/${libPrefix}/site-packages";
|
||||
interpreter = "${self}/bin/${executable}";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user