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

[RDY] pythonPackages.cmd2: 0.7.7 -> 0.8.0 #35162

Merged
merged 6 commits into from Feb 28, 2018
Merged

[RDY] pythonPackages.cmd2: 0.7.7 -> 0.8.0 #35162

merged 6 commits into from Feb 28, 2018

Conversation

teto
Copy link
Member

@teto teto commented Feb 19, 2018

Some cool stuff like history saving to transcripts, support for argparse
based parsers etc:
https://github.com/python-cmd2/cmd2/blob/master/CHANGELOG.md

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.

pname = "cmd2";
version = "0.8.0";

src = fetchurl {
Copy link
Member

Choose a reason for hiding this comment

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

Please use fetchPypi instead.


meta = with stdenv.lib; {
description = "Enhancements for standard library's cmd module";
homepage = http://packages.python.org/cmd2/;
Copy link
Member

Choose a reason for hiding this comment

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

404

sha256 = "1fmpn3dwc0pyhdi6q877mb8i4vw9p9a0lgmrvsaclfah62grsfjb";
};

# No tests included
Copy link
Member

Choose a reason for hiding this comment

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

On GitHub, there is a tests directory.

@teto teto force-pushed the cmd2 branch 2 times, most recently from 49cec73 to c159ac6 Compare February 19, 2018 15:08
@teto
Copy link
Member Author

teto commented Feb 19, 2018

I had copy/pasted from the old derivation. I updated it but still don't run the tests. They are tox based which IIRC won't work on nixos.

@dotlambda
Copy link
Member

Maybe, you have luck running the tests with

checkPhase = ''
  py.test
'';

@teto
Copy link
Member Author

teto commented Feb 19, 2018

wow, I 've seen some people asking on IRC and myself trying to pull tox for it to fail. This was able to run the tests but 25 out 191 failed so I still disabled them. I might try to fix some along the way as I develop my app against cmd2 and so far it works great with 0.8 (and I use quite a few features).

@dotlambda
Copy link
Member

Tox just runs some command, usually py.test, python -m unittest or something like that. You can find out which one by looking at the tox.ini file.

@dotlambda
Copy link
Member

@teto Maybe you could open an upstream issue about the failing tests.

Some cool stuff like history saving to transcripts, support for argparse
based parsers etc:
https://github.com/python-cmd2/cmd2/blob/master/CHANGELOG.md

It is now possible to run tests though many fails.
@teto teto changed the title pythonPackages.cmd2: 0.7.7 -> 0.8.0 [RDY] pythonPackages.cmd2: 0.7.7 -> 0.8.0 Feb 20, 2018
@Mic92
Copy link
Member

Mic92 commented Feb 21, 2018

@GrahamcOfBorg build pythonPackages.cmd2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

Installing collected packages: cmd2
Successfully installed cmd2-0.8.0
/build/cmd2-0.8.0
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/jlzgm0dgplgafm85kbcwkgyyvh0kgi67-python2.7-cmd2-0.8.0
strip is /nix/store/adidfx4pa7vmvby0gjqqmiwg2x49yr27-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/jlzgm0dgplgafm85kbcwkgyyvh0kgi67-python2.7-cmd2-0.8.0/lib
patching script interpreter paths in /nix/store/jlzgm0dgplgafm85kbcwkgyyvh0kgi67-python2.7-cmd2-0.8.0
checking for references to /build in /nix/store/jlzgm0dgplgafm85kbcwkgyyvh0kgi67-python2.7-cmd2-0.8.0...
/nix/store/jlzgm0dgplgafm85kbcwkgyyvh0kgi67-python2.7-cmd2-0.8.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)

Requirement already satisfied: six in /nix/store/wvkcinqahmns81hbgzfqjcrdn52k5m6l-python2.7-six-1.11.0/lib/python2.7/site-packages (from cmd2==0.8.0)
Requirement already satisfied: pyparsing>=2.0.1 in /nix/store/sib95i55iq4m0pd8c7824zhflibyy31r-python2.7-pyparsing-2.2.0/lib/python2.7/site-packages (from cmd2==0.8.0)
Installing collected packages: cmd2
Successfully installed cmd2-0.8.0
/private/tmp/nix-build-python2.7-cmd2-0.8.0.drv-0/cmd2-0.8.0
post-installation fixup
strip is /nix/store/v8ifq0hapblpr2z0hx4wvwg02w4aczqy-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/a879z6g48v59lihbvdjac6kv3xx0h1nc-python2.7-cmd2-0.8.0/lib
patching script interpreter paths in /nix/store/a879z6g48v59lihbvdjac6kv3xx0h1nc-python2.7-cmd2-0.8.0
/nix/store/a879z6g48v59lihbvdjac6kv3xx0h1nc-python2.7-cmd2-0.8.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

