mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
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 {
|
||||
pname = "ruffus";
|
||||
version = "2.8.1";
|
||||
version = "2.8.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cgat-developers";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1gyabqafq4s2sy0prh3k1m8859shzjmfxr7fimx10liflvki96a9";
|
||||
sha256 = "0fnzpchwwqsy5h18fs0n90s51w25n0dx0l74j0ka6lvhjl5sxn4c";
|
||||
};
|
||||
|
||||
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 = [
|
||||
gevent
|
||||
hostname
|
||||
pytest
|
||||
];
|
||||
|
||||
# tests very flaky & hang often on darwin
|
||||
doCheck = !stdenv.isDarwin;
|
||||
# test files do indeed need to be executed separately
|
||||
checkPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
cd ruffus/test
|
||||
make all PYTEST_OPTIONS="-q --disable-warnings"
|
||||
pushd ruffus/test
|
||||
rm test_with_logger.py # spawns 500 processes
|
||||
for f in test_*.py ; do
|
||||
HOME=$TMPDIR pytest -v --disable-warnings $f
|
||||
done
|
||||
popd
|
||||
'';
|
||||
pythonImportsCheck = [ "ruffus" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Light-weight Python Computational Pipeline Management";
|
||||
|
Loading…
Reference in New Issue
Block a user