pythonPackages.ruffus: 2.8.1 -> 2.8.4, fix build
simplify test execution by skipping their makefile entirely. disable tests on darwin as they are very flaky & hang often. this is probably ok because we're not hacking this package's source to get it installed, and the user is probably getting something very similar as they would get using a regular pip installation.
This commit is contained in:
parent
6efc71f17b
commit
85e6474eee
|
@ -9,39 +9,34 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "ruffus";
|
pname = "ruffus";
|
||||||
version = "2.8.1";
|
version = "2.8.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "cgat-developers";
|
owner = "cgat-developers";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1gyabqafq4s2sy0prh3k1m8859shzjmfxr7fimx10liflvki96a9";
|
sha256 = "0fnzpchwwqsy5h18fs0n90s51w25n0dx0l74j0ka6lvhjl5sxn4c";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ gevent ];
|
propagatedBuildInputs = [ gevent ];
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
sed -i -e 's|/bin/bash|${stdenv.shell}|' ruffus/test/Makefile
|
|
||||||
sed -i -e 's|\tpytest|\t${pytest}/bin/pytest|' ruffus/test/Makefile
|
|
||||||
sed -i -e 's|\tpython|\t${python.interpreter}|' ruffus/test/Makefile
|
|
||||||
sed -i -e 's|/usr/bin/env bash|${stdenv.shell}|' ruffus/test/run_all_unit_tests.cmd
|
|
||||||
sed -i -e 's|python3|${python.interpreter}|' ruffus/test/run_all_unit_tests3.cmd
|
|
||||||
sed -i -e 's|python %s|${python.interpreter} %s|' ruffus/test/test_drmaa_wrapper_run_job_locally.py
|
|
||||||
'';
|
|
||||||
|
|
||||||
makefile = "ruffus/test/Makefile";
|
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
gevent
|
|
||||||
hostname
|
hostname
|
||||||
pytest
|
pytest
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# tests very flaky & hang often on darwin
|
||||||
|
doCheck = !stdenv.isDarwin;
|
||||||
|
# test files do indeed need to be executed separately
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
export HOME=$TMPDIR
|
pushd ruffus/test
|
||||||
cd ruffus/test
|
rm test_with_logger.py # spawns 500 processes
|
||||||
make all PYTEST_OPTIONS="-q --disable-warnings"
|
for f in test_*.py ; do
|
||||||
|
HOME=$TMPDIR pytest -v --disable-warnings $f
|
||||||
|
done
|
||||||
|
popd
|
||||||
'';
|
'';
|
||||||
|
pythonImportsCheck = [ "ruffus" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Light-weight Python Computational Pipeline Management";
|
description = "Light-weight Python Computational Pipeline Management";
|
||||||
|
|
Loading…
Reference in a new issue