Installing collected packages: cmd2
Successfully installed cmd2-0.8.0
/build/cmd2-0.8.0
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/iscs06pzs186w1ji0gjvy4g7jga0ibmp-python2.7-cmd2-0.8.0
strip is /nix/store/skd6ix5ipkyhxzq7naylj4digawakl4j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/iscs06pzs186w1ji0gjvy4g7jga0ibmp-python2.7-cmd2-0.8.0/lib
patching script interpreter paths in /nix/store/iscs06pzs186w1ji0gjvy4g7jga0ibmp-python2.7-cmd2-0.8.0
checking for references to /build in /nix/store/iscs06pzs186w1ji0gjvy4g7jga0ibmp-python2.7-cmd2-0.8.0...
/nix/store/iscs06pzs186w1ji0gjvy4g7jga0ibmp-python2.7-cmd2-0.8.0

@Mic92
Copy link
Member

Mic92 commented Feb 21, 2018

@GrahamcOfBorg build python2.pkgs.cmd2 python3.pkgs.cmd2

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

    stdout=subprocess.PIPE, close_fds=True)
  File "/nix/store/zdv1nxsi1k614dlnkcgq74cnbmfnq8w0-python3-3.6.4/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/nix/store/zdv1nxsi1k614dlnkcgq74cnbmfnq8w0-python3-3.6.4/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'pbpaste': 'pbpaste'
ERROR: could not load /private/tmp/nix-build-python3.6-cmd2-0.8.0.drv-0/source/tests/conftest.py

builder for '/nix/store/gp0d7x1gjxbc6v65wbgr12nskcb1a0mg-python3.6-cmd2-0.8.0.drv' failed with exit code 4
error: build of '/nix/store/2rdb88wwaj12agk5fj51hzq0qmnz9pmr-python2.7-cmd2-0.8.0.drv', '/nix/store/gp0d7x1gjxbc6v65wbgr12nskcb1a0mg-python3.6-cmd2-0.8.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

tests/test_transcript.py ............................................             [100%]

============================== 1 tests deselected ==============================
============ 233 passed, 1 skipped, 1 deselected in 1290.44 seconds ============
.....................             [100%]

============================== 1 tests deselected ==============================
============ 229 passed, 5 skipped, 1 deselected in 1826.68 seconds ============
/nix/store/367547b4w3dm67km06lgnbhi85cjmbp7-python2.7-cmd2-0.8.0
/nix/store/mhgjx4w1pz8h9x78c9y56bihd9vryyxd-python3.6-cmd2-0.8.0

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

