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