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.kubernetes: init at 5.0.0 #35668

Merged
merged 2 commits into from Feb 27, 2018

Conversation

lsix
Copy link
Member

@lsix lsix commented Feb 26, 2018

Motivation for this change
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.

@lsix lsix requested a review from FRidh as a code owner February 26, 2018 12:47
@lsix lsix changed the title Add python packages kubernetes pythonPackages.kubernetes: init at 5.0.0 Feb 26, 2018
@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.kubernetes python3.pkgs.kubernetes

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

collected 56 items

kubernetes/config/dateutil_test.py ..                                    [  3%]
kubernetes/config/incluster_config_test.py ..........                    [ 21%]
kubernetes/config/kube_config_test.py .................................. [ 82%]
...                                                                      [ 87%]
kubernetes/stream/ws_client_test.py .                                    [ 89%]
kubernetes/watch/watch_test.py ......                                    [100%]

========================== 56 passed in 2.65 seconds ===========================

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

kubernetes/config/dateutil_test.py ..                                    [  3%]
kubernetes/config/incluster_config_test.py ..........                    [ 21%]
kubernetes/config/kube_config_test.py .................................. [ 82%]
...                                                                      [ 87%]
kubernetes/stream/ws_client_test.py .                                    [ 89%]
kubernetes/watch/watch_test.py ......                                    [100%]

========================== 56 passed in 8.92 seconds ===========================
/nix/store/h290j7as3lbjd529p57yhm4nrirlz622-python2.7-kubernetes-5.0.0
/nix/store/pv1fvxcha2kh6iwnfx6rxs9llihdjdc1-python3.6-kubernetes-5.0.0

pname = "kubernetes";
version = "5.0.0";

patchPhase = ''
Copy link
Member

Choose a reason for hiding this comment

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

prePatch

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

sha256 = "0f1p9zkzpw0q1cqwnfn788mj3fjqg5z3vsd9pjnz50dk12znngwk";
};

testInputs = [ unittest2 ];
Copy link
Member

Choose a reason for hiding this comment

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

checkInputs? However, it seems like this is not needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I did reuse the old exprission. I have fixed it and removed unittest2 from the propagatedBuildInputs.

Thanks for spotting it.

Copy link
Member

Choose a reason for hiding this comment

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

unittest2 is only needed for python < 2.7, which isn't supported by Nixpkgs. I'd say let's get rid of it.

if sys.version_info[0] == 2 and sys.version_info[1] < 7:
        tests_require.append('unittest2==0.8.0')

@lsix lsix force-pushed the add_pythonPackages_kubernetes branch from a70cc7b to 4a78962 Compare February 26, 2018 13:38
};

checkInputs = [ unittest2 ];
propagatedBuildInputs = [ six backports_ssl_match_hostname argparse ];
Copy link
Member

Choose a reason for hiding this comment

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

All but six aren't required for the supported Python versions: https://github.com/websocket-client/websocket-client/blob/master/setup.py

Copy link
Member Author

Choose a reason for hiding this comment

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

I have dropped all the dependencies that are not used for the python versions we have. Only six and unittest2 remains.

Thanks again.

Copy link
Member

Choose a reason for hiding this comment

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

Why does unittest2 remain?

Copy link
Member Author

Choose a reason for hiding this comment

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

because I forgot to drop it… done

@lsix lsix force-pushed the add_pythonPackages_kubernetes branch 2 times, most recently from 13ac23d to 3bbf42c Compare February 26, 2018 14:23
@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.kubernetes python3.pkgs.kubernetes

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)


kubernetes/config/dateutil_test.py ..                                    [  3%]
kubernetes/config/incluster_config_test.py ..........                    [ 21%]
kubernetes/config/kube_config_test.py .................................. [ 82%]
...                                                                      [ 87%]
kubernetes/stream/ws_client_test.py .                                    [ 89%]
kubernetes/watch/watch_test.py ......                                    [100%]

========================== 56 passed in 2.82 seconds ===========================
error: build of ‘/nix/store/3m9aly80v2zn6yvzyfcky7rv5pqhkkm3-python2.7-kubernetes-5.0.0.drv’ failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)


kubernetes/config/dateutil_test.py ..                                    [  3%]
kubernetes/config/incluster_config_test.py ..........                    [ 21%]
kubernetes/config/kube_config_test.py .................................. [ 82%]
...                                                                      [ 87%]
kubernetes/stream/ws_client_test.py .                                    [ 89%]
kubernetes/watch/watch_test.py ......                                    [100%]

========================== 56 passed in 8.70 seconds ===========================
�[31;1merror:�[0m build of '/nix/store/sm3lhz77jvyishylyvlg0zq6g080ghk2-python2.7-kubernetes-5.0.0.drv' failed

@dotlambda
Copy link
Member

Download error on https://pypi.python.org/simple/backports.ssl-match-hostname/: [Errno -2] Name or service not known -- Some packages may not be found!

Now that's strange


meta = with stdenv.lib; {
description = "Kubernetes python client";
homepage = https://github.com/arteria/django-hijack;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that's correct :D

@dotlambda
Copy link
Member

I'd say we just remove that dependency in prePatch, it's definitely not needed for our Python 2.7:

nix-shell -p python27 --run 'python -c "from ssl import match_hostname"'

@lsix lsix force-pushed the add_pythonPackages_kubernetes branch 2 times, most recently from 45303e8 to 1a7f3bb Compare February 26, 2018 15:11
@lsix
Copy link
Member Author

lsix commented Feb 26, 2018

Yes, this will just never be imported (https://github.com/websocket-client/websocket-client/blob/v0.47.0/websocket/_ssl_compat.py). I drop it now.

I also just realized that since I wrote it, a new version of websocket-client went out, I just updated it.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.kubernetes python3.pkgs.kubernetes

sha256 = "0jb1446053ryp5p25wsr1hjfdzwfm04a6f3pzpcb63bfz96xqlx4";
};

prePatch = if isPy27 then ''
Copy link
Member

Choose a reason for hiding this comment

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

I think if is not needed here, it doesn't harm to remove it for all Python versions

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, it is not necessary. It is more a way to tell maintainers it was only expected for python-2.7, but I can happily drop it if you prefer.

Copy link
Member

@dotlambda dotlambda Feb 26, 2018

Choose a reason for hiding this comment

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

Well, since I don't think Python 2 support will be dropped in the near future, it is more confusing than helpful.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have dropped it

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

kubernetes/config/dateutil_test.py ..                                    [  3%]
kubernetes/config/incluster_config_test.py ..........                    [ 21%]
kubernetes/config/kube_config_test.py .................................. [ 82%]
...                                                                      [ 87%]
kubernetes/stream/ws_client_test.py .                                    [ 89%]
kubernetes/watch/watch_test.py ......                                    [100%]

========================== 56 passed in 8.78 seconds ===========================
/nix/store/57j1lrxis1qdn5qafqr7ddkswp3zn16q-python2.7-kubernetes-5.0.0
/nix/store/m3vqb5vzvfp3qxpmnr49c09ixgcvdq20-python3.6-kubernetes-5.0.0

@lsix lsix force-pushed the add_pythonPackages_kubernetes branch from 1a7f3bb to 95d59d4 Compare February 26, 2018 15:27
@FRidh FRidh merged commit 62f0942 into NixOS:master Feb 27, 2018
@lsix lsix deleted the add_pythonPackages_kubernetes branch August 22, 2019 07:51
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

4 participants