2018-01-01 11:46:35 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2018-03-10 11:35:22 +01:00
|
|
|
, python
|
2021-04-23 16:49:06 +02:00
|
|
|
, isPy27
|
2018-01-01 11:46:35 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "regex";
|
2021-10-09 02:59:37 +02:00
|
|
|
version = "2021.10.8";
|
2018-01-01 11:46:35 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-09 02:59:37 +02:00
|
|
|
sha256 = "26895d7c9bbda5c52b3635ce5991caa90fbb1ddfac9c9ff1c7ce505e2282fb2a";
|
2018-01-01 11:46:35 +01:00
|
|
|
};
|
|
|
|
|
2021-04-23 16:49:06 +02: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
|
2018-03-10 11:35:22 +01:00
|
|
|
'';
|
|
|
|
|
2021-04-07 08:25:07 +02:00
|
|
|
pythonImportsCheck = [ "regex" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2018-01-01 11:46:35 +01:00
|
|
|
description = "Alternative regular expression module, to replace re";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://bitbucket.org/mrabarnett/mrab-regex";
|
2021-04-07 08:25:07 +02:00
|
|
|
license = licenses.psfl;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2018-01-01 11:46:35 +01:00
|
|
|
};
|
2018-02-25 19:47:45 +03:00
|
|
|
}
|