From 942fcb15bba2d8f00a36e912117daa75fcf3e68c Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Fri, 2 Jun 2023 16:59:51 +0200 Subject: [PATCH] pythonPackages.geometric: 1.0 -> 1.0.1 --- .../geometric/ase-is-optional.patch | 50 ------------------- .../python-modules/geometric/default.nix | 13 +++-- 2 files changed, 8 insertions(+), 55 deletions(-) delete mode 100644 pkgs/development/python-modules/geometric/ase-is-optional.patch diff --git a/pkgs/development/python-modules/geometric/ase-is-optional.patch b/pkgs/development/python-modules/geometric/ase-is-optional.patch deleted file mode 100644 index 911867c35457..000000000000 --- a/pkgs/development/python-modules/geometric/ase-is-optional.patch +++ /dev/null @@ -1,50 +0,0 @@ -From aff6e4411980ac9cbe112a050c3a34ba7e305a43 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Roberto=20Di=20Remigio=20Eik=C3=A5s?= - -Date: Fri, 11 Nov 2022 09:20:25 +0100 -Subject: [PATCH] Do not import ASE stuff at the top - -Since it is an optional add-on and it's not listed in the installation requirements. ---- - geometric/tests/test_ase_engine.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/geometric/tests/test_ase_engine.py b/geometric/tests/test_ase_engine.py -index 8750763..34239b5 100644 ---- a/geometric/tests/test_ase_engine.py -+++ b/geometric/tests/test_ase_engine.py -@@ -10,7 +10,6 @@ - - geometry optimisation w/ ASE internal calc - """ - import numpy as np --from ase.calculators.lj import LennardJones - from pytest import fixture, raises - - from geometric.ase_engine import EngineASE -@@ -37,6 +36,8 @@ def molecule_h2o() -> Molecule: - - @using_ase - def test_construction(molecule_h2o): -+ from ase.calculators.lj import LennardJones -+ - lj_calc = LennardJones() - engine = EngineASE(molecule_h2o, lj_calc) - assert engine.calculator == lj_calc -@@ -44,6 +45,8 @@ def test_construction(molecule_h2o): - - @using_ase - def test_from_args(molecule_h2o): -+ from ase.calculators.lj import LennardJones -+ - lj_calc = LennardJones(sigma=1.4, epsilon=3.0) - - # create equivalent engines in two ways -@@ -68,6 +71,8 @@ def test_from_args(molecule_h2o): - - @using_ase - def test_from_string(molecule_h2o): -+ from ase.calculators.lj import LennardJones -+ - engine = EngineASE.from_calculator_string( - molecule_h2o, calculator_import="ase.calculators.lj.LennardJones" - ) diff --git a/pkgs/development/python-modules/geometric/default.nix b/pkgs/development/python-modules/geometric/default.nix index 984eded7955c..6d9e33df805b 100644 --- a/pkgs/development/python-modules/geometric/default.nix +++ b/pkgs/development/python-modules/geometric/default.nix @@ -1,6 +1,7 @@ { buildPythonPackage , lib , fetchFromGitHub +, fetchpatch , networkx , numpy , scipy @@ -10,18 +11,20 @@ buildPythonPackage rec { pname = "geometric"; - version = "1.0"; + version = "1.0.1"; src = fetchFromGitHub { owner = "leeping"; repo = "geomeTRIC"; rev = version; - hash = "sha256-y8dh4vZ/d1KL1EpDrle8CH/KIDMCKKZdAyJVgUFjx/o="; + hash = "sha256-3d4z1n8+e0HgdeKLNSsHLb3XHOk09uy+gP9AwNvNITE="; }; - patches = [ - ./ase-is-optional.patch - ]; + patches = [ (fetchpatch { + name = "ase-is-optional"; + url = "https://github.com/leeping/geomeTRIC/commit/aff6e4411980ac9cbe112a050c3a34ba7e305a43.patch"; + hash = "sha256-JGGPX+JwkQ8Imgmyx+ReRTV+k6mxHYgm+Nd8WUjbFEg="; + }) ]; propagatedBuildInputs = [ networkx