Merge pull request #19309 from FRidh/outputs

Python: use separate output for tkinter
This commit is contained in:
Frederik Rietdijk
2016-10-13 10:40:14 +02:00
committed by GitHub
28 changed files with 172 additions and 249 deletions

View File

@@ -1,6 +1,8 @@
{ stdenv, fetchurl, pythonFull }:
{ stdenv, fetchurl, python }:
stdenv.mkDerivation rec {
let
pythonEnv = python.withPackages(ps: [ps.pyro3]);
in stdenv.mkDerivation rec {
name = "openopc-${version}";
version = "1.2.0";
@@ -13,16 +15,16 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p "$out/bin"
mkdir -p "$out/share/doc/openopc"
mkdir -p "$out/${pythonFull.python.sitePackages}"
mkdir -p "$out/${pythonEnv.python.sitePackages}"
mkdir -p "$out/libexec/opc"
cp src/OpenOPC.py "$out/${pythonFull.python.sitePackages}"
cp src/OpenOPC.py "$out/${pythonEnv.python.sitePackages}"
cp src/opc.py "$out/libexec/opc/"
cat > "$out/bin/opc" << __EOF__
#!${stdenv.shell}
export PYTHONPATH="$out/${pythonFull.python.sitePackages}"
exec ${pythonFull}/bin/${pythonFull.python.executable} "$out/libexec/opc/opc.py" "\$@"
export PYTHONPATH="$out/${pythonEnv.python.sitePackages}"
exec ${pythonEnv}/bin/${pythonEnv.python.executable} "$out/libexec/opc/opc.py" "\$@"
__EOF__
chmod a+x "$out/bin/opc"

View File

@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
doCheck = true;
checkPhase = "python runtests.py";
buildInputs = [ python python.modules.bsddb libxslt
buildInputs = [ python libxslt
libxml2 pythonPackages.genshi pythonPackages.lxml makeWrapper ];
installPhase = ''