3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/regex/default.nix

32 lines
717 B
Nix
Raw Normal View History

2018-01-01 10:46:35 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, python
2021-04-23 15:49:06 +01:00
, isPy27
2018-01-01 10:46:35 +00:00
}:
buildPythonPackage rec {
pname = "regex";
version = "2021.4.4";
2018-01-01 10:46:35 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Uro9P5uULEnX5LwQW7KFUcRAZfE5plBiq3kSvvEMmvs=";
2018-01-01 10:46:35 +00:00
};
2021-04-23 15:49:06 +01: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
'';
pythonImportsCheck = [ "regex" ];
meta = with lib; {
2018-01-01 10:46:35 +00:00
description = "Alternative regular expression module, to replace re";
homepage = "https://bitbucket.org/mrabarnett/mrab-regex";
license = licenses.psfl;
maintainers = with maintainers; [ abbradar ];
2018-01-01 10:46:35 +00:00
};
}