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.libusb1: Fix darwin build #46440

Merged
merged 2 commits into from Sep 9, 2018

Conversation

knedlsepp
Copy link
Member

@knedlsepp knedlsepp commented Sep 9, 2018

Motivation for this change

This should fix the darwin build.
Please backport to 18.09 (ZHF-18.09 #45961)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@xeji
Copy link
Contributor

xeji commented Sep 9, 2018

@GrahamcOfBorg build python27Packages.libusb1 python36Packages.libusb1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

these paths will be fetched (0.11 MiB download, 0.58 MiB unpacked):
  /nix/store/1bljnk6gwzhkmiin6l54v451f0jxynzv-python3.6-libusb1-1.6.6
  /nix/store/l91306r0mzfcxnsrwrpflsi12y7cr874-python2.7-libusb1-1.6.6
copying path '/nix/store/l91306r0mzfcxnsrwrpflsi12y7cr874-python2.7-libusb1-1.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/1bljnk6gwzhkmiin6l54v451f0jxynzv-python3.6-libusb1-1.6.6' from 'https://cache.nixos.org'...
/nix/store/l91306r0mzfcxnsrwrpflsi12y7cr874-python2.7-libusb1-1.6.6
/nix/store/1bljnk6gwzhkmiin6l54v451f0jxynzv-python3.6-libusb1-1.6.6

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

...../private/tmp/nix-build-python3.6-libusb1-1.6.6.drv-0/libusb1-1.6.6/usb1/__init__.py:2129: DeprecationWarning: Use "with USBContext() as context:" for safer cleanup on interpreter shutdown. See also USBContext.open().
  DeprecationWarning,
....../private/tmp/nix-build-python3.6-libusb1-1.6.6.drv-0/libusb1-1.6.6/usb1/__init__.py:973: DeprecationWarning: USBPollerThread causes long stalls when used with poll (it was intended for epoll), and is generally misleading. Consider calling looping over context.handleEvents() in a thread instead.
  DeprecationWarning,
...
----------------------------------------------------------------------
Ran 14 tests in 0.659s

OK
error: build of '/nix/store/zdh43dgvqbw15adl40nhr0a69z5r8ypy-python2.7-libusb1-1.6.6.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

these paths will be fetched (0.11 MiB download, 0.58 MiB unpacked):
  /nix/store/4yx8nrzd1ajvcyaakfpfpwzppg9ip2fy-python2.7-libusb1-1.6.6
  /nix/store/rgd1b46lvfcirr65qzd7m36z0y33vww8-python3.6-libusb1-1.6.6
copying path '/nix/store/4yx8nrzd1ajvcyaakfpfpwzppg9ip2fy-python2.7-libusb1-1.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/rgd1b46lvfcirr65qzd7m36z0y33vww8-python3.6-libusb1-1.6.6' from 'https://cache.nixos.org'...
/nix/store/4yx8nrzd1ajvcyaakfpfpwzppg9ip2fy-python2.7-libusb1-1.6.6
/nix/store/rgd1b46lvfcirr65qzd7m36z0y33vww8-python3.6-libusb1-1.6.6

@xeji
Copy link
Contributor

xeji commented Sep 9, 2018

test failure on darwin. did the test pass on your machine with sandboxing enabled?

@knedlsepp
Copy link
Member Author

Tests succeed on my machine, even when using:
nix-build --sandbox -A python3Packages.libusb1.

@xeji
Copy link
Contributor

xeji commented Sep 9, 2018

Log looks like the test failure is on python27 only.

@knedlsepp
Copy link
Member Author

knedlsepp commented Sep 9, 2018

nix-build --sandbox -A python27Packages.libusb1 also works locally, don't know why it would fail on ofborg.

@xeji
Copy link
Contributor

xeji commented Sep 9, 2018

let's try again, maybe it's some non-deterministic error
@GrahamcOfBorg build python27Packages.libusb1 python36Packages.libusb1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

/nix/store/l91306r0mzfcxnsrwrpflsi12y7cr874-python2.7-libusb1-1.6.6
/nix/store/1bljnk6gwzhkmiin6l54v451f0jxynzv-python3.6-libusb1-1.6.6

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

...../private/tmp/nix-build-python3.6-libusb1-1.6.6.drv-0/libusb1-1.6.6/usb1/__init__.py:2129: DeprecationWarning: Use "with USBContext() as context:" for safer cleanup on interpreter shutdown. See also USBContext.open().
  DeprecationWarning,
....../private/tmp/nix-build-python3.6-libusb1-1.6.6.drv-0/libusb1-1.6.6/usb1/__init__.py:973: DeprecationWarning: USBPollerThread causes long stalls when used with poll (it was intended for epoll), and is generally misleading. Consider calling looping over context.handleEvents() in a thread instead.
  DeprecationWarning,
...
----------------------------------------------------------------------
Ran 14 tests in 0.425s

OK
error: build of '/nix/store/zdh43dgvqbw15adl40nhr0a69z5r8ypy-python2.7-libusb1-1.6.6.drv' failed

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

/nix/store/4yx8nrzd1ajvcyaakfpfpwzppg9ip2fy-python2.7-libusb1-1.6.6
/nix/store/rgd1b46lvfcirr65qzd7m36z0y33vww8-python3.6-libusb1-1.6.6

@xeji
Copy link
Contributor

xeji commented Sep 9, 2018

Can you please have a look at the failing test case?

@knedlsepp
Copy link
Member Author

knedlsepp commented Sep 9, 2018

It seems to me this is a flaky test. There is an upstream issue on USBPollerThread having some issues: vpelletier/python-libusb1#16.
I disabled this specific test.
@GrahamcOfBorg build python27Packages.libusb1 python36Packages.libusb1

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

============================= test session starts ==============================
platform darwin -- Python 2.7.15, pytest-3.7.4, py-1.5.4, pluggy-0.7.1
rootdir: /private/tmp/nix-build-python2.7-libusb1-1.6.6.drv-0/libusb1-1.6.6, inifile:
collected 14 items / 1 deselected

usb1/testUSB1.py .............                                           [100%]

=================== 13 passed, 1 deselected in 0.13 seconds ====================
/nix/store/5y5mhdccdg2vyxqi97kgjqkkbbafh7wa-python2.7-libusb1-1.6.6
/nix/store/57azfzcmii8pjs2m5gnwl8kag0kshfk0-python3.6-libusb1-1.6.6

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

============================= test session starts ==============================
platform linux -- Python 3.6.6, pytest-3.7.4, py-1.5.4, pluggy-0.7.1
rootdir: /build/libusb1-1.6.6, inifile:
collected 14 items / 1 deselected

usb1/testUSB1.py .s...........                                           [100%]

============== 12 passed, 1 skipped, 1 deselected in 0.35 seconds ==============
/nix/store/m092j5cpvhfai41rknpf0471qfsg0ani-python2.7-libusb1-1.6.6
/nix/store/cqa2qd0wpkx93br5kvrfh80jxmxi4ha9-python3.6-libusb1-1.6.6

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python27Packages.libusb1, python36Packages.libusb1

Partial log (click to expand)

============================= test session starts ==============================
platform linux -- Python 3.6.6, pytest-3.7.4, py-1.5.4, pluggy-0.7.1
rootdir: /build/libusb1-1.6.6, inifile:
collected 14 items / 1 deselected

usb1/testUSB1.py .s...........                                           [100%]

============== 12 passed, 1 skipped, 1 deselected in 0.26 seconds ==============
/nix/store/f0xgy2pfx2ksim5yfvbzyl4194z8331b-python2.7-libusb1-1.6.6
/nix/store/6b170xr457giqfkgzipcgwa2s0s6ai8k-python3.6-libusb1-1.6.6

@xeji xeji merged commit 12fae6e into NixOS:master Sep 9, 2018
@xeji
Copy link
Contributor

xeji commented Sep 9, 2018

backported: b682a40..bbfa5d8

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