2024-06-05 15:53:02 +00:00
{
lib ,
buildPythonPackage ,
fetchPypi ,
isPy3k ,
isPyPy ,
python ,
pythonAtLeast ,
coverage ,
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
version = " 1 . 3 . 7 " ;
2024-01-02 11:29:13 +00:00
format = " s e t u p t o o l s " ;
2020-04-24 23:36:52 +00:00
pname = " n o s e " ;
2024-01-13 08:15:51 +00:00
# unmaintained, relies on the imp module
disabled = pythonAtLeast " 3 . 1 2 " ;
2020-04-24 23:36:52 +00:00
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 "
'' ;
2023-04-29 16:46:19 +00:00
preBuild = lib . optionalString ( isPy3k ) ''
2023-11-16 04:20:00 +00:00
$ { python . pythonOnBuildForHost } /bin/2to3 - wn nose functional_tests unit_tests
2022-02-10 20:34:41 +00:00
'' ;
2020-04-24 23:36:52 +00:00
propagatedBuildInputs = [ coverage ] ;
2022-09-30 11:47:45 +00:00
doCheck = false ; # lot's of transient errors, too much hassle
2024-06-05 15:53:02 +00:00
checkPhase =
if isPy3k then
''
$ { python . pythonOnBuildForHost . interpreter } setup . py build_tests
''
else
" "
+ ''
rm functional_tests/test_multiprocessing/test_concurrent_shared.py * # see https://github.com/nose-devs/nose/commit/226bc671c73643887b36b8467b34ad485c2df062
$ { python . pythonOnBuildForHost . interpreter } selftest . py
'' ;
2020-04-24 23:36:52 +00:00
2021-01-15 22:18:51 +00:00
meta = with lib ; {
2023-04-29 16:46:19 +00:00
broken = isPyPy ; # missing 2to3 conversion utility
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 " ;
2024-04-21 15:54:59 +00:00
mainProgram = " n o s e t e s t s " ;
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
} ;
}