2021-02-05 17:12:51 +00:00
{ lib
2020-04-24 23:36:52 +00:00
, buildPythonPackage
, fetchPypi
, python
, coverage
} :
buildPythonPackage rec {
version = " 1 . 3 . 7 " ;
pname = " n o s e " ;
src = fetchPypi {
inherit pname version ;
sha256 = " f 1 b f f e f 9 c b c 8 2 6 2 8 f 6 e 7 d 7 b 4 0 d 7 e 2 5 5 a e f a a 1 a d b 6 a 1 b 1 d 2 6 c 6 9 a 8 b 7 9 e 6 2 0 8 a 9 8 " ;
} ;
2022-02-10 20:34:41 +00:00
# 2to3 was removed in setuptools 58
postPatch = ''
substituteInPlace setup . py \
- - replace " ' u s e _ 2 t o 3 ' : T r u e , " " "
substituteInPlace setup3lib . py \
- - replace " f r o m s e t u p t o o l s . c o m m a n d . b u i l d _ p y i m p o r t M i x i n 2 t o 3 " " f r o m d i s t u t i l s . u t i l i m p o r t M i x i n 2 t o 3 "
'' ;
2022-04-15 01:41:22 +00:00
preBuild = lib . optionalString
( ( python . isPy3k or false ) && ( python . pname != " p y p y 3 " ) )
''
2022-02-10 20:34:41 +00:00
2 to3 - wn nose functional_tests unit_tests
'' ;
2020-04-24 23:36:52 +00:00
propagatedBuildInputs = [ coverage ] ;
doCheck = false ; # lot's of transient errors, too much hassle
checkPhase = if python . is_py3k or false then ''
$ { python } /bin / $ { python . executable } setup . py build_tests
'' e l s e " " + ''
rm functional_tests/test_multiprocessing/test_concurrent_shared.py * # see https://github.com/nose-devs/nose/commit/226bc671c73643887b36b8467b34ad485c2df062
$ { python } /bin / $ { python . executable } selftest . py
'' ;
2021-01-15 22:18:51 +00:00
meta = with lib ; {
2020-04-24 23:36:52 +00:00
description = " A u n i t t e s t - b a s e d t e s t i n g f r a m e w o r k f o r p y t h o n t h a t m a k e s w r i t i n g a n d r u n n i n g t e s t s e a s i e r " ;
2022-05-18 14:49:53 +00:00
homepage = " h t t p s : / / n o s e . r e a d t h e d o c s . i o / " ;
2020-04-24 23:36:52 +00:00
license = licenses . lgpl3 ;
2022-05-18 14:49:53 +00:00
maintainers = with maintainers ; [ ] ;
2020-04-24 23:36:52 +00:00
} ;
}