1{
2 lib,
3 buildPythonPackage,
4 fetchpatch,
5 fetchPypi,
6 numpy,
7 scipy,
8 six,
9 decorator,
10 nose,
11}:
12
13buildPythonPackage rec {
14 pname = "paramz";
15 version = "0.9.5";
16 format = "setuptools";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "0917211c0f083f344e7f1bc997e0d713dbc147b6380bc19f606119394f820b9a";
21 };
22
23 patches = [
24 (fetchpatch {
25 name = "remove-deprecated-numpy-uses";
26 url = "https://github.com/sods/paramz/pull/38/commits/a5a0be15b12c5864b438d870b519ad17cc72cd12.patch";
27 hash = "sha256-vj/amEXL9QJ7VdqJmyhv/lj8n+yuiZEARQBYWw6lgBA=";
28 })
29 (fetchpatch {
30 name = "_raveled_index_for.patch";
31 url = "https://github.com/sods/paramz/pull/40/commits/dd68a81cfd28edb48354c6a9b493ef711f00fb5b.patch";
32 hash = "sha256-nbnW3lYJDT1WXko3Y28YyELhO0QIAA1Tx0CJ57T1Nq0=";
33 })
34 ];
35
36 propagatedBuildInputs = [
37 numpy
38 scipy
39 six
40 decorator
41 ];
42 nativeCheckInputs = [ nose ];
43
44 pythonImportsCheck = [ "paramz" ];
45
46 checkPhase = ''
47 nosetests -v paramz/tests
48 '';
49
50 meta = with lib; {
51 description = "Parameterization framework for parameterized model creation and handling";
52 homepage = "https://github.com/sods/paramz";
53 license = licenses.bsd3;
54 maintainers = with maintainers; [ bcdarwin ];
55 };
56}