From 1314521936b2ad353acbd0a1a5782bce6c1c09c5 Mon Sep 17 00:00:00 2001 From: Emily Date: Sat, 14 Dec 2019 03:21:34 +0000 Subject: [PATCH] pythonPackages.pycdio: fix for Python 3 --- pkgs/development/python-modules/pycdio/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pycdio/default.nix b/pkgs/development/python-modules/pycdio/default.nix index f7a64b9bde4..5b1d774c169 100644 --- a/pkgs/development/python-modules/pycdio/default.nix +++ b/pkgs/development/python-modules/pycdio/default.nix @@ -4,20 +4,23 @@ , setuptools , nose , pkgs -, isPy27 }: buildPythonPackage rec { pname = "pycdio"; version = "2.1.0"; - disabled = !isPy27; src = fetchPypi { inherit pname version; sha256 = "01b7vqqfry071p60sabydym7r3m3rxszyqpdbs1qi5rk2sfyblnn"; }; - prePatch = "sed -i -e '/DRIVER_BSDI/d' pycdio.py"; + prePatch = '' + substituteInPlace setup.py \ + --replace 'library_dirs=library_dirs' 'library_dirs=[dir.decode("utf-8") for dir in library_dirs]' \ + --replace 'include_dirs=include_dirs' 'include_dirs=[dir.decode("utf-8") for dir in include_dirs]' \ + --replace 'runtime_library_dirs=runtime_lib_dirs' 'runtime_library_dirs=[dir.decode("utf-8") for dir in runtime_lib_dirs]' + ''; preConfigure = '' patchShebangs .