2021-02-05 17:12:51 +00:00
{ lib
2020-04-24 23:36:52 +00:00
, buildPythonPackage
, fetchPypi
2022-09-30 11:47:45 +00:00
, isPy3k
, isPyPy
2020-04-24 23:36:52 +00:00
, python
, coverage
2022-09-30 11:47:45 +00:00
, buildPackages
2020-04-24 23:36:52 +00:00
} :
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 "
'' ;
2023-04-29 16:46:19 +00:00
preBuild = lib . optionalString ( isPy3k ) ''
2022-09-30 11:47:45 +00:00
$ { python . pythonForBuild } /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
checkPhase = if isPy3k then ''
$ { python . pythonForBuild . interpreter } setup . py build_tests
2020-04-24 23:36:52 +00:00
'' e l s e " " + ''
rm functional_tests/test_multiprocessing/test_concurrent_shared.py * # see https://github.com/nose-devs/nose/commit/226bc671c73643887b36b8467b34ad485c2df062
2022-09-30 11:47:45 +00:00
$ { python . pythonForBuild . 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 " ;
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
} ;
}