Skip to content

Commit 35bc455

Browse files
committedJul 27, 2017
pysideShiboken: fix with python 3
1 parent 26dc473 commit 35bc455

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed
 

‎pkgs/development/python-modules/pyside/shiboken.nix

+9-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# This derivation provides a Python module and should therefore be called via `python-packages.nix`.
44
# Python 3.5 is not supported: https://github.com/PySide/Shiboken/issues/77
5-
buildPythonPackage rec {
5+
with lib; buildPythonPackage rec {
66
name = "${pname}-${version}";
77
pname = "pyside-shiboken";
88
version = "1.2.4";
@@ -23,15 +23,18 @@ buildPythonPackage rec {
2323
substituteInPlace generator/CMakeLists.txt --replace \
2424
\"$\{GENERATORRUNNER_PLUGIN_DIR}\" lib/generatorrunner/
2525
'';
26-
patches = if isPy35 then [ ./shiboken_py35.patch ] else null;
26+
patches = optional isPy35 ./shiboken_py35.patch;
2727

28-
cmakeFlags = if isPy3k then "-DUSE_PYTHON3=TRUE" else null;
28+
cmakeFlags = optionals isPy3k [
29+
"-DUSE_PYTHON3=TRUE" "-DPYTHON3_LIBRARY=${python}/lib/libpython3.so"
30+
"-DPYTHON3_INCLUDE_DIR=${python}/include/${python.libPrefix}"
31+
];
2932

3033
meta = {
3134
description = "Plugin (front-end) for pyside-generatorrunner, that generates bindings for C++ libraries using CPython source code";
32-
license = lib.licenses.gpl2;
35+
license = licenses.gpl2;
3336
homepage = "http://www.pyside.org/docs/shiboken/";
34-
maintainers = [ lib.maintainers.chaoflow ];
35-
platforms = lib.platforms.all;
37+
maintainers = [ maintainers.chaoflow ];
38+
platforms = platforms.all;
3639
};
3740
}

0 commit comments

Comments
 (0)