pythonPackages.pycdio: fix for Python 3
commit1314521936b2ad353acbd0a1a5782bce6c1c09c5
authorEmily <vcs@emily.moe>
dateSat 14 Dec 2019, 03:21 (7 years ago)
parent3140fa8
pkgs/development/python-modules/pycdio/default.nix+6−3
@@ -4,20 +4,23 @@
44, setuptools
55, nose
66, pkgs
7−, isPy27
87}:
98
109buildPythonPackage rec {
1110 pname = "pycdio";
1211 version = "2.1.0";
13− disabled = !isPy27;
1412
1513 src = fetchPypi {
1614 inherit pname version;
1715 sha256 = "01b7vqqfry071p60sabydym7r3m3rxszyqpdbs1qi5rk2sfyblnn";
1816 };
1917
20− prePatch = "sed -i -e '/DRIVER_BSDI/d' pycdio.py";
18+ prePatch = ''
19+ substituteInPlace setup.py \
20+ --replace 'library_dirs=library_dirs' 'library_dirs=[dir.decode("utf-8") for dir in library_dirs]' \
21+ --replace 'include_dirs=include_dirs' 'include_dirs=[dir.decode("utf-8") for dir in include_dirs]' \
22+ --replace 'runtime_library_dirs=runtime_lib_dirs' 'runtime_library_dirs=[dir.decode("utf-8") for dir in runtime_lib_dirs]'
23+ '';
2124
2225 preConfigure = ''
2326 patchShebangs .