1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy27
5, python
6, pytest
7, numpy
8}:
9
10buildPythonPackage rec {
11 pname = "traits";
12 version = "6.2.0";
13 disabled = isPy27; # setup.py no longer py3 compat
14
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "16fa1518b0778fd53bf0547e6a562b1787bf68c8f6b7995a13bd1902529fdb0c";
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 lib; {
35 description = "Explicitly typed attributes for Python";
36 homepage = "https://pypi.python.org/pypi/traits";
37 license = "BSD";
38 };
39
40}