Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3Packages.pydot_ng: moving pytest and mock to checkInputs #66925

Closed
wants to merge 1 commit into from

Conversation

mmahut
Copy link
Member

@mmahut mmahut commented Aug 19, 2019

Motivation for this change

Fixing https://hydra.nixos.org/build/98961910

Disabling not working tests, given this is an archived project
by upstream, rest is passing.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @bcdarwin

Disabling not working test, given this is an archived project
by upstream.
@mmahut mmahut requested a review from FRidh as a code owner August 19, 2019 14:22
@mmahut
Copy link
Member Author

mmahut commented Aug 19, 2019

@GrahamcOfBorg build pythonPackages.pydot_ng python3Packages.pydot_ng

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I would do this:

top-level/python-package.nix

  pydot_ng = callPackage ../development/python-modules/pydot_ng { graphviz = pkgs.graphviz; };

python-modules/pydot_ng/default.nix (puts graphviz on PATH for checkPhase)

{ stdenv, buildPythonPackage, fetchPypi, isPy27
, graphviz
, mock
, pyparsing
, pytest
, unittest2
}:

buildPythonPackage rec {
  pname = "pydot_ng";
  version = "2.0.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "8c8073b97aa7030c28118961e2c6c92f046e4cb57aeba7df87146f7baa6530c5";
  };

  propagatedBuildInputs = [ graphviz pyparsing ];

  checkInputs = [
    graphviz
    mock
    pytest
  ] ++ stdenv.lib.optionals isPy27 [ unittest2];

  checkPhase = ''
    py.test
  '';

  meta = with stdenv.lib; {
    homepage = "https://pypi.python.org/pypi/pydot-ng";
    description = "Python 3-compatible update of pydot, a Python interface to Graphviz's Dot";
    license = licenses.mit;
    maintainers = [ maintainers.bcdarwin ];
  };

}

@mmahut
Copy link
Member Author

mmahut commented Aug 19, 2019

@jonringer I was just trying to fix the broken build. Would you like to take over the package? @bcdarwin has been unresponsive for some time.

@jonringer
Copy link
Contributor

@mmahut I'll bump it, but I don't really have any interest in the package itself

@mmahut mmahut closed this Aug 19, 2019
@mmahut mmahut deleted the pydot_ng branch August 23, 2019 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants