summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-01-03 10:05:50 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-01-04 10:45:22 +0100
commit0a2caa41fe0da9e5c36f47994594650f00e1d111 (patch)
treee7b9a6f88de8a8c3ee71ed65b2d9257836f9a3a0
parentf665828fa374580f4b2fd725761d23e18f55e526 (diff)
downloadnixpkgs-0a2caa41fe0da9e5c36f47994594650f00e1d111.tar
nixpkgs-0a2caa41fe0da9e5c36f47994594650f00e1d111.tar.gz
nixpkgs-0a2caa41fe0da9e5c36f47994594650f00e1d111.tar.bz2
nixpkgs-0a2caa41fe0da9e5c36f47994594650f00e1d111.tar.lz
nixpkgs-0a2caa41fe0da9e5c36f47994594650f00e1d111.tar.xz
nixpkgs-0a2caa41fe0da9e5c36f47994594650f00e1d111.tar.zst
nixpkgs-0a2caa41fe0da9e5c36f47994594650f00e1d111.zip
Python: drop `python.majorVersion`
Drop `python.majorVersion`. For Python language version, use `python.pythonVersion`.
For implementation version, use `python.sourceVersion`.

Some expressions were broken. Those that were identified were fixed.

fixup major
-rw-r--r--pkgs/applications/audio/ingen/default.nix2
-rw-r--r--pkgs/applications/misc/blender/default.nix10
-rw-r--r--pkgs/applications/networking/instant-messengers/profanity/default.nix2
-rw-r--r--pkgs/applications/science/misc/golly/beta.nix4
-rw-r--r--pkgs/applications/science/misc/golly/default.nix5
-rw-r--r--pkgs/development/interpreters/python/default.nix2
-rw-r--r--pkgs/development/libraries/physics/geant4/g4py/default.nix2
-rw-r--r--pkgs/development/python-modules/tensorflow/bin.nix2
-rw-r--r--pkgs/tools/misc/calamares/default.nix4
-rw-r--r--pkgs/tools/networking/unbound/python.nix6
10 files changed, 18 insertions, 21 deletions
diff --git a/pkgs/applications/audio/ingen/default.nix b/pkgs/applications/audio/ingen/default.nix
index e10a25b8917..1e249b51fb7 100644
--- a/pkgs/applications/audio/ingen/default.nix
+++ b/pkgs/applications/audio/ingen/default.nix
@@ -31,7 +31,7 @@ stdenv.mkDerivation  rec {
     for program in ingenams ingenish
     do
       wrapProgram $out/bin/$program \
-        --prefix PYTHONPATH : $out/lib/python${python.majorVersion}/site-packages:$PYTHONPATH
+        --prefix PYTHONPATH : $out/${python.sitePackages}:$PYTHONPATH
     done
   '';
 
diff --git a/pkgs/applications/misc/blender/default.nix b/pkgs/applications/misc/blender/default.nix
index b9d4b83e4f1..340c08a958e 100644
--- a/pkgs/applications/misc/blender/default.nix
+++ b/pkgs/applications/misc/blender/default.nix
@@ -51,10 +51,10 @@ stdenv.mkDerivation rec {
       "-DWITH_SYSTEM_OPENJPEG=ON"
       "-DWITH_PLAYER=ON"
       "-DWITH_OPENSUBDIV=ON"
-      "-DPYTHON_LIBRARY=python${python.majorVersion}m"
+      "-DPYTHON_LIBRARY=${python.libPrefix}"
       "-DPYTHON_LIBPATH=${python}/lib"
-      "-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m"
-      "-DPYTHON_VERSION=${python.majorVersion}"
+      "-DPYTHON_INCLUDE_DIR=${python}/include/${python.libPrefix}"
+      "-DPYTHON_VERSION=${python.pythonVersion}"
       "-DWITH_PYTHON_INSTALL=OFF"
       "-DWITH_PYTHON_INSTALL_NUMPY=OFF"
     ]
@@ -66,7 +66,7 @@ stdenv.mkDerivation rec {
       ]
     ++ optional colladaSupport "-DWITH_OPENCOLLADA=ON";
 
-  NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}m";
+  NIX_CFLAGS_COMPILE = "-I${ilmbase.dev}/include/OpenEXR -I${python}/include/${python.libPrefix}";
 
   # Since some dependencies are built with gcc 6, we need gcc 6's
   # libstdc++ in our RPATH. Sigh.
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
   postInstall = optionalString enableNumpy
     ''
       wrapProgram $out/bin/blender \
