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.magic-wormhole: 0.10.4 -> 0.10.5 #35175

Merged
merged 3 commits into from Feb 27, 2018

Conversation

dotlambda
Copy link
Member

Motivation for this change

magic-wormhole is broken on master

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.

/cc @asymmetric

propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ipaddress humanize pyopenssl service-identity txtorcon ];

postPatch = ''
sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py
sed -i -e "s|if (os.path.dirname(os.path.abspath(wormhole))|if not os.path.abspath(wormhole).startswith('/nix/store') and (os.path.dirname(os.path.abspath(wormhole))|" src/wormhole/test/test_cli.py
'' + lib.optionalString (pythonAtLeast "3.3") ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Also explaining why this was removed would be nice.

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 of magic-wormhole/magic-wormhole@13b1539, which happened after the 0.10.5 release as I see right now.
I can however revert that change if you want.

@@ -3,7 +3,6 @@
, fetchPypi
, pythonAtLeast
, nettools
, glibcLocales
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you edit the second commit message and explain why you removed this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Tests work without it, so why should it be included?

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you try to run the binaries? Asking because the checkbox isn't ticked. 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

No I didn't since I don't use magic-wormhole. I just came across the build failure.
However, I only ever saw glibcLocales added to make the tests run by setting something like LC_ALL.

@@ -22,30 +21,25 @@

