Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 39 lines 852 B view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, python 5, pytest 6, numpy 7, isPy33 8}: 9 10buildPythonPackage rec { 11 pname = "traits"; 12 version = "5.1.2"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "0a17qmpw0z9h7ybh5yxrghvkcf2q90vgxzbnv1n4i0fxhi7mjy3s"; 17 }; 18 19 # Use pytest because its easier to discover tests 20 buildInputs = [ pytest ]; 21 propagatedBuildInputs = [ numpy ]; 22 23 checkPhase = '' 24 py.test $out/${python.sitePackages} 25 ''; 26 27 # Test suite is broken for 3.x on latest release 28 # https://github.com/enthought/traits/issues/187 29 # https://github.com/enthought/traits/pull/188 30 # Furthermore, some tests fail due to being in a chroot 31 doCheck = isPy33; 32 33 meta = with stdenv.lib; { 34 description = "Explicitly typed attributes for Python"; 35 homepage = https://pypi.python.org/pypi/traits; 36 license = "BSD"; 37 }; 38 39}