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.pywbem: 0.10.0 -> 0.12.6 #51253

Merged
merged 1 commit into from Dec 4, 2018

Conversation

worldofpeace
Copy link
Contributor

Motivation for this change

An update. Now has python 36 support and I've enabled tests.

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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@worldofpeace
Copy link
Contributor Author

@GrahamcOfBorg build pythonPackages.pywbem python36Packages.pywbem python3Packages.pywbem


checkInputs = [ httpretty lxml mock pytest requests ];
# Wants `wbemcli` in PATH
rm testsuite/test_wbemcli.py
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel like there's definitely a way to get this test working.
Suggestions are desired.

Copy link
Member

Choose a reason for hiding this comment

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

maybe using installCheckPhase helps. Also I am not 100% sure, this will add wbemcli to PATH. However PATH=$PATH:$out/bin should work then.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pythonPackages.pywbem, python36Packages.pywbem

The following builds were skipped because they don't evaluate on x86_64-linux: python3Packages.pywbem

Partial log (click to expand)


testsuite/test_statistics.py:422
  /build/pywbem-0.12.6/testsuite/test_statistics.py:422: DeprecationWarning: invalid escape sequence \(
    'Statistics\(')  # pylint: disable=anomalous-backslash-in-string

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============ 6841 passed, 165 skipped, 2 warnings in 153.37 seconds ============
pytestcachePhase
/nix/store/x4h49jz8hrkh4i9xlflx954qgjswpdhd-python2.7-pywbem-0.12.6
/nix/store/prlpds6xmgymlgwg1q3cqffyfwmrpfmx-python3.6-pywbem-0.12.6

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pythonPackages.pywbem, python36Packages.pywbem

The following builds were skipped because they don't evaluate on aarch64-linux: python3Packages.pywbem

Partial log (click to expand)


testsuite/test_statistics.py:422
  /build/pywbem-0.12.6/testsuite/test_statistics.py:422: DeprecationWarning: invalid escape sequence \(
    'Statistics\(')  # pylint: disable=anomalous-backslash-in-string

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============ 6841 passed, 165 skipped, 2 warnings in 88.50 seconds =============
pytestcachePhase
/nix/store/c572bm1iyv5ksvajh1x5s3fzzz8xsyvg-python2.7-pywbem-0.12.6
/nix/store/dhggnsa2chiwphbmivjvnncz11zkw6bv-python3.6-pywbem-0.12.6

@worldofpeace
Copy link
Contributor Author

cc @Mic92

@worldofpeace
Copy link
Contributor Author

maybe using installCheckPhase helps. Also I am not 100% sure, this will add wbemcli to PATH. However PATH=$PATH:$out/bin should work then.

Weird, I looked again and noticed that just adding PATH=$PATH:$out/bin to checkPhase (what I did initially) results in:

E           AssertionError: Test test_timeout: Unexpected exit code (expected 0, got 1) from command:
E           wbemcli http://blah -t 10 -s /build/pywbem-0.12.6/testsuite/wbemcli_quit_script.py
E           stderr:
E           Traceback (most recent call last):
E             File "/nix/store/1xc57f88y5v12awzpw9cywvrrbr072b0-python2.7-pywbem-0.12.6/bin/.wbemcli-wrapped", line 5, in <module>
E               import wbemcli
E             File "/nix/store/1xc57f88y5v12awzpw9cywvrrbr072b0-python2.7-pywbem-0.12.6/bin/wbemcli.py", line 2
E               export PATH='/nix/store/xdrv82i6qxf2llvk6iiwzrcsjrcbwdkx-python-2.7.15/bin:/nix/store/1xc57f88y5v12awzpw9cywvrrbr072b0-python2.7-pywbem-0.12.6/bin:/nix/store/7nacw0g7k4x6h7hs3flwaq7h80gblg6z-python2.7-setuptools-40.4.3/bin:/nix/store/zfnygr1s20p0472wrdrs3qv9xjjbiqyz-python2.7-pbr-4.2.0/bin'${PATH:+':'}$PATH
E                         ^
E           SyntaxError: invalid syntax

@Mic92
Copy link
Member

Mic92 commented Dec 4, 2018

Ah it tries to import $out/bin/wbemcli which is already a shell script at this point and not a python module.

@Mic92
Copy link
Member

Mic92 commented Dec 4, 2018

A hack could be to put the unwrapped version somewhere into the python path or just skip the test.

@worldofpeace
Copy link
Contributor Author

A hack could be to put the unwrapped version somewhere into the python path or just skip the test.

Yeah lets just skip the test.

@worldofpeace worldofpeace merged commit e7ff7b9 into NixOS:master Dec 4, 2018
@worldofpeace worldofpeace deleted the pywbem-update branch March 18, 2019 00:41
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