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-08-31 00:17:10 +02:00
|
|
|
version = "2021.8.28";
|
2018-01-01 11:46:35 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-08-31 00:17:10 +02:00
|
|
|
sha256 = "f585cbbeecb35f35609edccb95efd95a3e35824cd7752b586503f7e6087303f1";
|
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-04-01 03:11:51 +02: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 17:47:45 +01:00
|
|
|
}
|