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

pysensors: init at 2017-07-13 #38957

Merged
merged 1 commit into from May 10, 2018
Merged

Conversation

guibou
Copy link
Contributor

@guibou guibou commented Apr 15, 2018

Motivation for this change

Pysensors is a python package to read hardware sensors.

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.

sha256 = "1xvbxnkz55fk5fpr514263c7s7s9r8hgrw4ybfaj5a0mligmmrfm";
};

propagatedBuildInputs = [ lm_sensors ];
Copy link
Member

Choose a reason for hiding this comment

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

Since this isn't a python library, it belongs into buildInputs.

meta = with stdenv.lib; {
maintainers = with maintainers; [ guibou ];
description = "Easy hardware health monitoring in Python for Linux systems";
homepage = "http://pysensors.readthedocs.org";
Copy link
Member

Choose a reason for hiding this comment

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

no quotes

maintainers = with maintainers; [ guibou ];
description = "Easy hardware health monitoring in Python for Linux systems";
homepage = "http://pysensors.readthedocs.org";
licence = licencses.bsd2;
Copy link
Member

Choose a reason for hiding this comment

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

licenses

version = "2018-04-15";
pname = "pysensors";

src = fetchFromGitHub {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a comment that https://pypi.org/project/PySensors/ is a different package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Above src?

Copy link
Member

Choose a reason for hiding this comment

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

Yes

@guibou guibou force-pushed the guibou_pysensors branch 2 times, most recently from e53c910 to 7166bb4 Compare April 15, 2018 12:20
@guibou
Copy link
Contributor Author

guibou commented Apr 15, 2018

@dotlambda Thank you for the review, changes done.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.pysensors python3.pkgs.pysensors

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.pysensors, python3.pkgs.pysensors

Partial log (click to expand)

writing manifest file 'sensors.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-aarch64-3.6/sensors.cpython-36m-aarch64-linux-gnu.so ->

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
/nix/store/8vqc12pa0qwhizp15nqjs177c0wdvqq2-python2.7-pysensors-2018-04-15
/nix/store/kyfjiylbc9d5g0xxnz7bni5qamcqckd9-python3.6-pysensors-2018-04-15

@dotlambda
Copy link
Member

Ran 0 tests in 0.000s

Can you try running the tests in https://github.com/bastienleonard/pysensors/tree/master/tests? Probably something like

checkPhase = ''
  ${python.interpreter} -m unittest discover
'';

@guibou
Copy link
Contributor Author

guibou commented Apr 15, 2018

@dotlambda

...
----------------------------------------------------------------------
Ran 3 tests in 0.000s

Done.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.pysensors python3.pkgs.pysensors

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: python2.pkgs.pysensors, python3.pkgs.pysensors

Partial log (click to expand)

    import sensors
ImportError: Kernel interface error


----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)
builder for '/nix/store/hqmq62pwy15w6bhbv1m8mqwlqavynn8a-python3.6-pysensors-2018-04-15.drv' failed with exit code 1
�[31;1merror:�[0m build of '/nix/store/hqmq62pwy15w6bhbv1m8mqwlqavynn8a-python3.6-pysensors-2018-04-15.drv', '/nix/store/ysrjl96njqnbbw7d5wl0vqmzq6x18m6a-python2.7-pysensors-2018-04-15.drv' failed

@dotlambda
Copy link
Member

ImportError: Kernel interface error

I guess that's a sandboxing thing. So we'll have to set doCheck = false after all (but you can keep the checkPhase). Please add a comment why tests are disabled.

@guibou guibou force-pushed the guibou_pysensors branch 2 times, most recently from 1ed212d to a984c80 Compare April 15, 2018 13:15
@guibou
Copy link
Contributor Author

guibou commented Apr 15, 2018

@dotlambda

I wonder, perhaps aarch64-linux does not provide the sensors. I set doCheck = false, but it may be better to disable aarch64-linux in platforms?

@dotlambda
Copy link
Member

lm_sensors isn't x86 only, so this one probably neither.
You can set platforms = platforms.linux however.

@dotlambda
Copy link
Member

Btw, I'm getting the same error in a sandboxed x86 build, so this is really not ARM-specific.

@@ -0,0 +1,32 @@
{ stdenv, buildPythonPackage, python, fetchFromGitHub, lm_sensors }:
buildPythonPackage rec {
version = "2018-04-15";
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 this should rather be 2017-07-13.

@dotlambda dotlambda changed the title pysensors: init at 2018-04-15 pysensors: init at 2017-07-13 May 10, 2018
@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.pysensors python3.pkgs.pysensors

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python2.pkgs.pysensors, python3.pkgs.pysensors

Partial log (click to expand)

/build/source
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/scvnjs2266ykq2iq1r7wc70zs0lidpxh-python3.6-pysensors-2017-07-13
shrinking /nix/store/scvnjs2266ykq2iq1r7wc70zs0lidpxh-python3.6-pysensors-2017-07-13/lib/python3.6/site-packages/sensors.cpython-36m-x86_64-linux-gnu.so
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/scvnjs2266ykq2iq1r7wc70zs0lidpxh-python3.6-pysensors-2017-07-13/lib
patching script interpreter paths in /nix/store/scvnjs2266ykq2iq1r7wc70zs0lidpxh-python3.6-pysensors-2017-07-13
checking for references to /build in /nix/store/scvnjs2266ykq2iq1r7wc70zs0lidpxh-python3.6-pysensors-2017-07-13...
/nix/store/lmawfvhpwb77hbhrlga7m9nrsvdlja5y-python2.7-pysensors-2017-07-13
/nix/store/scvnjs2266ykq2iq1r7wc70zs0lidpxh-python3.6-pysensors-2017-07-13

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python2.pkgs.pysensors, python3.pkgs.pysensors

Partial log (click to expand)

/build/source
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/lw9ffsjjh1r4xdkhjbra8hb0gbsvwjsz-python3.6-pysensors-2017-07-13
shrinking /nix/store/lw9ffsjjh1r4xdkhjbra8hb0gbsvwjsz-python3.6-pysensors-2017-07-13/lib/python3.6/site-packages/sensors.cpython-36m-aarch64-linux-gnu.so
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/lw9ffsjjh1r4xdkhjbra8hb0gbsvwjsz-python3.6-pysensors-2017-07-13/lib
patching script interpreter paths in /nix/store/lw9ffsjjh1r4xdkhjbra8hb0gbsvwjsz-python3.6-pysensors-2017-07-13
checking for references to /build in /nix/store/lw9ffsjjh1r4xdkhjbra8hb0gbsvwjsz-python3.6-pysensors-2017-07-13...
/nix/store/k2wvfd7b84jyh7wfa6420ajy2dxjf2km-python2.7-pysensors-2017-07-13
/nix/store/lw9ffsjjh1r4xdkhjbra8hb0gbsvwjsz-python3.6-pysensors-2017-07-13

@dotlambda dotlambda merged commit 71a561f into NixOS:master May 10, 2018
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