buildPythonPackage rec {
pname = "magic-wormhole";
version = "0.10.4";
name = "${pname}-${version}";
Copy link
Contributor

Choose a reason for hiding this comment

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

For my interest, is name 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.

Not anymore for buildPython*.

@FRidh
Copy link
Member

FRidh commented Feb 19, 2018

The version bump is already in staging, so this shouldn't be merged until staging has been merged into master.

@dotlambda
Copy link
Member Author

Rebased on staging.
@asymmetric Can you try running it?

@asymmetric
Copy link
Contributor

asymmetric commented Feb 19, 2018

Tests fail for me when running nix-build -A pythonPackages.magic-wormhole on your branch.

===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/trial/runner.py", line 508, in loadPackage
    module = modinfo.load()
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/test_args.py", line 6, in <module>
    from .common import config
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/common.py", line 10, in <module>
    from wormhole_transit_relay.transit_server import Transit
exceptions.ImportError: No module named wormhole_transit_relay.transit_server

wormhole.test.test_args
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/trial/runner.py", line 508, in loadPackage
    module = modinfo.load()
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/test_cli.py", line 15, in <module>
    from .common import ServerBase, config
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/common.py", line 10, in <module>
    from wormhole_transit_relay.transit_server import Transit
exceptions.ImportError: No module named wormhole_transit_relay.transit_server

wormhole.test.test_cli
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/trial/runner.py", line 508, in loadPackage
    module = modinfo.load()
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/test_server.py", line 9, in <module>
    from .common import ServerBase
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/common.py", line 10, in <module>
    from wormhole_transit_relay.transit_server import Transit
exceptions.ImportError: No module named wormhole_transit_relay.transit_server

wormhole.test.test_server
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/trial/runner.py", line 508, in loadPackage
    module = modinfo.load()
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/test_transit.py", line 13, in <module>
    from wormhole_transit_relay import transit_server
exceptions.ImportError: No module named wormhole_transit_relay

wormhole.test.test_transit
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/trial/runner.py", line 508, in loadPackage
    module = modinfo.load()
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/test_wormhole.py", line 8, in <module>
    from .common import ServerBase, poll_until, pause_one_tick
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/common.py", line 10, in <module>
    from wormhole_transit_relay.transit_server import Transit
exceptions.ImportError: No module named wormhole_transit_relay.transit_server

wormhole.test.test_wormhole
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/trial/runner.py", line 508, in loadPackage
    module = modinfo.load()
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/nix/store/j5c4dbylqxhwphkkcm8ylirdgayfi40n-python2.7-Twisted-17.9.0/lib/python2.7/site-packages/twisted/python/reflect.py", line 255, in _importAndCheckStack
    reraise(excValue, excTraceback)
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/test_xfer_util.py", line 5, in <module>
    from .common import ServerBase
  File "/nix/store/i5sixyl4anhbrxnl4bv2z7y1bhlddihp-python2.7-magic-wormhole-0.10.4/lib/python2.7/site-packages/wormhole/test/common.py", line 10, in <module>
    from wormhole_transit_relay.transit_server import Transit
exceptions.ImportError: No module named wormhole_transit_relay.transit_server

wormhole.test.test_xfer_util
-------------------------------------------------------------------------------
Ran 115 tests in 1.385s

FAILED (errors=6, successes=109)
builder for ‘/nix/store/xqrjsyd8sifz537688ha22zfdak6bgjn-python2.7-magic-wormhole-0.10.4.drv’ failed with exit code 1
error: build of ‘/nix/store/xqrjsyd8sifz537688ha22zfdak6bgjn-python2.7-magic-wormhole-0.10.4.drv’ failed

@dotlambda
Copy link
Member Author

Sorry, I was not careful enough.
Second try. I had to package a new dependency.

buildInputs = [ nettools glibcLocales ];
propagatedBuildInputs = [ autobahn cffi click hkdf pynacl spake2 tqdm ipaddress humanize pyopenssl service-identity txtorcon ];
propagatedBuildInputs = [ spake2 pynacl six attrs twisted autobahn automat hkdf tqdm click humanize ipaddress txtorcon ];
Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry that I changed the order so much. I just wanted the dependency to be in the same order as in setup.py.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the info. In general though, I think it's a much better idea to have these comments in the commit messages, so that people could find out without having to find this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed commit message.

@asymmetric
Copy link
Contributor

It still fails for me, but not for the CI, so not sure.

@dotlambda
Copy link
Member Author

@GrahamcOfBorg build python2.pkgs.magic-wormhole python3.pkgs.magic-wormhole

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

wormhole.test.test_cli.PregeneratedCode.test_slow_text
wormhole.test.test_cli.PregeneratedCode.test_text
wormhole.test.test_cli.PregeneratedCode.test_text_subprocess
wormhole.test.test_cli.PregeneratedCode.test_text_tor
-------------------------------------------------------------------------------
Ran 355 tests in 28.345s

PASSED (skips=20, successes=335)
/nix/store/2r702zqgchn7fprfx95vb5144h6c6625-python2.7-magic-wormhole-0.10.5
/nix/store/h52alg3shyv9qsmcywdfb9rb99a3zcs3-python3.6-magic-wormhole-0.10.5

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

wormhole.test.test_cli.PregeneratedCode.test_slow_text
wormhole.test.test_cli.PregeneratedCode.test_text
wormhole.test.test_cli.PregeneratedCode.test_text_subprocess
wormhole.test.test_cli.PregeneratedCode.test_text_tor
-------------------------------------------------------------------------------
Ran 355 tests in 72.673s

PASSED (skips=20, successes=335)
/nix/store/h7pxl15587mna9qwddlxdvxbfmhz2q72-python2.7-magic-wormhole-0.10.5
/nix/store/m0fcb1iv6g0fsd61za3fr2qgc0anqn4k-python3.6-magic-wormhole-0.10.5

@dotlambda
Copy link
Member Author

@asymmetric Can you try again, please?

@asymmetric
Copy link
Contributor

asymmetric commented Feb 21, 2018

@dotlambda there were no new commits, AFAICT, so I don't think tests results would be different. Also, this being nix, we shouldn't have cases of "works on my machine", so I'd say go ahead and consider the build green, I must be doing something wrong.

@grahamc
Copy link
Member

grahamc commented Feb 23, 2018

@GrahamcOfBorg eval

@@ -0,0 +1,25 @@
{ lib, buildPythonPackage, fetchPypi, twisted, mock }:
Copy link
Member

Choose a reason for hiding this comment

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

this is a separate package and should thus have its own folder

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

Robert Schütz added 2 commits February 24, 2018 10:53
Add magic-wormhole-transit-relay dependency and clean up expression.
Order of the buildInputs was changed to match the one in setup.py.
@dotlambda
Copy link
Member Author

@GrahamcOfBorg build python2.pkgs.magic-wormhole python3.pkgs.magic-wormhole

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

wormhole.test.test_cli.PregeneratedCode.test_slow_text
wormhole.test.test_cli.PregeneratedCode.test_text
wormhole.test.test_cli.PregeneratedCode.test_text_subprocess
wormhole.test.test_cli.PregeneratedCode.test_text_tor
-------------------------------------------------------------------------------
Ran 355 tests in 45.889s

PASSED (skips=20, successes=335)
/nix/store/n9fx2csyi3yz7xfhvrl6k0vz4s5rrn1h-python2.7-magic-wormhole-0.10.5
/nix/store/n0cnsz9wmc90ssk3gf6vxj6hvf7c72dj-python3.6-magic-wormhole-0.10.5

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

wormhole.test.test_cli.PregeneratedCode.test_slow_text
wormhole.test.test_cli.PregeneratedCode.test_text
wormhole.test.test_cli.PregeneratedCode.test_text_subprocess
wormhole.test.test_cli.PregeneratedCode.test_text_tor
-------------------------------------------------------------------------------
Ran 355 tests in 19.709s

PASSED (skips=20, successes=335)
/nix/store/nwfcj3hd53a0p5sj33k70y9bvvy12prr-python2.7-magic-wormhole-0.10.5
/nix/store/wvbi7yzljcaygb5bhzy4zl2bidrzs4i5-python3.6-magic-wormhole-0.10.5

@dotlambda dotlambda merged commit f9cb9ca into NixOS:master Feb 27, 2018
@dotlambda dotlambda deleted the magic-wormhole branch February 27, 2018 07:58
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

6 participants