-        --prefix PYTHONPATH : ${pythonPackages.numpy}/lib/python${python.majorVersion}/site-packages
+        --prefix PYTHONPATH : ${pythonPackages.numpy}/${python.sitePackages}
     '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/applications/networking/instant-messengers/profanity/default.nix b/pkgs/applications/networking/instant-messengers/profanity/default.nix
index 327b02b2352..cf852ada369 100644
--- a/pkgs/applications/networking/instant-messengers/profanity/default.nix
+++ b/pkgs/applications/networking/instant-messengers/profanity/default.nix
@@ -62,7 +62,7 @@ stdenv.mkDerivation rec {
     ++ optionals pythonPluginSupport [ "-I${python}/include/${python.libPrefix}" ];
 
   LDFLAGS = [ ]
-    ++ optionals pythonPluginSupport [ "-L${python}/lib" "-lpython${python.majorVersion}m" ];
+    ++ optionals pythonPluginSupport [ "-L${python}/lib" "-l${python.libPrefix}" ];
 
   meta = {
     description = "A console based XMPP client";
diff --git a/pkgs/applications/science/misc/golly/beta.nix b/pkgs/applications/science/misc/golly/beta.nix
index 83b9c5a04a1..6f11caf4d9a 100644
--- a/pkgs/applications/science/misc/golly/beta.nix
+++ b/pkgs/applications/science/misc/golly/beta.nix
@@ -4,7 +4,7 @@
 }:
 
 stdenv.mkDerivation rec {
-  name = "golly-${version}";
+  pname = "golly";
   version = "2.8.99.2.20161122";
   #src = fetchurl {
   #  url="mirror://sourceforge/project/golly/golly/golly-2.8/golly-2.8-src.tar.gz";
@@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
   makeFlags=[
     "AM_LDFLAGS="
   ];
-  NIX_LDFLAGS="-lpython${python2.majorVersion} -lperl";
+  NIX_LDFLAGS="-l${python2.libPrefix} -lperl";
   preConfigure=''
     export NIX_LDFLAGS="$NIX_LDFLAGS -L$(dirname "$(find ${perl} -name libperl.so)")"
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE
diff --git a/pkgs/applications/science/misc/golly/default.nix b/pkgs/applications/science/misc/golly/default.nix
index cfa4dca4b0d..74fa4cc02ed 100644
--- a/pkgs/applications/science/misc/golly/default.nix
+++ b/pkgs/applications/science/misc/golly/default.nix
@@ -1,8 +1,7 @@
 {stdenv, fetchurl, wxGTK, perl, python2, zlib, libGLU_combined, libX11}:
 stdenv.mkDerivation rec {
-  baseName="golly";
+  pname = "golly";
   version = "3.2";
-  name="${baseName}-${version}";
 
   src = fetchurl {
     sha256 = "0cg9mbwmf4q6qxhqlnzrxh9y047banxdb8pd3hgj3smmja2zf0jd";
@@ -21,7 +20,7 @@ stdenv.mkDerivation rec {
   makeFlags=[
     "AM_LDFLAGS="
   ];
-  NIX_LDFLAGS="-lpython${python2.majorVersion} -lperl";
+  NIX_LDFLAGS="-l${python2.libPrefix} -lperl";
   preConfigure=''
     export NIX_LDFLAGS="$NIX_LDFLAGS -L$(dirname "$(find ${perl} -name libperl.so)")"
     export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE
diff --git a/pkgs/development/interpreters/python/default.nix b/pkgs/development/interpreters/python/default.nix
index 786ae76c1dd..b45dc55390c 100644
--- a/pkgs/development/interpreters/python/default.nix
+++ b/pkgs/development/interpreters/python/default.nix
@@ -39,8 +39,6 @@ with pkgs;
         pythonAtLeast = lib.versionAtLeast pythonVersion;
         pythonOlder = lib.versionOlder pythonVersion;
         inherit pythonForBuild;
-
-        majorVersion = pythonVersion; # Backwards compatibility. Should be dropped.
   };
 
 in {
diff --git a/pkgs/development/libraries/physics/geant4/g4py/default.nix b/pkgs/development/libraries/physics/geant4/g4py/default.nix
index 551d61af3ad..f28f0fd6420 100644
--- a/pkgs/development/libraries/physics/geant4/g4py/default.nix
+++ b/pkgs/development/libraries/physics/geant4/g4py/default.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
   preConfigure = ''
     # Fix for boost 1.67+
     substituteInPlace CMakeLists.txt \
-    --replace "find_package(Boost)" "find_package(Boost 1.40 REQUIRED COMPONENTS python${builtins.replaceStrings ["."] [""] python.majorVersion})"
+    --replace "find_package(Boost)" "find_package(Boost 1.40 REQUIRED COMPONENTS python${builtins.replaceStrings ["."] [""] python.pythonVersion})"
     for f in `find . -name CMakeLists.txt`; do
       substituteInPlace "$f" \
         --replace "boost_python" "\''${Boost_LIBRARIES}"
diff --git a/pkgs/development/python-modules/tensorflow/bin.nix b/pkgs/development/python-modules/tensorflow/bin.nix
index b925b74e03b..90f8c9e6e30 100644
--- a/pkgs/development/python-modules/tensorflow/bin.nix
+++ b/pkgs/development/python-modules/tensorflow/bin.nix
@@ -45,7 +45,7 @@ in buildPythonPackage rec {
   format = "wheel";
 
   src = let
-    pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) "${python.majorVersion}";
+    pyVerNoDot = lib.strings.stringAsChars (x: if x == "." then "" else x) "${python.pythonVersion}";
     pyver = if stdenv.isDarwin then builtins.substring 0 1 pyVerNoDot else pyVerNoDot;
     platform = if stdenv.isDarwin then "mac" else "linux";
     unit = if cudaSupport then "gpu" else "cpu";
diff --git a/pkgs/tools/misc/calamares/default.nix b/pkgs/tools/misc/calamares/default.nix
index c799b08bd44..edc6a2e4643 100644
--- a/pkgs/tools/misc/calamares/default.nix
+++ b/pkgs/tools/misc/calamares/default.nix
@@ -24,8 +24,8 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = false;
 
   cmakeFlags = [
-    "-DPYTHON_LIBRARY=${python}/lib/libpython${python.majorVersion}m.so"
-    "-DPYTHON_INCLUDE_DIR=${python}/include/python${python.majorVersion}m"
+    "-DPYTHON_LIBRARY=${python}/lib/lib${python.libPrefix}.so"
+    "-DPYTHON_INCLUDE_DIR=${python}/include/${python.libPrefix}"
     "-DCMAKE_VERBOSE_MAKEFILE=True"
     "-DCMAKE_BUILD_TYPE=Release"
     "-DWITH_PYTHONQT:BOOL=ON"
diff --git a/pkgs/tools/networking/unbound/python.nix b/pkgs/tools/networking/unbound/python.nix
index 67e6f2e9c43..c20169d3913 100644
--- a/pkgs/tools/networking/unbound/python.nix
+++ b/pkgs/tools/networking/unbound/python.nix
@@ -19,7 +19,7 @@ in stdenv.mkDerivation rec {
     --replace "\$(LIBTOOL) --mode=install cp _unbound.la" "cp _unbound.la"
     '';
 
-  preConfigure = "export PYTHON_VERSION=${python.majorVersion}";
+  preConfigure = "export PYTHON_VERSION=${python.pythonVersion}";
 
   configureFlags = [
     "--with-ssl=${openssl.dev}"
@@ -46,13 +46,13 @@ in stdenv.mkDerivation rec {
 
   # All we want is the Unbound Python module
   postInstall = ''
-    # Generate the built in root anchor and root key and store these in a logical place 
+    # Generate the built in root anchor and root key and store these in a logical place
     # to be used by tools depending only on the Python module
     $out/bin/unbound-anchor -l | head -1 > $out/etc/${pname}/root.anchor
     $out/bin/unbound-anchor -l | tail --lines=+2 - > $out/etc/${pname}/root.key
     # We don't need anything else
     rm -fR $out/bin $out/share $out/include $out/etc/unbound
-    patchelf --replace-needed libunbound.so.2 $out/${python.sitePackages}/libunbound.so.2 $out/${python.sitePackages}/_unbound.so 
+    patchelf --replace-needed libunbound.so.2 $out/${python.sitePackages}/libunbound.so.2 $out/${python.sitePackages}/_unbound.so
     '';
 
   meta = with stdenv.lib; {