about summary refs log tree commit diff
path: root/pkgs/development/python-modules/scikit-bio/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/scikit-bio/default.nix')
-rw-r--r--pkgs/development/python-modules/scikit-bio/default.nix85
1 files changed, 48 insertions, 37 deletions
diff --git a/pkgs/development/python-modules/scikit-bio/default.nix b/pkgs/development/python-modules/scikit-bio/default.nix
index 2f49063ae06cb..7068063a8cb5d 100644
--- a/pkgs/development/python-modules/scikit-bio/default.nix
+++ b/pkgs/development/python-modules/scikit-bio/default.nix
@@ -1,53 +1,64 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, cython
-, lockfile
-, cachecontrol
-, decorator
-, h5py
-, ipython
-, matplotlib
-, natsort
-, numpy
-, pandas
-, scipy
-, hdmedians
-, scikit-learn
-, coverage
-, python
-, isPy3k
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  setuptools,
+  cython,
+  oldest-supported-numpy,
+  requests,
+  decorator,
+  natsort,
+  numpy,
+  pandas,
+  scipy,
+  h5py,
+  hdmedians,
+  biom-format,
+  python,
+  pytestCheckHook,
 }:
 
 buildPythonPackage rec {
-  version = "0.6.0";
-  format = "setuptools";
   pname = "scikit-bio";
-  disabled = !isPy3k;
+  version = "0.6.0";
+  pyproject = true;
 
-  src = fetchPypi {
-    inherit pname version;
-    hash = "sha256-EBBafDwVrlkQJEkn8punqjUjSxnr5lE7hIRUc0OywQ8=";
+  src = fetchFromGitHub {
+    owner = "scikit-bio";
+    repo = "scikit-bio";
+    rev = "refs/tags/${version}";
+    hash = "sha256-v8/r52pJpMi34SekPQBf7CqRbs+ZEyPR3WO5RBB7uKg=";
   };
 
-  nativeBuildInputs = [ cython ];
-  nativeCheckInputs = [ coverage ];
-  propagatedBuildInputs = [ lockfile cachecontrol decorator ipython matplotlib natsort numpy pandas scipy h5py hdmedians scikit-learn ];
+  build-system = [
+    setuptools
+    cython
+    oldest-supported-numpy
+  ];
+
+  dependencies = [
+    requests
+    decorator
+    natsort
+    numpy
+    pandas
+    scipy
+    h5py
+    hdmedians
+    biom-format
+  ];
 
-  # cython package not included for tests
-  doCheck = false;
+  nativeCheckInputs = [ pytestCheckHook ];
 
-  checkPhase = ''
-    ${python.interpreter} -m skbio.test
-  '';
+  # only the $out dir contains the built cython extensions, so we run the tests inside there
+  pytestFlagsArray = [ "${placeholder "out"}/${python.sitePackages}/skbio" ];
 
   pythonImportsCheck = [ "skbio" ];
 
-  meta = with lib; {
+  meta = {
     homepage = "http://scikit-bio.org/";
     description = "Data structures, algorithms and educational resources for bioinformatics";
-    license = licenses.bsd3;
-    platforms = [ "x86_64-linux" "x86_64-darwin" ];
-    maintainers = [ ];
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ tomasajt ];
   };
 }