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

Add nplusone and pytest-pythonpath Python packages #94054

Merged
merged 2 commits into from Aug 15, 2020

Conversation

cript0nauta
Copy link
Contributor

Motivation for this change

Add the nplusone Python package, which is a dependency of Faraday.

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.

# The tests assume the source code is in an nplusone/ directory. When using
# the Nix sandbox, it will be in a source/ directory instead, making the
# tests fail.
patches = [ ./fix_tests.diff ];
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer substituteInPlace over a diff, generally they are less likely to fail to apply when bumping the package.

Suggested change
patches = [ ./fix_tests.diff ];
prePatch = ''
substituteInPlace tests/conftest.py \
--replace nplusone/tests/conftest source/tests/conftest
'';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, nice suggestion!

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.

To comply with CONTRIBUTING.md please have the commit message name be of the format

<pkg-name>: <subject-line>

for more examples, please look at https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md#submitting-changes

in your case, the commit message should be:

pythonPackages.pytest-pythonpath: init at 0.7.3
pythonPackages.nplusone: init at 1.0.0 

you can use git rebase -i to re-order and squash the commits in the correct order

@cript0nauta
Copy link
Contributor Author

I didn't fully undertand the suggestion about the commit messages. Right now, all commits are using the <pkg-name>: <subject-line> convention:

$ git log master..nplusone --reverse --oneline
95027da5267 pythonPackages.pytest-pythonpath: init at 0.7.3
9128e87de66 pythonPackages.nplusone: init at 1.0.0
5dfa72af62d pythonPackages.pytest-pythonpath: cosmetic changes
a5ac33d7b13 pythonPackages.nplusone: don't use patches

Did you mean I should squash 5dfa72af62d and a5ac33d7b13 into the previous commits so we only have the init at ... commits?

cript0nauta added a commit to cript0nauta/pynixify that referenced this pull request Aug 5, 2020
@jonringer
Copy link
Contributor

I meant that the fixup commits should be squashed into their respective package addition commits

@cript0nauta
Copy link
Contributor Author

I meant that the fixup commits should be squashed into their respective package addition commits

Done, thanks for clarifying!

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 94054 1

5 packages built:
- python27Packages.pytest-pythonpath
- python37Packages.nplusone
- python37Packages.pytest-pythonpath
- python38Packages.nplusone
- python38Packages.pytest-pythonpath

@jonringer jonringer merged commit d00a690 into NixOS:master Aug 15, 2020
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