2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-28 15:46:44 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-06-16 21:19:33 +00:00
|
|
|
, isPy27
|
2018-10-28 15:46:44 +00:00
|
|
|
, python
|
|
|
|
, pytest
|
|
|
|
, numpy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "traits";
|
2021-03-24 09:28:31 +00:00
|
|
|
version = "6.2.0";
|
2020-06-16 21:19:33 +00:00
|
|
|
disabled = isPy27; # setup.py no longer py3 compat
|
2018-10-28 15:46:44 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-24 09:28:31 +00:00
|
|
|
sha256 = "16fa1518b0778fd53bf0547e6a562b1787bf68c8f6b7995a13bd1902529fdb0c";
|
2018-10-28 15:46:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Use pytest because its easier to discover tests
|
|
|
|
buildInputs = [ pytest ];
|
|
|
|
propagatedBuildInputs = [ numpy ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
py.test $out/${python.sitePackages}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Test suite is broken for 3.x on latest release
|
|
|
|
# https://github.com/enthought/traits/issues/187
|
|
|
|
# https://github.com/enthought/traits/pull/188
|
|
|
|
# Furthermore, some tests fail due to being in a chroot
|
2020-05-04 18:32:01 +00:00
|
|
|
doCheck = false;
|
2018-10-28 15:46:44 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-28 15:46:44 +00:00
|
|
|
description = "Explicitly typed attributes for Python";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://pypi.python.org/pypi/traits";
|
2018-10-28 15:46:44 +00:00
|
|
|
license = "BSD";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|