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.faker: fix build #61110

Merged
merged 1 commit into from May 8, 2019
Merged

pythonPackages.faker: fix build #61110

merged 1 commit into from May 8, 2019

Conversation

mmlb
Copy link
Contributor

@mmlb mmlb commented May 7, 2019

Motivation for this change

pythonPackages.faker no longer builds

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@mmlb mmlb requested a review from FRidh as a code owner May 7, 2019 22:33
Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

Build has a requirement for freezegun and why the build seems to be now failing.

Though this did fix the rm: missing operand.

@mmlb
Copy link
Contributor Author

mmlb commented May 7, 2019

@worldofpeace yep I noticed that after a little bit, I've fixed that locally but have now run into a problem that I don't know how to solve. Faker depends on more-itertools<6.0.0 which I can handle here, but then I run into an issue that pytest depends on more-itertools too and will cause a clash because its using the packaged 6.0.0. I'm stumped on how to fix.

Pushing what I have now.

@risicle
Copy link
Contributor

risicle commented May 7, 2019

You could try feeding the checkInputs an ad-hoc pytest which has been overridden with your more-itertools5:

(pytest.override { more-itertools = more-itertools5; })

and if pytest won't accept more-itertools5 for being too old you could try your luck with pytest_3. If you do this you'll probably need to thread this new pytest back in to the pytestrunner you use.

@worldofpeace
Copy link
Contributor

worldofpeace commented May 7, 2019

@worldofpeace yep I noticed that after a little bit, I've fixed that locally but have now run into a problem that I don't know how to solve. Faker depends on more-itertools<6.0.0 which I can handle here, but then I run into an issue that pytest depends on more-itertools too and will cause a clash because its using the packaged 6.0.0. I'm stumped on how to fix.

Pushing what I have now.

more-itertools is just a testing dependency if I'm understanding this correctly.
What kind of failures would result if we used the 6.0.0, assuming that's why they've enforced the pin?

I'm partial to just patching this away because it's just for tests. Also note we've already patched the pin for pytest in postPatch so we couldn't do worse.

Edit: the pinning for more-itertools was for python2.7 compat

https://github.com/joke2k/faker/blob/31fefaee58141498d2ab8a1a07cbb836a7501613/CHANGELOG.rst#103---12-march-2019

And we use 5.0 more-itertools with python2.7 (see python-packages.nix)

@mmlb
Copy link
Contributor Author

mmlb commented May 8, 2019

patched to ignore the version specifier (with some notes). @worldofpeace PTAL.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

Perfect 👍

Builds again for all interpreters.
Please squash your commits and we can merge.

Not sure why, but the `__pycache__` folder no longer exists by the time
`postPatch` runs which now causes the `rm` to error and fail the build.
@mmlb
Copy link
Contributor Author

mmlb commented May 8, 2019

done @worldofpeace thanks for help!

@worldofpeace worldofpeace merged commit 4f49ae8 into NixOS:master May 8, 2019
@mmlb mmlb deleted the fix-faker-builds branch May 8, 2019 01:39
@worldofpeace
Copy link
Contributor

done @worldofpeace thanks for help!

You're very welcome. Thanks for contributing ✨

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