Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0881ee4c62a7
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cdfb32d17a98
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jan 21, 2020

  1. pythonPackages.pyparsing: improve tests

    - Fetch pyparsing from GitHub instead of PyPi
    - Add tests
    kamadorueda authored and Jon committed Jan 21, 2020
    Copy the full SHA
    cdfb32d View commit details
Showing with 30 additions and 14 deletions.
  1. +30 −14 pkgs/development/python-modules/pyparsing/default.nix
44 changes: 30 additions & 14 deletions pkgs/development/python-modules/pyparsing/default.nix
Original file line number Diff line number Diff line change
@@ -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
];
};
}