From 515a13b1f50fad34482457c616e6c5d090c2da3c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Wed, 9 Dec 2015 11:05:26 +0100 Subject: [PATCH] python pyside: move callPackage to python-packages.nix This should make pyside available for all Python versions. --- .../development/python-modules/pyside/apiextractor.nix | 6 +++--- pkgs/development/python-modules/pyside/default.nix | 2 +- .../python-modules/pyside/generatorrunner.nix | 6 +++--- pkgs/development/python-modules/pyside/shiboken.nix | 9 ++++++--- pkgs/development/python-modules/pyside/tools.nix | 6 +++--- pkgs/top-level/all-packages.nix | 10 +++++----- pkgs/top-level/python-packages.nix | 10 ++++++++++ 7 files changed, 31 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/pyside/apiextractor.nix b/pkgs/development/python-modules/pyside/apiextractor.nix index e3bcf059c1c2..c7e0cc09f14b 100644 --- a/pkgs/development/python-modules/pyside/apiextractor.nix +++ b/pkgs/development/python-modules/pyside/apiextractor.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchurl, cmake, libxml2, libxslt, python27Packages, qt4 }: +{ stdenv, fetchurl, cmake, libxml2, libxslt, python, sphinx, qt4 }: stdenv.mkDerivation { - name = "pyside-apiextractor-0.10.10"; + name = "${python.libPrefix}-pyside-apiextractor-0.10.10"; src = fetchurl { url = "https://github.com/PySide/Apiextractor/archive/0.10.10.tar.gz"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [ cmake libxml2 libxslt python27Packages.sphinx qt4 ]; + buildInputs = [ cmake libxml2 libxslt sphinx qt4 ]; meta = { description = "Eases the development of bindings of Qt-based libraries for high level languages by automating most of the process"; diff --git a/pkgs/development/python-modules/pyside/default.nix b/pkgs/development/python-modules/pyside/default.nix index f81a2fda56c7..fc009a208b70 100644 --- a/pkgs/development/python-modules/pyside/default.nix +++ b/pkgs/development/python-modules/pyside/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, pysideGeneratorrunner, pysideShiboken, qt4 }: +{ stdenv, fetchurl, cmake, python, pysideGeneratorrunner, pysideShiboken, qt4 }: stdenv.mkDerivation rec { name = "${python.libPrefix}-pyside-${version}"; diff --git a/pkgs/development/python-modules/pyside/generatorrunner.nix b/pkgs/development/python-modules/pyside/generatorrunner.nix index 2423cbb0c2e4..b576b29dae7b 100644 --- a/pkgs/development/python-modules/pyside/generatorrunner.nix +++ b/pkgs/development/python-modules/pyside/generatorrunner.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchurl, cmake, pysideApiextractor, python27Packages, qt4 }: +{ stdenv, fetchurl, cmake, pysideApiextractor, python, sphinx, qt4 }: stdenv.mkDerivation { - name = "pyside-generatorrunner-0.6.16"; + name = "${python.libPrefix}-pyside-generatorrunner-0.6.16"; src = fetchurl { url = "https://github.com/PySide/Generatorrunner/archive/0.6.16.tar.gz"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [ cmake pysideApiextractor python27Packages.sphinx qt4 ]; + buildInputs = [ cmake pysideApiextractor sphinx qt4 ]; meta = { description = "Eases the development of binding generators for C++ and Qt-based libraries by providing a framework to help automating most of the process"; diff --git a/pkgs/development/python-modules/pyside/shiboken.nix b/pkgs/development/python-modules/pyside/shiboken.nix index c2550a852f7f..549b6275a8ce 100644 --- a/pkgs/development/python-modules/pyside/shiboken.nix +++ b/pkgs/development/python-modules/pyside/shiboken.nix @@ -1,6 +1,7 @@ -{ stdenv, fetchurl, cmake, pysideApiextractor, pysideGeneratorrunner, python27, python27Packages, qt4 }: +{ stdenv, fetchurl, cmake, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35 }: -stdenv.mkDerivation rec { +# Python 3.5 is not supported: https://github.com/PySide/Shiboken/issues/77 +if isPy35 then throw "shiboken not supported for interpreter ${python.executable}" else stdenv.mkDerivation rec { name = "${python.libPrefix}-pyside-shiboken-${version}"; version = "1.2.4"; @@ -11,7 +12,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - buildInputs = [ cmake pysideApiextractor pysideGeneratorrunner python27 python27Packages.sphinx qt4 ]; + buildInputs = [ cmake libxml2 libxslt pysideApiextractor pysideGeneratorrunner python sphinx qt4 ]; preConfigure = '' echo "preConfigure: Fixing shiboken_generator install target." @@ -19,6 +20,8 @@ stdenv.mkDerivation rec { \"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/ ''; + cmakeFlags = if isPy3k then "-DUSE_PYTHON3=TRUE" else null; + meta = { description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code"; license = stdenv.lib.licenses.gpl2; diff --git a/pkgs/development/python-modules/pyside/tools.nix b/pkgs/development/python-modules/pyside/tools.nix index b5ddec09c03e..facbccdce355 100644 --- a/pkgs/development/python-modules/pyside/tools.nix +++ b/pkgs/development/python-modules/pyside/tools.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchurl, cmake, pyside, python27, qt4, pysideShiboken }: +{ stdenv, fetchurl, cmake, pyside, python, qt4, pysideShiboken }: stdenv.mkDerivation { - name = "pyside-tools-0.2.15"; + name = "${python.libPrefix}-pyside-tools-0.2.15"; src = fetchurl { url = "https://github.com/PySide/Tools/archive/0.2.15.tar.gz"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { enableParallelBuilding = true; - buildInputs = [ cmake pyside python27 qt4 pysideShiboken ]; + buildInputs = [ cmake pyside python qt4 pysideShiboken ]; meta = { description = "Tools for pyside, the LGPL-licensed Python bindings for the Qt cross-platform application and UI framework"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bb235ab056b4..51510e542d4d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9045,15 +9045,15 @@ let pyqt4 = pythonPackages.pyqt4; - pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { }; + pysideApiextractor = pythonPackages.pysideApiextractor; - pysideGeneratorrunner = callPackage ../development/python-modules/pyside/generatorrunner.nix { }; + pysideGeneratorrunner = pythonPackages.pysideGeneratorrunner; - pyside = callPackage ../development/python-modules/pyside { }; + pyside = pythonPackages.pyside; - pysideTools = callPackage ../development/python-modules/pyside/tools.nix { }; + pysideTools = pythonPackages.pysideTools; - pysideShiboken = callPackage ../development/python-modules/pyside/shiboken.nix { }; + pysideShiboken = pythonpackages.pysideShiboken; pyxml = callPackage ../development/python-modules/pyxml { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0f84285c5f03..86b2822e7ea1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -169,6 +169,16 @@ in modules // { qt5 = pkgs.qt5; }; + pyside = callPackage ../development/python-modules/pyside { }; + + pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { }; + + pysideGeneratorrunner = callPackage ../development/python-modules/pyside/generatorrunner.nix { }; + + pysideShiboken = callPackage ../development/python-modules/pyside/shiboken.nix { }; + + pysideTools = callPackage ../development/python-modules/pyside/tools.nix { }; + sip = callPackage ../development/python-modules/sip { }; sip_4_16 = callPackage ../development/python-modules/sip/4.16.nix { };