2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
2021-06-28 23:13:55 +00:00
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "regex";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2021.11.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-80HuLfCZm/33qV5EgHXv/g2yEqWTh94acGkOSssD1MY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# Sources for different Python releases are located in same folder
|
|
|
|
checkPhase = ''
|
|
|
|
rm -r ${if !isPy27 then "regex_2" else "regex_3"}
|
|
|
|
${python.interpreter} -m unittest
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
pythonImportsCheck = [ "regex" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Alternative regular expression module, to replace re";
|
|
|
|
homepage = "https://bitbucket.org/mrabarnett/mrab-regex";
|
2021-06-28 23:13:55 +00:00
|
|
|
license = licenses.psfl;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|