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.pytest-watch: init at 4.2.0 #63007

Closed
wants to merge 25 commits into from

Conversation

dmvianna
Copy link
Contributor

Motivation for this change

New package.

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.

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.

Hi, thanks for taking interest in python packaging in nixpkgs.

There's a couple general issues here that need fixing.

  • correct commit msg

They need to be formatted like pythonPackages.$package_name

  • don't use pythonPackages in python module expressions

all pythonPackages.$pkgs are in scope so you should reference them formally.

  • don't propagate pytest

We have multiple versions of pytest in nixpkgs.
So it makes it very easy to use multiple versions if this is just in buildInputs.

  • enable pytest-watch tests

See #63007 (comment)

Other minor comments follow.

pkgs/development/python-modules/pytest-testmon/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pytest-testmon/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pytest-watch/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pytest-watch/default.nix Outdated Show resolved Hide resolved
@worldofpeace
Copy link
Contributor

This looks to already be part of #63004 so I'll favor adding that package in this pr since I've reviewed it here.

@worldofpeace worldofpeace mentioned this pull request Jun 13, 2019
10 tasks
@dmvianna dmvianna changed the title pytest-watch: init at 4.2.0 pythonPackage.pytest-watch: init at 4.2.0 Jun 13, 2019
@dmvianna dmvianna changed the title pythonPackage.pytest-watch: init at 4.2.0 pythonPackages.pytest-watch: init at 4.2.0 Jun 13, 2019
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.

We still need to fix

  • don't use pythonPackages in python module expressions
    all pythonPackages.$pkgs are in scope so you should reference them formally.

Also can you revert partially 97752d7?
So checkPhase is like in comment #63007 (comment)

checkInputs = [ pytest ];

checkPhase = ''
  pytest test
'';

Doing ${pytest}/bin/pytest isn't needed.

Lastly see #63007 (comment)

@dmvianna
Copy link
Contributor Author

Done. I'm going to push the changes as you requested, but I can't build locally without with pythonPackages;:

 $ nix-build -A pythonPackages.pytest-watch                                             
error: undefined variable 'pytest' at /home/dmvianna/sandbox/nixes/nixpkgs/pkgs/development/python-modules/pytest-watch/default.nix:20:19

@dmvianna dmvianna mentioned this pull request Jun 16, 2019
10 tasks
Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

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

same remarks as in #63010

@worldofpeace
Copy link
Contributor

Merged to master in

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