pythonPackages.pycdio: fix for Python 3

This commit is contained in:
Emily 2019-12-14 03:21:34 +00:00
parent 3140fa89c5
commit 1314521936

View File

@ -4,20 +4,23 @@
, setuptools , setuptools
, nose , nose
, pkgs , pkgs
, isPy27
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "pycdio"; pname = "pycdio";
version = "2.1.0"; version = "2.1.0";
disabled = !isPy27;
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "01b7vqqfry071p60sabydym7r3m3rxszyqpdbs1qi5rk2sfyblnn"; 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 = '' preConfigure = ''
patchShebangs . patchShebangs .