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

Py junos eznc #36215

Merged
merged 3 commits into from Mar 3, 2018
Merged

Py junos eznc #36215

merged 3 commits into from Mar 3, 2018

Conversation

xnaveira
Copy link

@xnaveira xnaveira commented Mar 2, 2018

Motivation for this change

Some Pypi packages I was missing.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

};

buildInputs = [
scp six pyserial paramiko netaddr ncclient lxml jinja2 pyyaml
Copy link
Member

Choose a reason for hiding this comment

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

Are all those dependencies only needed at build time of the package? All python dependencies that are needed at runtime, should be also in propagatedBuildInputs.


buildInputs = [
setuptools paramiko lxml libxml2 libxslt
];
Copy link
Member

Choose a reason for hiding this comment

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

same here.



buildInputs = [
paramiko
Copy link
Member

Choose a reason for hiding this comment

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

same here.

@xnaveira
Copy link
Author

xnaveira commented Mar 2, 2018

Ok, changed the dependencies, apparently they are not needed to build.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please ensure that tests are run for each package, if it provides some. You may have to set checkInputs and checkPhase.
If there are no tests, add the following lines:

# no tests implemented
doCheck = false;


ncclient = callPackage ../development/python-modules/ncclient {};

junos-eznc = callPackage ../development/python-modules/junos-eznc {};
Copy link
Member

Choose a reason for hiding this comment

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

The attributes in python-packages.nix should be ordered alphabetically.


meta = with stdenv.lib; {
homepage = https://github.com/jbardin/scp.py;
description = "scp module for paramiko";
Copy link
Member

Choose a reason for hiding this comment

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

Capitalize first letter (or even SCP in this case): https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes

Copy link
Member

Choose a reason for hiding this comment

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

The name of scp seems to be lowercase scp, not capitalised even at the beginning of a sentence, at least in its manpage. I think this seems a reasonable place not to apply the rule blindly.



propagatedBuildInputs = [
setuptools paramiko lxml libxml2 libxslt
Copy link
Member

Choose a reason for hiding this comment

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

setuptools should not be needed here

, buildPythonPackage
, fetchPypi
, pythonPackages
, setuptools
Copy link
Member

Choose a reason for hiding this comment

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

not used

pythonPackages.junos-eznc: init at 2.1.7

pythonPackages.junos-eznc: init at 2.1.7
@xnaveira
Copy link
Author

xnaveira commented Mar 3, 2018

Ok, I went through your comments. Thanks for pointing out the problems.

@Mic92
Copy link
Member

Mic92 commented Mar 3, 2018

@GrahamcOfBorg build python36Packages.scp python27Packages.ncclient python27Packages.scp python27Packages.junos-eznc

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

-------------------------------------------------------------------------
TOTAL                                                  4595   3371    27%
/nix/store/0r3fn1v2d5q0nvd03da4hkxrb3i8zv3y-python3.6-scp-0.10.2
/nix/store/dhmd4vnm2v7877yfbbrbrbw9mwla95ix-python2.7-ncclient-0.5.3
/nix/store/q3k6jkcydzphdgqk1wba88mr6w00la4n-python2.7-scp-0.10.2
----------------------------------------------------------------------
/nix/store/gvwlgxyl1sa00mw0nqwsg6xy5jc73p02-python2.7-junos-eznc-2.1.7
Ran 0 tests in 2.769s

OK

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

-------------------------------------------------------------------------
TOTAL                                                  4595   3371    27%
/nix/store/vyx66ffzmh7q37c7nh5y7kcxndb104h0-python3.6-scp-0.10.2
/nix/store/99qac76pv5iid85nzslpbni0rsp35kwq-python2.7-ncclient-0.5.3
/nix/store/w1z6gvxf5vyi6m8nkkll5rv67pql7idw-python2.7-scp-0.10.2
----------------------------------------------------------------------
/nix/store/9jdqzzz9v540fpnf8i26a9kigabq9ljv-python2.7-junos-eznc-2.1.7
Ran 0 tests in 0.748s

OK

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

patching script interpreter paths in /nix/store/svypmqgkb67lsy0lrm8lp3niava3nl07-python3.6-scp-0.10.2
Successfully installed ncclient-0.5.3
/private/tmp/nix-build-python2.7-ncclient-0.5.3.drv-0/ncclient-0.5.3
post-installation fixup
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/dhngdiyjrjw14s6l6c667x02x1yv6vqn-python2.7-ncclient-0.5.3/lib
patching script interpreter paths in /nix/store/dhngdiyjrjw14s6l6c667x02x1yv6vqn-python2.7-ncclient-0.5.3
building of '/nix/store/hvwn8fn6lidr011izvs4cjcllz18046w-python2.7-pyserial-3.4.drv' timed out after 1800 seconds
cannot build derivation '/nix/store/ji9fm886kgzjc9frr8i98yj043jwdn8j-python2.7-junos-eznc-2.1.7.drv': 1 dependencies couldn't be built
error: build of '/nix/store/ji9fm886kgzjc9frr8i98yj043jwdn8j-python2.7-junos-eznc-2.1.7.drv' failed

@Mic92 Mic92 merged commit fe2acc2 into NixOS:master Mar 3, 2018
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

5 participants