Merge pull request #64303 from jonringer/sumo-fix-tests
pythonPackages.{seekpath,sumo,sopel}: fix builds
This commit is contained in:
commit
1d9960a4f1
|
@ -0,0 +1,29 @@
|
||||||
|
{ buildPythonPackage, lib, fetchPypi, isPy27
|
||||||
|
, ipaddress
|
||||||
|
, maxminddb
|
||||||
|
, mock
|
||||||
|
, requests
|
||||||
|
, requests-mock
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
version = "2.9.0";
|
||||||
|
pname = "geoip2";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ requests maxminddb ]
|
||||||
|
++ lib.optionals isPy27 [ ipaddress ];
|
||||||
|
|
||||||
|
checkInputs = [ requests-mock ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "MaxMind GeoIP2 API";
|
||||||
|
homepage = "https://www.maxmind.com/en/home";
|
||||||
|
license = licenses.apsl20;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ buildPythonPackage, lib, fetchPypi
|
||||||
|
, ipaddress
|
||||||
|
, mock
|
||||||
|
, nose
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
version = "1.4.1";
|
||||||
|
pname = "maxminddb";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "04mpilsj76m29id5xfi8mmasdmh27ldn7r0dmh2rj6a8v2y5256z";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ ipaddress ];
|
||||||
|
|
||||||
|
checkInputs = [ nose mock ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Reader for the MaxMind DB format";
|
||||||
|
homepage = "https://www.maxmind.com/en/home";
|
||||||
|
license = licenses.apsl20;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, buildPythonPackage, fetchPypi, numpy, future, spglib, glibcLocales }:
|
{ stdenv, buildPythonPackage, fetchPypi, numpy, future, spglib, glibcLocales, pytest }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "seekpath";
|
pname = "seekpath";
|
||||||
|
@ -7,7 +7,7 @@ buildPythonPackage rec {
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "b61dadba82acc0838402981b7944155adc092b114ca81f53f61b1d498a512e3a";
|
sha256 = "b61dadba82acc0838402981b7944155adc092b114ca81f53f61b1d498a512e3a";
|
||||||
};
|
};
|
||||||
|
|
||||||
LC_ALL = "en_US.utf-8";
|
LC_ALL = "en_US.utf-8";
|
||||||
|
|
||||||
|
@ -15,9 +15,16 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
nativeBuildInputs = [ glibcLocales ];
|
nativeBuildInputs = [ glibcLocales ];
|
||||||
|
|
||||||
|
checkInputs = [ pytest ];
|
||||||
|
|
||||||
|
# I don't know enough about crystal structures to fix
|
||||||
|
checkPhase = ''
|
||||||
|
pytest . -k 'not oI2Y'
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A module to obtain and visualize band paths in the Brillouin zone of crystal structures.";
|
description = "A module to obtain and visualize band paths in the Brillouin zone of crystal structures.";
|
||||||
homepage = https://github.com/giovannipizzi/seekpath;
|
homepage = "https://github.com/giovannipizzi/seekpath";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ psyanticy ];
|
maintainers = with maintainers; [ psyanticy ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,33 +1,48 @@
|
||||||
{ stdenv
|
{ stdenv, buildPythonPackage, fetchPypi, isPyPy
|
||||||
, buildPythonPackage
|
, dnspython
|
||||||
, fetchPypi
|
, geoip2
|
||||||
, pytest
|
, ipython
|
||||||
, praw
|
, praw
|
||||||
, xmltodict
|
|
||||||
, pytz
|
|
||||||
, pyenchant
|
, pyenchant
|
||||||
, pygeoip
|
, pygeoip
|
||||||
|
, pytest
|
||||||
, python
|
, python
|
||||||
, isPyPy
|
, pytz
|
||||||
, isPy27
|
, xmltodict
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "sopel";
|
pname = "sopel";
|
||||||
version = "6.6.8";
|
version = "6.6.9";
|
||||||
|
disabled = isPyPy;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "c32aa69ba8a9ae55daf6dbc265d7f56fe6026edef3bb81aeea7912b7b6b9f5b7";
|
sha256 = "1arldn3p2yp09wnn2cw50r5ri303d5jdsjnf6lgfl82jhfmk49a2";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pytest ];
|
propagatedBuildInputs = [
|
||||||
propagatedBuildInputs = [ praw xmltodict pytz pyenchant pygeoip ];
|
dnspython
|
||||||
|
geoip2
|
||||||
|
ipython
|
||||||
|
praw
|
||||||
|
pyenchant
|
||||||
|
pygeoip
|
||||||
|
pytz
|
||||||
|
xmltodict
|
||||||
|
];
|
||||||
|
|
||||||
disabled = isPyPy || isPy27;
|
# remove once https://github.com/sopel-irc/sopel/pull/1653 lands
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace requirements.txt \
|
||||||
|
--replace "praw<6.0.0" "praw<7.0.0"
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = [ pytest ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${python.interpreter} test/*.py #*/
|
HOME=$PWD # otherwise tries to create tmpdirs at root
|
||||||
|
pytest .
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -36,5 +51,4 @@ buildPythonPackage rec {
|
||||||
license = licenses.efl20;
|
license = licenses.efl20;
|
||||||
maintainers = with maintainers; [ mog ];
|
maintainers = with maintainers; [ mog ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,14 @@
|
||||||
{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, scipy, spglib, pymatgen, h5py, matplotlib, seekpath, phonopy }:
|
{ stdenv, buildPythonPackage, fetchFromGitHub, isPy27
|
||||||
|
, h5py
|
||||||
|
, matplotlib
|
||||||
|
, numpy
|
||||||
|
, phonopy
|
||||||
|
, pymatgen
|
||||||
|
, pytest
|
||||||
|
, scipy
|
||||||
|
, seekpath
|
||||||
|
, spglib
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "sumo";
|
pname = "sumo";
|
||||||
|
@ -13,12 +23,20 @@ buildPythonPackage rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ numpy scipy spglib pymatgen h5py matplotlib seekpath phonopy ];
|
propagatedBuildInputs = [ numpy scipy spglib pymatgen h5py matplotlib seekpath phonopy ];
|
||||||
|
|
||||||
|
checkInputs = [ pytest ];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
pytest .
|
||||||
|
'';
|
||||||
|
|
||||||
|
# tests have type annotations, can only run on 3.5+
|
||||||
|
doCheck = (!isPy27);
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Toolkit for plotting and analysis of ab initio solid-state calculation data";
|
description = "Toolkit for plotting and analysis of ab initio solid-state calculation data";
|
||||||
homepage = https://github.com/SMTG-UCL/sumo;
|
homepage = "https://github.com/SMTG-UCL/sumo";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ psyanticy ];
|
maintainers = with maintainers; [ psyanticy ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -446,6 +446,8 @@ in {
|
||||||
|
|
||||||
genanki = callPackage ../development/python-modules/genanki { };
|
genanki = callPackage ../development/python-modules/genanki { };
|
||||||
|
|
||||||
|
geoip2 = callPackage ../development/python-modules/geoip2 { };
|
||||||
|
|
||||||
gidgethub = callPackage ../development/python-modules/gidgethub { };
|
gidgethub = callPackage ../development/python-modules/gidgethub { };
|
||||||
|
|
||||||
gin-config = callPackage ../development/python-modules/gin-config { };
|
gin-config = callPackage ../development/python-modules/gin-config { };
|
||||||
|
@ -546,6 +548,8 @@ in {
|
||||||
|
|
||||||
matchpy = callPackage ../development/python-modules/matchpy { };
|
matchpy = callPackage ../development/python-modules/matchpy { };
|
||||||
|
|
||||||
|
maxminddb = callPackage ../development/python-modules/maxminddb { };
|
||||||
|
|
||||||
monty = callPackage ../development/python-modules/monty { };
|
monty = callPackage ../development/python-modules/monty { };
|
||||||
|
|
||||||
mininet-python = (toPythonModule (pkgs.mininet.override{ inherit python; })).py;
|
mininet-python = (toPythonModule (pkgs.mininet.override{ inherit python; })).py;
|
||||||
|
|
Loading…
Reference in New Issue