3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #186084 from onny/atsim

This commit is contained in:
Sandro 2022-08-19 11:54:10 +02:00 committed by GitHub
commit 275adae8c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 58 additions and 17 deletions

View file

@ -1,49 +1,62 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, configparser
, pyparsing
, pytest
, pytestCheckHook
, future
, openpyxl
, wrapt
, scipy
, cexprtk
, deepdiff
, sympy
}:
buildPythonPackage rec {
version = "0.4.0";
pname = "atsim.potentials";
pname = "atsim-potentials";
src = fetchPypi {
inherit pname version;
sha256 = "0c3e4e2323e969880f17a9924642e0991be5761f50b254bcbadd046db3be6390";
src = fetchFromGitHub {
owner = "mjdrushton";
repo = pname;
rev = version;
sha256 = "sha256-MwjRVd54qa8uJOi9yRXU+Vrve50ndftJUl+TFZKVzQM=";
};
checkInputs = [ pytest ];
postPatch = ''
# Remove conflicting openpyxl dependency version check
sed -i '/openpyxl==2.6.4/d' setup.py
'';
propagatedBuildInputs = [
cexprtk
configparser
future
openpyxl
pyparsing
scipy
sympy
wrapt
];
postPatch = ''
substituteInPlace setup.py \
--replace "wrapt==1.11.2" "wrapt~=1.11"
'';
checkInputs = [
deepdiff
pytestCheckHook
];
# tests are not included with release
doCheck = false;
disabledTests = [
# Missing lammps executable
"eam_tabulate_example2TestCase"
"test_pymath"
];
checkPhase = ''
py.test
'';
pythonImportsCheck = [ "atsim.potentials" ];
meta = with lib; {
homepage = "https://github.com/mjdrushton/atsim-potentials";
description = "Provides tools for working with pair and embedded atom method potential models including tabulation routines for DL_POLY and LAMMPS";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
broken = true; # missing cexprtk package
};
}

View file

@ -0,0 +1,26 @@
{ lib
, fetchPypi
, buildPythonPackage
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "cexprtk";
version = "0.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-c7QXB+oXzkRveiPpNrW/HY8pMtpZx/RtDpJMVE7fY/A=";
};
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "cexprtk" ];
meta = with lib; {
description = "Mathematical expression parser, cython wrapper";
homepage = "https://github.com/mjdrushton/cexprtk";
license = licenses.cpl10;
maintainers = with maintainers; [ onny ];
};
}

View file

@ -1640,6 +1640,8 @@ in {
censys = callPackage ../development/python-modules/censys { };
cexprtk = callPackage ../development/python-modules/cexprtk { };
coincurve = callPackage ../development/python-modules/coincurve {
inherit (pkgs) secp256k1;
};