diff options
author | Kevin Amado <kamadorueda@gmail.com> | 2020-01-20 09:58:04 -0500 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-01-21 15:57:22 -0800 |
commit | cdfb32d17a988c9fe2952c586f7ea8c2b6ca7115 (patch) | |
tree | 90c115dd2f4a418f995c2a159c98c2b65d8c59d1 | |
parent | 0881ee4c62a7b8c2df220dcb7342a2aa71a7b4b3 (diff) | |
download | nixlib-cdfb32d17a988c9fe2952c586f7ea8c2b6ca7115.tar nixlib-cdfb32d17a988c9fe2952c586f7ea8c2b6ca7115.tar.gz nixlib-cdfb32d17a988c9fe2952c586f7ea8c2b6ca7115.tar.bz2 nixlib-cdfb32d17a988c9fe2952c586f7ea8c2b6ca7115.tar.lz nixlib-cdfb32d17a988c9fe2952c586f7ea8c2b6ca7115.tar.xz nixlib-cdfb32d17a988c9fe2952c586f7ea8c2b6ca7115.tar.zst nixlib-cdfb32d17a988c9fe2952c586f7ea8c2b6ca7115.zip |
pythonPackages.pyparsing: improve tests
- Fetch pyparsing from GitHub instead of PyPi - Add tests
-rw-r--r-- | pkgs/development/python-modules/pyparsing/default.nix | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/pyparsing/default.nix b/pkgs/development/python-modules/pyparsing/default.nix index f1f43a5f495b..4acc4fa804b3 100644 --- a/pkgs/development/python-modules/pyparsing/default.nix +++ b/pkgs/development/python-modules/pyparsing/default.nix @@ -1,19 +1,35 @@ -{ stdenv, buildPythonPackage, fetchPypi }: +{ buildPythonPackage +, fetchFromGitHub +, lib + +# pythonPackages +, coverage +}: + buildPythonPackage rec { - pname = "pyparsing"; - version = "2.4.6"; + pname = "pyparsing"; + version = "2.4.6"; - src = fetchPypi { - inherit pname version; - sha256 = "4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f"; - }; + src = fetchFromGitHub { + owner = "pyparsing"; + repo = pname; + rev = "pyparsing_${version}"; + sha256 = "1fh7s3cfr274pd6hh6zygl99842rqws98an2nkrrqj2spb9ldxcm"; + }; - # Not everything necessary to run the tests is included in the distribution - doCheck = false; + # https://github.com/pyparsing/pyparsing/blob/847af590154743bae61a32c3dc1a6c2a19009f42/tox.ini#L6 + checkInputs = [ coverage ]; + checkPhase = '' + coverage run --branch simple_unit_tests.py + coverage run --branch unitTests.py + ''; - meta = with stdenv.lib; { - homepage = https://pyparsing.wikispaces.com/; - description = "An alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions"; - license = licenses.mit; - }; + meta = with lib; { + homepage = "https://github.com/pyparsing/pyparsing"; + description = "An alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions"; + license = licenses.mit; + maintainers = with maintainers; [ + kamadorueda + ]; + }; } |