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

pythonPackages.pygal: fix build by forcing pytest_3 - staging rebase #60888

Closed
wants to merge 3 commits into from

Conversation

risicle
Copy link
Contributor

@risicle risicle commented May 3, 2019

Motivation for this change

This is a rebase of #59431 onto staging, seeing as it does have a fairly high rebuild count. Please see that PR for details.

@risicle
Copy link
Contributor Author

risicle commented May 11, 2019

I've checked the master version of this on macos now and all nox-review failures are unrelated.

];

checkInputs = [
pytest
pytest_3
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's not needed to bump to pytest_3, because we could fix setup.cfg:

diff --git i/pkgs/development/python-modules/pygal/default.nix w/pkgs/development/python-modules/pygal/default.nix
index b0d533f5d68..e8b82d53d93 100644
--- i/pkgs/development/python-modules/pygal/default.nix
+++ w/pkgs/development/python-modules/pygal/default.nix
@@ -39,6 +39,8 @@ buildPythonPackage rec {
   preCheck = ''
     # necessary on darwin to pass the testsuite
     export LANG=en_US.UTF-8
+    # Fix setup.cfg for recent pytest versions. Remove with the next release
+    substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
   '';
 
   propagatedBuildInputs = [ cairosvg tinycss cssselect ]

it was already fixed in upstream, but the patch doesn't apply cleanly. Besides that LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hah - I did it via a substitute originally but someone told me "why not just use pytest_3?"...

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm inclined to use substituteInPlace because: 1. it's already fixed in upstream 2. we might forget the reasons behind using pytest_3 and leave it in future version bumps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, but it will make the other packages I fixed in this PR effectively unrelated - I fixed them to allow the pytest_3 use to work.

@marsam
Copy link
Contributor

marsam commented Dec 8, 2019

Closing because pytest_3 was removed from nixpkgs #66376

@marsam marsam closed this Dec 8, 2019
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

3 participants