@@ -29,6 +29,7 @@ let
2929 pythonVersion = majorVersion;
3030 version = "${majorVersion}.${minorVersion}${minorVersionSuffix}";
3131 libPrefix = "python${majorVersion}";
32+ sitePackages = "lib/${libPrefix}/site-packages";
3233
3334 buildInputs = filter (p: p != null) [
3435 glibc
@@ -103,8 +104,16 @@ stdenv.mkDerivation {
103104 echo "manylinux1_compatible=False" >> $out/lib/${libPrefix}/_manylinux.py
104105 '';
105106
107+ postFixup = ''
108+ # tkinter goes in a separate output
109+ mkdir -p $tkinter/${sitePackages}
110+ mv $out/lib/${libPrefix}/lib-dynload/_tkinter* $tkinter/${sitePackages}/
111+ '';
112+
113+ outputs = ["out" "tkinter"];
114+
106115 passthru = rec {
107− inherit libPrefix;
116+ inherit libPrefix sitePackages;
108117 zlibSupport = zlib != null;
109118 sqliteSupport = sqlite != null;
110119 dbSupport = db != null;
@@ -117,7 +126,6 @@ stdenv.mkDerivation {
117126 isPy3 = true;
118127 isPy35 = true;
119128 is_py3k = true; # deprecated
120− sitePackages = "lib/${libPrefix}/site-packages";
121129 interpreter = "${self}/bin/${executable}";
122130 };
123131