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

j2cli: fix missing dependency on setuptools #84128

Merged
merged 2 commits into from Apr 6, 2020
Merged

j2cli: fix missing dependency on setuptools #84128

merged 2 commits into from Apr 6, 2020

Conversation

mmlb
Copy link
Contributor

@mmlb mmlb commented Apr 2, 2020

Was getting

...
    import pkg_resources
ImportError: No module named pkg_resources
Motivation for this change
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.

Was getting

```
...
    import pkg_resources
ImportError: No module named pkg_resources
```
@FRidh
Copy link
Member

FRidh commented Apr 2, 2020

Please show the whole trace to proof its indeed in this package and not in one of its dependencies.

@mmlb
Copy link
Contributor Author

mmlb commented Apr 2, 2020

~> j2
Traceback (most recent call last):
  File "/nix/store/d3p2fg0gx5m97jsylk6qyiga2rglmsam-python2.7-j2cli-0.3.10/bin/.j2-wrapped", line 6, in <module>
    from j2cli import main
  File "/nix/store/d3p2fg0gx5m97jsylk6qyiga2rglmsam-python2.7-j2cli-0.3.10/lib/python2.7/site-packages/j2cli/__init__.py", line 4, in <module>
    import pkg_resources
ImportError: No module named pkg_resources
Exception: j2 exited with 1
[tty], line 1: j2

@FRidh
Copy link
Member

FRidh commented Apr 2, 2020

@GrahamcOfBorg build python2.pkgs.j2cli python3.pkgs.j2cli

@mmlb
Copy link
Contributor Author

mmlb commented Apr 3, 2020

@FRidh looks like the mac builder is down semi-permanently can we merge in the meantime or no?

@FRidh
Copy link
Member

FRidh commented Apr 3, 2020

Ran 0 tests in 0.000s

No tests are found. Either the test runner cannot find tests and needs to be patched, or there simply are no tests in which case the tests need to be disabled. Do include a comment explaining why the tests are disabled.

@mmlb
Copy link
Contributor Author

mmlb commented Apr 3, 2020

@FRidh tests aren't found since it tries to run it after the installPhase and the tests aren't installed. How can I work around this?

@FRidh
Copy link
Member

FRidh commented Apr 3, 2020

In that case you can pass doCheck = false; and include a comment explaining that tests aren't present.

There are no tests in the installed package so nothing to test.
@mmlb
Copy link
Contributor Author

mmlb commented Apr 3, 2020

@FRidh ✔️

@FRidh
Copy link
Member

FRidh commented Apr 3, 2020

@GrahamcOfBorg build python2.pkgs.j2cli python3.pkgs.j2cli

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.

diff LGTM

not a regression that tests aren't found (that should have been addressed when they were removed).

@jonringer jonringer merged commit 2f5dad2 into NixOS:master Apr 6, 2020
@mmlb mmlb deleted the patch-1 branch April 6, 2020 20:05
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