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.pysnow: fix build & tests #97716

Merged
merged 1 commit into from Sep 10, 2020

Conversation

risicle
Copy link
Contributor

@risicle risicle commented Sep 10, 2020

Motivation for this change

ZHF: #97479

Ok so I do something slightly unusual here.

Because I make some requirements-version substitutions I feel it's important we have the tests running. The tests aren't included in the pypi tarball. Usually this would make me switch to the github archive for the source, but being a poetry project, it's not in a ready-to-go format. So I fetch both the pypi tarball and the github archive, from which I extract the tests.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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.

Comment on lines 20 to 25
# for the actual source. the github source is in painful poetry format.
(fetchPypi {
inherit pname version;
sha256 = "5df61091470e48b5b3a6ea75637f69d3aacae20041487ea457a9a0e3093fba8c";
})
# for the tests - important because we make some dependency version subsitutions
Copy link
Contributor

Choose a reason for hiding this comment

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

you should be able to just use:

format = "pyproject";

and it should be able to build from source fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh thats what pyproject is for...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah so it does work that way, but it has the side effect of disabling it for py27.

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 that's fine, python2 has been EOL for 9 months now

@risicle
Copy link
Contributor Author

risicle commented Sep 10, 2020

ok still works, linux & macos.

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.

LGTM

Result of nixpkgs-review pr 97716 1

2 packages built:
  • python37Packages.pysnow
  • python38Packages.pysnow

@jonringer jonringer merged commit 9627ae4 into NixOS:master Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants