pyside: fix on Python 3.x, closes #25328
Pyside requires several tools that do not provide Python modules. They therefore do not need to be build Python-version dependent and so we move them out of `python-packages.nix`. Furthermore, shiboken needs libxml2 and libxslt libraries but not their Python bindings.
This commit is contained in:
parent
d729a25a3e
commit
a4aaf5adfd
@ -1,6 +1,9 @@
|
|||||||
{ stdenv, fetchurl, cmake, libxml2, libxslt, python, sphinx, qt4 }:
|
{ stdenv, fetchurl, cmake, libxml2, libxslt, python2, qt4 }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
# This derivation does not provide any Python module and should therefore be called via `all-packages.nix`.
|
||||||
|
let
|
||||||
|
pythonEnv = python2.withPackages(ps: with ps; [ sphinx ]);
|
||||||
|
in stdenv.mkDerivation {
|
||||||
name = "pyside-apiextractor-0.10.10";
|
name = "pyside-apiextractor-0.10.10";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -10,7 +13,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
buildInputs = [ cmake libxml2 libxslt sphinx qt4 ];
|
buildInputs = [ cmake qt4 pythonEnv libxml2 libxslt ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Eases the development of bindings of Qt-based libraries for high level languages by automating most of the process";
|
description = "Eases the development of bindings of Qt-based libraries for high level languages by automating most of the process";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ lib, fetchurl, cmake, python, buildPythonPackage, pysideGeneratorrunner, pysideShiboken, qt4 }:
|
{ lib, fetchurl, cmake, python, buildPythonPackage, pysideGeneratorrunner, pysideShiboken, qt4 }:
|
||||||
|
|
||||||
|
# This derivation provides a Python module and should therefore be called via `python-packages.nix`.
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
name = "pyside-${version}";
|
name = "pyside-${version}";
|
||||||
version = "1.2.4";
|
version = "1.2.4";
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
{ stdenv, fetchurl, cmake, pysideApiextractor, python, sphinx, qt4 }:
|
{ stdenv, fetchurl, cmake, pysideApiextractor, python2, qt4 }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
# This derivation does not provide any Python module and should therefore be called via `all-packages.nix`.
|
||||||
name = "pyside-generatorrunner-0.6.16";
|
let
|
||||||
|
pythonEnv = python2.withPackages(ps: with ps; [ sphinx ]);
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
pname = "pyside-generatorrunner";
|
||||||
|
version = "0.6.16";
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/PySide/Generatorrunner/archive/0.6.16.tar.gz";
|
url = "https://github.com/PySide/Generatorrunner/archive/0.6.16.tar.gz";
|
||||||
@ -10,7 +15,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
buildInputs = [ cmake pysideApiextractor sphinx qt4 ];
|
buildInputs = [ cmake pysideApiextractor qt4 pythonEnv ];
|
||||||
|
|
||||||
meta = {
|
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";
|
description = "Eases the development of binding generators for C++ and Qt-based libraries by providing a framework to help automating most of the process";
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
{ stdenv, fetchurl, cmake, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35 }:
|
{ lib, fetchurl, cmake, buildPythonPackage, libxml2, libxslt, pysideApiextractor, pysideGeneratorrunner, python, sphinx, qt4, isPy3k, isPy35 }:
|
||||||
|
|
||||||
|
# This derivation provides a Python module and should therefore be called via `python-packages.nix`.
|
||||||
# Python 3.5 is not supported: https://github.com/PySide/Shiboken/issues/77
|
# Python 3.5 is not supported: https://github.com/PySide/Shiboken/issues/77
|
||||||
stdenv.mkDerivation rec {
|
buildPythonPackage rec {
|
||||||
name = "pyside-shiboken-${version}";
|
name = "${pname}-${version}";
|
||||||
|
pname = "pyside-shiboken";
|
||||||
version = "1.2.4";
|
version = "1.2.4";
|
||||||
|
|
||||||
|
format = "other";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/PySide/Shiboken/archive/${version}.tar.gz";
|
url = "https://github.com/PySide/Shiboken/archive/${version}.tar.gz";
|
||||||
sha256 = "1536f73a3353296d97a25e24f9554edf3e6a48126886f8d21282c3645ecb96a4";
|
sha256 = "1536f73a3353296d97a25e24f9554edf3e6a48126886f8d21282c3645ecb96a4";
|
||||||
@ -25,9 +29,9 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";
|
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = lib.licenses.gpl2;
|
||||||
homepage = "http://www.pyside.org/docs/shiboken/";
|
homepage = "http://www.pyside.org/docs/shiboken/";
|
||||||
maintainers = [ stdenv.lib.maintainers.chaoflow ];
|
maintainers = [ lib.maintainers.chaoflow ];
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
{ stdenv, fetchurl, cmake, pyside, python, qt4, pysideShiboken }:
|
{ lib, fetchurl, cmake, pyside, qt4, pysideShiboken, buildPythonPackage }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
# This derivation provides a Python module and should therefore be called via `python-packages.nix`.
|
||||||
name = "pyside-tools-0.2.15";
|
buildPythonPackage rec {
|
||||||
|
pname = "pyside-tools";
|
||||||
|
version = "0.2.15";
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
format = "other";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/PySide/Tools/archive/0.2.15.tar.gz";
|
url = "https://github.com/PySide/Tools/archive/0.2.15.tar.gz";
|
||||||
@ -10,13 +14,13 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
buildInputs = [ cmake pyside python qt4 pysideShiboken ];
|
buildInputs = [ cmake pyside qt4 pysideShiboken ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Tools for pyside, the LGPL-licensed Python bindings for the Qt cross-platform application and UI framework";
|
description = "Tools for pyside, the LGPL-licensed Python bindings for the Qt cross-platform application and UI framework";
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = lib.licenses.gpl2;
|
||||||
homepage = "http://www.pyside.org";
|
homepage = "http://www.pyside.org";
|
||||||
maintainers = [ stdenv.lib.maintainers.chaoflow ];
|
maintainers = [ lib.maintainers.chaoflow ];
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -6124,6 +6124,11 @@ with pkgs;
|
|||||||
pythonPackages = python3Packages;
|
pythonPackages = python3Packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# These pyside tools do not provide any Python modules and are meant to be here.
|
||||||
|
# See ../development/python-modules/pyside/default.nix for details.
|
||||||
|
pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { };
|
||||||
|
pysideGeneratorrunner = callPackage ../development/python-modules/pyside/generatorrunner.nix { };
|
||||||
|
|
||||||
svg2tikz = python27Packages.svg2tikz;
|
svg2tikz = python27Packages.svg2tikz;
|
||||||
|
|
||||||
pyrex = pyrex095;
|
pyrex = pyrex095;
|
||||||
|
@ -49,8 +49,11 @@ let
|
|||||||
fetchSource = {pname, version, sha256}:
|
fetchSource = {pname, version, sha256}:
|
||||||
# Fetch a source tarball.
|
# Fetch a source tarball.
|
||||||
let
|
let
|
||||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.tar.gz";
|
urls = [
|
||||||
in pkgs.fetchurl {inherit url sha256;};
|
"mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.tar.gz"
|
||||||
|
"mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.zip"
|
||||||
|
];
|
||||||
|
in pkgs.fetchurl {inherit urls sha256;};
|
||||||
fetcher = (if format == "wheel" then fetchWheel
|
fetcher = (if format == "wheel" then fetchWheel
|
||||||
else if format == "setuptools" then fetchSource
|
else if format == "setuptools" then fetchSource
|
||||||
else throw "Unsupported kind ${kind}");
|
else throw "Unsupported kind ${kind}");
|
||||||
@ -369,11 +372,9 @@ in {
|
|||||||
|
|
||||||
pyside = callPackage ../development/python-modules/pyside { };
|
pyside = callPackage ../development/python-modules/pyside { };
|
||||||
|
|
||||||
pysideApiextractor = callPackage ../development/python-modules/pyside/apiextractor.nix { };
|
pysideShiboken = callPackage ../development/python-modules/pyside/shiboken.nix {
|
||||||
|
inherit (pkgs) libxml2 libxslt; # Do not need the Python bindings.
|
||||||
pysideGeneratorrunner = callPackage ../development/python-modules/pyside/generatorrunner.nix { };
|
};
|
||||||
|
|
||||||
pysideShiboken = callPackage ../development/python-modules/pyside/shiboken.nix { };
|
|
||||||
|
|
||||||
pysideTools = callPackage ../development/python-modules/pyside/tools.nix { };
|
pysideTools = callPackage ../development/python-modules/pyside/tools.nix { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user