tests/test_cmd2.py ...................................................s. [ 30%]
tests/test_cmd2.py ...................................................s. [ 30%]
....................................................                     [ 52%]
tests/test_completion.py .....................................           [ 68%]
....................................................                     [ 52%]
tests/test_completion.py .....................................           [ 68%]
tests/test_parsing.py .......................................            [ 85%]
building of '/nix/store/9pnx542qrzh7v0ksqbr84rb1zz7a1mjb-python2.7-cmd2-0.8.0.drv' timed out after 3200 seconds
building of '/nix/store/2pis62rkg8laghqxinf8w4r5r29vna63-python3.6-cmd2-0.8.0.drv' timed out after 3200 seconds
�[31;1merror:�[0m build of '/nix/store/2pis62rkg8laghqxinf8w4r5r29vna63-python3.6-cmd2-0.8.0.drv', '/nix/store/9pnx542qrzh7v0ksqbr84rb1zz7a1mjb-python2.7-cmd2-0.8.0.drv' failed

@Mic92
Copy link
Member

Mic92 commented Feb 21, 2018

@FRidh is a test that takes over an hour on aarch64 reasonable for this kind of package?

@teto
Copy link
Member Author

teto commented Feb 27, 2018

@Mic92 should we conditionally add pbpaste on darwin and rerun the tests ? I don't have a mac so I would rather let someone do it.

@Mic92
Copy link
Member

Mic92 commented Feb 27, 2018

@GrahamcOfBorg build python2.pkgs.cmd2 python3.pkgs.cmd2

@Mic92
Copy link
Member

Mic92 commented Feb 27, 2018

mac os sandbox was disabled. Maybe it finds pbpaste now.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

    stdout=subprocess.PIPE, close_fds=True)
  File "/nix/store/4llw0i5jbb7p5n0r58w9z0azqgx5wk09-python-2.7.14/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/nix/store/4llw0i5jbb7p5n0r58w9z0azqgx5wk09-python-2.7.14/lib/python2.7/subprocess.py", line 1025, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
ERROR: could not load /private/tmp/nix-build-python2.7-cmd2-0.8.0.drv-0/source/tests/conftest.py

builder for '/nix/store/0ls5h4lzbv83543mjb91bs54xripip83-python2.7-cmd2-0.8.0.drv' failed with exit code 4
error: build of '/nix/store/0ls5h4lzbv83543mjb91bs54xripip83-python2.7-cmd2-0.8.0.drv', '/nix/store/pqrpqi18g2sk7ynilqxz5cf1f332bqn5-python3.6-cmd2-0.8.0.drv' failed

@Mic92
Copy link
Member

Mic92 commented Feb 27, 2018

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

tests/test_cmd2.py ...................................................s. [ 30%]
....................................................                     [ 52%]
tests/test_completion.py .....................................           [ 68%]
....................................................                     [ 52%]
tests/test_completion.py .....................................           [ 68%]
tests/test_parsing.py .......................................            [ 85%]
tests/test_parsing.py .................................ssss..            [ 85%]
building of '/nix/store/b400dxdv5s585xwh08gx7r0ix8flrvq3-python2.7-cmd2-0.8.0.drv' timed out after 3200 seconds
building of '/nix/store/79ybcy58w8ackxdbdavm62ynxwkzfddg-python3.6-cmd2-0.8.0.drv' timed out after 3200 seconds
�[31;1merror:�[0m build of '/nix/store/79ybcy58w8ackxdbdavm62ynxwkzfddg-python3.6-cmd2-0.8.0.drv', '/nix/store/b400dxdv5s585xwh08gx7r0ix8flrvq3-python2.7-cmd2-0.8.0.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

tests/test_transcript.py ................................................             [100%]

============================== 1 tests deselected ==============================
============ 233 passed, 1 skipped, 1 deselected in 1282.18 seconds ============
.....................             [100%]

============================== 1 tests deselected ==============================
============ 229 passed, 5 skipped, 1 deselected in 1737.29 seconds ============
/nix/store/r8na90la2yfzk40dqb2ili7vl1sa07ia-python2.7-cmd2-0.8.0
/nix/store/s5qkcpky9z6cxw2ipg6v2n0173zg63jc-python3.6-cmd2-0.8.0

@Mic92
Copy link
Member

Mic92 commented Feb 28, 2018

@GrahamcOfBorg build python2.pkgs.cmd2

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

error: while evaluating the attribute 'postPatch' of the derivation 'python2.7-cmd2-0.8.0' at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/stdenv/generic/make-derivation.nix:148:11:
attempt to call something which is not a function but a boolean, at /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/development/python-modules/cmd2/default.nix:19:15

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

error: while evaluating the attribute ‘postPatch’ of the derivation ‘python2.7-cmd2-0.8.0’ at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/pkgs/stdenv/generic/make-derivation.nix:148:11:
attempt to call something which is not a function but a boolean, at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/ogden/pkgs/development/python-modules/cmd2/default.nix:19:15

@Mic92
Copy link
Member

Mic92 commented Feb 28, 2018

@GrahamcOfBorg build python2.pkgs.cmd2

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

  /nix/store/wcawyijar1cyvql2ylmfbnrbcqc9rj6r-python2.7-cmd2-0.8.0.drv
building '/nix/store/wcawyijar1cyvql2ylmfbnrbcqc9rj6r-python2.7-cmd2-0.8.0.drv'...
unpacking sources
unpacking source archive /nix/store/3p6fijr42f00pzgayj6vwwqdagwpw6vx-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/tox.ini
patching sources
chmod: cannot access 'bin/bpcopy': No such file or directory
builder for '/nix/store/wcawyijar1cyvql2ylmfbnrbcqc9rj6r-python2.7-cmd2-0.8.0.drv' failed with exit code 1
error: build of '/nix/store/wcawyijar1cyvql2ylmfbnrbcqc9rj6r-python2.7-cmd2-0.8.0.drv' failed

@Mic92
Copy link
Member

Mic92 commented Feb 28, 2018

@GrahamcOfBorg build python2.pkgs.cmd2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Partial log (click to expand)

Requirement already satisfied: six in /nix/store/kihf6hdn1xn24yvag46shgdl4mhf4hp4-python2.7-six-1.11.0/lib/python2.7/site-packages (from cmd2==0.8.0)
Requirement already satisfied: pyparsing>=2.0.1 in /nix/store/9cp853ylv5fsv0bjs5azdil5wawp2md7-python2.7-pyparsing-2.2.0/lib/python2.7/site-packages (from cmd2==0.8.0)
Installing collected packages: cmd2
Successfully installed cmd2-0.8.0
/private/tmp/nix-build-python2.7-cmd2-0.8.0.drv-0/source
post-installation fixup
strip is /nix/store/4sdh09gmvl15cy0zb6i7mbvxh5syz206-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/vy2xnzy1s37js652if4p0g75iyw1cajl-python2.7-cmd2-0.8.0/lib
patching script interpreter paths in /nix/store/vy2xnzy1s37js652if4p0g75iyw1cajl-python2.7-cmd2-0.8.0
/nix/store/vy2xnzy1s37js652if4p0g75iyw1cajl-python2.7-cmd2-0.8.0

@Mic92
Copy link
Member

Mic92 commented Feb 28, 2018

finally

@Mic92 Mic92 merged commit 0a672f7 into NixOS:master Feb 28, 2018
@teto
Copy link
Member Author

teto commented Feb 28, 2018

thanks for the patches !

@teto teto deleted the cmd2 branch February 28, 2018 13:57
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

tests/test_argparse.py ..................                                [  7%]
tests/test_cmd2.py ...................................................s. [ 30%]
....................................................                     [ 52%]
tests/test_completion.py .....................................           [ 68%]
tests/test_parsing.py .................................ssss..            [ 85%]
tests/test_transcript.py ...................................             [100%]

============================== 1 tests deselected ==============================
============ 229 passed, 5 skipped, 1 deselected in 1179.23 seconds ============
/nix/store/2x5ivpx6ibj76swc0cj4sszhl6is9xd6-python2.7-cmd2-0.8.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

tests/test_argparse.py ..................                                [  7%]
tests/test_cmd2.py ...................................................s. [ 30%]
....................................................                     [ 52%]
tests/test_completion.py .....................................           [ 68%]
tests/test_parsing.py .................................ssss..            [ 85%]
tests/test_transcript.py ...................................             [100%]

============================== 1 tests deselected ==============================
============ 229 passed, 5 skipped, 1 deselected in 1692.96 seconds ============
/nix/store/2x5ivpx6ibj76swc0cj4sszhl6is9xd6-python2.7-cmd2-0.8.0

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Merge failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

Merge failed

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

checking for references to /build in /nix/store/b8b9fgjb919ksv5c1bfm9sjp6fg659bi-python2.7-cmd2-0.8.0...
running install tests
============================= test session starts ==============================
platform linux2 -- Python 2.7.14, pytest-3.4.0, py-1.5.2, pluggy-0.6.0
rootdir: /build/source, inifile: tox.ini
collected 235 items

tests/test_argparse.py ..................                                [  7%]
building of '/nix/store/hjw0b679n93j9q6chhwsx5vd320x85gz-python2.7-cmd2-0.8.0.drv' timed out after 3600 seconds
�[31;1merror:�[0m build of '/nix/store/hjw0b679n93j9q6chhwsx5vd320x85gz-python2.7-cmd2-0.8.0.drv' failed

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