summary refs log tree commit diff
path: root/pkgs/development/python-modules/trackpy
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2019-07-12 23:35:05 -0400
committerChris Ostrouchov <chris.ostrouchov@gmail.com>2019-07-14 14:26:44 -0400
commitaf412fcef480fd7abef1a8c0c4166515f0b02025 (patch)
tree9ed9544ab43dbf55a64982e36d3ed7417c7e7fdf /pkgs/development/python-modules/trackpy
parent715f7d72dd231c8e22ac1114ba8885ce2c53a9bc (diff)
downloadnixpkgs-af412fcef480fd7abef1a8c0c4166515f0b02025.tar
nixpkgs-af412fcef480fd7abef1a8c0c4166515f0b02025.tar.gz
nixpkgs-af412fcef480fd7abef1a8c0c4166515f0b02025.tar.bz2
nixpkgs-af412fcef480fd7abef1a8c0c4166515f0b02025.tar.lz
nixpkgs-af412fcef480fd7abef1a8c0c4166515f0b02025.tar.xz
nixpkgs-af412fcef480fd7abef1a8c0c4166515f0b02025.tar.zst
nixpkgs-af412fcef480fd7abef1a8c0c4166515f0b02025.zip
pythonPackages.trackpy: init at 0.4.1
Diffstat (limited to 'pkgs/development/python-modules/trackpy')
-rw-r--r--pkgs/development/python-modules/trackpy/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/trackpy/default.nix b/pkgs/development/python-modules/trackpy/default.nix
new file mode 100644
index 00000000000..2e26679ebf2
--- /dev/null
+++ b/pkgs/development/python-modules/trackpy/default.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, buildPythonPackage
+, fetchFromGitHub
+, numpy
+, scipy
+, six
+, pandas
+, pyyaml
+, matplotlib
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "trackpy";
+  version = "0.4.1";
+
+  src = fetchFromGitHub {
+    owner = "soft-matter";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "01fdv93f6z16gypmvqnlbjmcih7dmr7a63n5w9swmp11x3if4iyq";
+  };
+
+  propagatedBuildInputs = [
+    numpy
+    scipy
+    six
+    pandas
+    pyyaml
+    matplotlib
+  ];
+
+  checkInputs = [
+    pytest
+  ];
+
+  checkPhase = ''
+    ${stdenv.lib.optionalString (stdenv.isDarwin) ''
+    # specifically needed for darwin
+    export HOME=$(mktemp -d)
+    mkdir -p $HOME/.matplotlib
+    echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
+    ''}
+
+    pytest trackpy --ignore trackpy/tests/test_motion.py \
+                   --ignore trackpy/tests/test_feature_saving.py \
+                   --ignore trackpy/tests/test_feature.py \
+                   --ignore trackpy/tests/test_legacy_linking.py
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Particle-tracking toolkit";
+    homepage = https://github.com/soft-matter/trackpy;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.costrouc ];
+  };
+}