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.i3ipc: init at 1.4.0 #34835

Merged
merged 1 commit into from Feb 11, 2018
Merged

pythonPackages.i3ipc: init at 1.4.0 #34835

merged 1 commit into from Feb 11, 2018

Conversation

vanzef
Copy link
Contributor

@vanzef vanzef commented Feb 11, 2018

closes #34828

Motivation for this change

Request from @Cypher1.

Things done

Added package pythonPackages.i3ipc.

  • 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.

@dotlambda
Copy link
Member

Please rebase.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.i3ipc python3.pkgs.i3ipc

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

reading manifest file 'i3ipc.egg-info/SOURCES.txt'
writing manifest file 'i3ipc.egg-info/SOURCES.txt'
running build_ext

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

OK
/nix/store/f1ncvwl638i6kygz2jkbv33ipxbhk2mm-python2.7-i3ipc-1.4.0
/nix/store/i3lrfjafbm5adj6qf6pwz8wanic3wr14-python3.6-i3ipc-1.4.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

reading manifest file 'i3ipc.egg-info/SOURCES.txt'
writing manifest file 'i3ipc.egg-info/SOURCES.txt'
running build_ext

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

OK
/nix/store/gfz6ijp6fr0fj4zbwj2psjfik1489kfg-python2.7-i3ipc-1.4.0
/nix/store/fxxl7y0v457v4xa3i5cag717a2a384pk-python3.6-i3ipc-1.4.0

@FRidh
Copy link
Member

FRidh commented Feb 11, 2018

Ran 0 tests in 0.000s

No tests are found. Either the test runner cannot find tests and needs to be patched, or there simply are no tests in which case the tests need to be disabled. Do include a comment explaining why the tests are disabled.

@dotlambda
Copy link
Member

dotlambda commented Feb 11, 2018

Ran 0 tests in 0.000s

Please set doCheck = false and add a comment why they are disabled. I think we would need to run an X server to run the tests.

@vanzef
Copy link
Contributor Author

vanzef commented Feb 11, 2018

@FRidh @dotlambda
There are some tests in git repo, however there are none in PyPi package, so I've changed src to GitHub release, added i3, xorgserver (for xvfb) and pytest packages. Now tests are passing.


propagatedBuildInputs = [ enum-compat ];

checkPhase = ''python run-tests.py'';
Copy link
Member

Choose a reason for hiding this comment

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

${python.interpreter}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.i3ipc python3.pkgs.i3ipc

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

============================= test session starts ==============================
platform linux -- Python 3.6.4, pytest-3.4.0, py-1.5.2, pluggy-0.6.0
rootdir: /tmp/nix-build-python3.6-i3ipc-1.4.0.drv-0/i3ipc-python-1.4.0, inifile:
collected 2 items

test/test_window.py ..                                                   [100%]

=========================== 2 passed in 0.16 seconds ===========================
/nix/store/y9rdq2l9200yn80lig7051k46cnwnpip-python2.7-i3ipc-1.4.0
/nix/store/s9wixl7dlvkzbv5i732gynncvh7psvxx-python3.6-i3ipc-1.4.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

============================= test session starts ==============================
platform linux -- Python 3.6.4, pytest-3.4.0, py-1.5.2, pluggy-0.6.0
rootdir: /build/i3ipc-python-1.4.0, inifile:
collected 2 items

test/test_window.py ..                                                   [100%]

=========================== 2 passed in 0.36 seconds ===========================
/nix/store/n3ahr4c49z3casmw8sia76s2c6dgc819-python2.7-i3ipc-1.4.0
/nix/store/3zkmxghz0696ychwkdfxdfrkk06mmivx-python3.6-i3ipc-1.4.0

pname = "i3ipc";
version = "1.4.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.

fetchFromGitHub

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it really better? With fetchurl one can change only version and sha256 when with fetchFromGitHub the rev also should be specified. Probably, there is a way to download by tags and not revision?

Copy link
Member

Choose a reason for hiding this comment

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

yes, rev = tag

Copy link
Member

@dotlambda dotlambda Feb 11, 2018

Choose a reason for hiding this comment

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

Actually you'd have to change url and sha256 with fetchurl. rev is definitely easier to change than url.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, got it and fixed.

sha256 = "06x1zc9qizmcg4lxlh2w5amcq7igqlrs1kkvvi1czb5wy689ygsi";
};

nativeBuildInputs = [ xorgserver pytest i3 ];
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 probably better suited for checkInputs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@dotlambda
Copy link
Member

@GrahamcOfBorg build python2.pkgs.i3ipc python3.pkgs.i3ipc

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

============================= test session starts ==============================
platform linux -- Python 3.6.4, pytest-3.4.0, py-1.5.2, pluggy-0.6.0
rootdir: /build/source, inifile:
collected 2 items

test/test_window.py ..                                                   [100%]

=========================== 2 passed in 0.35 seconds ===========================
/nix/store/fkabi7jf1janbwnq4miqz6pb0bn4x51c-python2.7-i3ipc-1.4.0
/nix/store/4wmix95jfdkxz7xv09p62psjaqgh7k7l-python3.6-i3ipc-1.4.0

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)

i3ipc/i3ipc.py:10: in <module>
    from enum import Enum
E   ImportError: No module named enum
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.31 seconds ============================
test/test_window.py ..                                                   [100%]

=========================== 2 passed in 0.75 seconds ===========================
/nix/store/w1r1q0cj4l8hhxnkkn56jdpfwsxil9ck-python2.7-i3ipc-1.4.0
/nix/store/rqqqs8x14d40mcr2ighrgmccjnf7p965-python3.6-i3ipc-1.4.0

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@FRidh FRidh merged commit b101148 into NixOS:master Feb 11, 2018
@Cypher1
Copy link

Cypher1 commented Feb 11, 2018

Thanks very much.
Is this process required for all python packages or can we automate it for most?

@FRidh
Copy link
Member

FRidh commented Feb 11, 2018

This is indeed a process that is required for all packages.

Aside from https://github.com/NixOS/nixpkgs/blob/master/maintainers/scripts/update-python-libraries there is no automation for Python in Nixpkgs. There have been attempts, but because of various reasons there is no good solution for in Nixpkgs. For other projects pypi2nix may be a good solution though.

@samueldr samueldr mentioned this pull request Nov 10, 2018
6 tasks
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.

Package request: python35Packages.i3ipc
5 participants