diff --git a/pkgs/development/python-modules/freud/default.nix b/pkgs/development/python-modules/freud/default.nix index b7f7646f18bd..3735dab43ff8 100644 --- a/pkgs/development/python-modules/freud/default.nix +++ b/pkgs/development/python-modules/freud/default.nix @@ -1,18 +1,28 @@ { lib, - stdenv, buildPythonPackage, fetchFromGitHub, - fetchpatch, - cmake, + + # build-system + scikit-build-core, cython, oldest-supported-numpy, - scikit-build, - setuptools, - tbb, + + # nativeBuildInputs + cmake, + ninja, + + # buildInputs + tbb_2022, + nanobind, + + # dependencies numpy, rowan, scipy, + parsnip, + + # tests pytestCheckHook, python, gsd, @@ -22,25 +32,17 @@ buildPythonPackage rec { pname = "freud"; - version = "3.3.1"; + version = "3.4.0"; pyproject = true; src = fetchFromGitHub { owner = "glotzerlab"; repo = "freud"; tag = "v${version}"; - hash = "sha256-3THoGPjfaDy2s96+Oaf1f2SDzxTaqRDQlNa3gZ/ytUU="; + hash = "sha256-JX3pbzNTj85UTAtWYnDRvtJSjS27qgY/vitaAjmXbjA="; fetchSubmodules = true; }; - patches = [ - # https://github.com/glotzerlab/freud/issues/1269 - (fetchpatch { - url = "https://github.com/glotzerlab/freud/commit/8f636e3815737945e45da5b9996b5f69df07c9a5.patch"; - hash = "sha256-PLorRrYj16oBWHYzXDq62kECzVTtyr+1Z20DJqTkXxg="; - }) - ]; - # Because we prefer to not `leaveDotGit`, we need to fool upstream into # thinking we left the .git files in the submodules, so cmake won't think we # didn't initialize them. Upstream doesn't support using the system wide @@ -51,20 +53,27 @@ buildPythonPackage rec { touch extern/{voro++,fsph,Eigen}/.git ''; - nativeBuildInputs = [ - cmake + build-system = [ + scikit-build-core cython oldest-supported-numpy - scikit-build - setuptools + ]; + + nativeBuildInputs = [ + cmake + ninja ]; dontUseCmakeConfigure = true; - buildInputs = [ tbb ]; + buildInputs = [ + tbb_2022 + nanobind + ]; - propagatedBuildInputs = [ + dependencies = [ numpy rowan scipy + parsnip ]; nativeCheckInputs = [ @@ -73,14 +82,6 @@ buildPythonPackage rec { matplotlib sympy ]; - disabledTests = [ - # https://github.com/glotzerlab/freud/issues/961 - # - # For x86_64-linux, see: - # - # https://github.com/glotzerlab/freud/issues/961#issuecomment-2553344968 - "test_docstring" - ]; # On top of cd $out due to https://github.com/NixOS/nixpkgs/issues/255262 , # we need to also copy the tests because otherwise pytest won't find them. preCheck = '' diff --git a/pkgs/development/python-modules/parsnip/default.nix b/pkgs/development/python-modules/parsnip/default.nix new file mode 100644 index 000000000000..e9dcf670fbeb --- /dev/null +++ b/pkgs/development/python-modules/parsnip/default.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + wheel, + more-itertools, + numpy, +}: + +buildPythonPackage rec { + pname = "parsnip"; + version = "0.4.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "glotzerlab"; + repo = "parsnip"; + rev = "v${version}"; + hash = "sha256-Nac0afep7+HkpSBpqClHpPFSc8H3g8l4q067RQe5K54="; + }; + + build-system = [ + setuptools + wheel + ]; + + dependencies = [ + more-itertools + numpy + ]; + + pythonImportsCheck = [ + "parsnip" + ]; + + meta = { + description = "Lightweight, performant library for parsing CIF files in Python"; + homepage = "https://github.com/glotzerlab/parsnip"; + changelog = "https://github.com/glotzerlab/parsnip/blob/${src.rev}/changelog.rst"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ doronbehar ]; + }; +} diff --git a/pkgs/development/python-modules/rowan/default.nix b/pkgs/development/python-modules/rowan/default.nix index 84b872d871a7..003582e9ea8b 100644 --- a/pkgs/development/python-modules/rowan/default.nix +++ b/pkgs/development/python-modules/rowan/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "rowan"; - version = "1.3.0"; + version = "1.3.2"; pyproject = true; src = fetchFromGitHub { owner = "glotzerlab"; repo = "rowan"; rev = "v${version}"; - hash = "sha256-klIqyX04w1xYmYtAbLF5jwpcJ83oKOaENboxyCL70EY="; + hash = "sha256-fcxVpzLhbLjPIifNBx0olq1dUTmNM9IH38MQybkWZSg="; }; nativeBuildInputs = [ diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ab14d9d8cd5..dac11ca3e051 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11437,6 +11437,8 @@ self: super: with self; { parsley = callPackage ../development/python-modules/parsley { }; + parsnip = callPackage ../development/python-modules/parsnip { }; + parso = callPackage ../development/python-modules/parso { }; parsy = callPackage ../development/python-modules/parsy { };