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

i3pystatus: 3.35 -> unstable #38738

Merged
merged 5 commits into from Apr 17, 2018
Merged

Conversation

mguentner
Copy link
Contributor

Motivation for this change

no official release since 2016/08
current rev has a few new plugins available

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.

@davidak
Copy link
Member

davidak commented Apr 11, 2018

Maybe package that as additional version so the latest stable is still available.
cc @igsha

@davidak
Copy link
Member

davidak commented Apr 11, 2018

Build fails on NixOS (with sandboxing):

nix run nixpkgs.nox -c nox-review pr 38738
[...]
running install tests
============================= test session starts ==============================
platform linux -- Python 3.6.5, pytest-3.5.0, py-1.5.3, pluggy-0.6.0
rootdir: /build/pytest-flake8-1.0.0, inifile: tox.ini
plugins: flake8-1.0.0
collected 15 items

Processing ./praw-5.2.0-py2.py3-none-any.whl
Requirement already satisfied: update-checker>=0.16 in /nix/store/l7bw2l1zhm81x1bs3djgcixsq9rl4wiq-python3.6-update_checker-0.16/lib/python3.6/site-packages (from praw==5.2.0)
Collecting prawcore<0.13,>=0.12.0 (from praw==5.2.0)
  Could not find a version that satisfies the requirement prawcore<0.13,>=0.12.0 (from praw==5.2.0) (from versions: )
No matching distribution found for prawcore<0.13,>=0.12.0 (from praw==5.2.0)
builder for '/nix/store/bjj9ay3hiv0qmmcr2yi7ij40pjvzpqdg-python3.6-praw-5.2.0.drv' failed with exit code 1
cannot build derivation '/nix/store/vnkaf1chhcc814jjfa5was8br7rd7scw-i3pystatus-2018-04-11-unstable.drv': 1 dependencies couldn't be built
error: build of '/nix/store/vnkaf1chhcc814jjfa5was8br7rd7scw-i3pystatus-2018-04-11-unstable.drv' failed
The invocation of "nix-build -A i3pystatus /home/davidak/.nox/nixpkgs" failed

@mguentner
Copy link
Contributor Author

5bd9342 seems to be the culprit.

PR: #38483

@mguentner
Copy link
Contributor Author

// cc @dotlambda @FRidh

It seems that there is no version on pypi that wants prawcore == 0.15, this is praw 5.4.0:

Processing ./praw-5.4.0-py2.py3-none-any.whl
Collecting prawcore<0.15,>=0.14.0 (from praw==5.4.0)
  Could not find a version that satisfies the requirement prawcore<0.15,>=0.14.0 (from praw==5.4.0) (from versions: )
No matching distribution found for prawcore<0.15,>=0.14.0 (from praw==5.4.0)
builder for ‘/nix/store/26v9gjg79njpvn8izffymrir40398wg0-python3.6-praw-5.4.0.drv’ failed with exit code 1
error: build of ‘/nix/store/26v9gjg79njpvn8izffymrir40398wg0-python3.6-praw-5.4.0.drv’ failed

@mguentner
Copy link
Contributor Author

@davidak
The praw deps are resolved / fixed. Builds fine now.

8e109bd is a quick hack to get around the breakage of flake8 due to #38483

@mguentner
Copy link
Contributor Author

Tracking: tholo/pytest-flake8/issues/45

@mguentner
Copy link
Contributor Author

8e109bd leads to a rebuild of backintime-qt4 (really feels like travelling back in time...), this package has a broken install script, disabled for now in #38899
This is a can of worms... 🐍

@Mic92
Copy link
Member

Mic92 commented Apr 13, 2018

They seem to have switched to a rolling-release model: enkore/i3pystatus#584 (comment)

@mguentner
Copy link
Contributor Author

rebased again with #38899 being merged

nox:

=== Reviewing PR 38738 : i3pystatus: 3.35 -> unstable
==> Fetching base (master)
==> Fetching PR
==> Fetching extra history for merging
==> Merging PR into base
Building in /tmp/nox-review-n4hxx323: python27Packages.goobook python36Packages.bugwarrior python27Packages.keyring python27Packages.bugwarrior urlwatch gnome15 python27Packages.praw python36Packages.praw python27Packages.ofxclient i3pystatus jrnl python27Packages.prawcore bonfire backintime-common python36Packages.keyring python36Packages.sopel python36Packages.prawcore python36Packages.ofxclient
Invoking nix-build -A python27Packages.goobook -A python36Packages.bugwarrior -A python27Packages.keyring -A python27Packages.bugwarrior -A urlwatch -A gnome15 -A python27Packages.praw -A python36Packages.praw -A python27Packages.ofxclient -A i3pystatus -A jrnl -A python27Packages.prawcore -A bonfire -A backintime-common -A python36Packages.keyring -A python36Packages.sopel -A python36Packages.prawcore -A python36Packages.ofxclient /home/anon/.nox/nixpkgs
/nix/store/mxdskcmzjz8dd72b2bxhszswqiqyh5xq-python2.7-goobook-1.9
/nix/store/3kgl6dd1wsfpr7jld8b63i93nqarlf6f-python3.6-bugwarrior-1.5.1
/nix/store/w921a4jzcc34zgz4vpcc37q0dway7c11-python2.7-keyring-12.0.1
/nix/store/mwhadc4h6cmng7cfs438c0cpr4id1drk-python2.7-bugwarrior-1.5.1
/nix/store/67i6p9cqllpikw65vfq3qjhv7vwjh06l-urlwatch-2.9
/nix/store/jfar20scg13z54n16119380y2v0p0km2-gnome15-2016-06-10
/nix/store/90qh8j720y83aygixglannwy07bi5zr5-python2.7-praw-5.4.0
/nix/store/6v66a5yapic1rj8xa483mxv9m91mf9bs-python3.6-praw-5.4.0
/nix/store/j36ill4gkwmmnb4x4m0hh6x2nkxx6z77-python2.7-ofxclient-2.0.3
/nix/store/8wgq0f4f3rs8n338bl99l324pqjyjvkd-i3pystatus-2018-04-11-unstable
/nix/store/5xdzjaxjgcp6b5c6k472jazc2832rh3b-jrnl-1.9.8
/nix/store/v76sfpn4ipkja032q0jgrxpiklzsg7f4-python2.7-prawcore-0.14.0
/nix/store/q93az5pkfyp79h319gr9dhc3jn5fr6m6-bonfire-unstable-2017-01-19
/nix/store/sz940rv778zxmizibm36qbi9nf0slqmz-backintime-common-1.1.24
/nix/store/v5jaq1d3rfmvg2qv9bzmrhmb12r0h18j-python3.6-keyring-12.0.1
/nix/store/14h6p8c90kf1sgkhawznasih807br9d6-python3.6-sopel-6.3.1
/nix/store/sgqdap42b49sqw4ll50i9sq2gwyzxwar-python3.6-prawcore-0.14.0
/nix/store/8s2aw58flgncnsy33c9rn7zkjr0gkb9c-python3.6-ofxclient-2.0.3
Result in /tmp/nox-review-n4hxx323
total 0

@mguentner mguentner closed this Apr 13, 2018
@mguentner mguentner reopened this Apr 13, 2018
@dotlambda
Copy link
Member

Seems like the version requirement is unnecessarily strict: praw-dev/praw@5a8a4af
I think we should just patch the upper bound out of praw's setup.py.

@davidak
Copy link
Member

davidak commented Apr 13, 2018

Build works now on NixOS 18.03.

I get this error when executing:

[davidak@X230:~]$ /nix/store/8wgq0f4f3rs8n338bl99l324pqjyjvkd-i3pystatus-2018-04-11-unstable/bin/i3pystatus
Traceback (most recent call last):
  File "/nix/store/8wgq0f4f3rs8n338bl99l324pqjyjvkd-i3pystatus-2018-04-11-unstable/bin/.i3pystatus-wrapped", line 12, in <module>
    sys.exit(main())
  File "/nix/store/8wgq0f4f3rs8n338bl99l324pqjyjvkd-i3pystatus-2018-04-11-unstable/lib/python3.6/site-packages/i3pystatus/__init__.py", line 49, in main
    clock_example()
  File "/nix/store/8wgq0f4f3rs8n338bl99l324pqjyjvkd-i3pystatus-2018-04-11-unstable/lib/python3.6/site-packages/i3pystatus/__init__.py", line 34, in clock_example
    status.register(Clock())
  File "/nix/store/8wgq0f4f3rs8n338bl99l324pqjyjvkd-i3pystatus-2018-04-11-unstable/lib/python3.6/site-packages/i3pystatus/core/modules.py", line 66, in __init__
    super(Module, self).__init__(*args, **kwargs)
  File "/nix/store/8wgq0f4f3rs8n338bl99l324pqjyjvkd-i3pystatus-2018-04-11-unstable/lib/python3.6/site-packages/i3pystatus/core/settings.py", line 109, in __init__
    self.init()
  File "/nix/store/8wgq0f4f3rs8n338bl99l324pqjyjvkd-i3pystatus-2018-04-11-unstable/lib/python3.6/site-packages/i3pystatus/clock.py", line 83, in init
    locale.setlocale(locale.LC_TIME, lang)
  File "/nix/store/96wn2gz3mwi71gwcrvpfg39bsymd7gqx-python3-3.6.5/lib/python3.6/locale.py", line 598, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

@dotlambda
Copy link
Member

Regarding keyring, maybe you can convince upstream to drop the pytest-flake8 dependency (its build breaks on literally every major pytest upgrade).
You should however at least add a comment why tests are disabled.

@@ -1,14 +1,17 @@
{ stdenv, fetchurl, libpulseaudio, python3Packages, extraLibs ? [] }:
{ stdenv, fetchFromGitHub, libpulseaudio, python3Packages, extraLibs ? [] }:

python3Packages.buildPythonApplication rec {
name = "${pname}-${version}";
Copy link
Member

Choose a reason for hiding this comment

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

Drop this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please elaborate, not sure what you mean.

fetchurl was for pypi, fetchFromGitHub for the rolling release version

Copy link
Member

Choose a reason for hiding this comment

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

name is computed from pname and version for buildPythonApplication

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood, was fixed on the diff instead of the actual line :)


python3Packages.buildPythonApplication rec {
name = "${pname}-${version}";
version = "3.35";
version = "2018-04-11-unstable";
Copy link
Member

@dotlambda dotlambda Apr 13, 2018

Choose a reason for hiding this comment

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

Please switch order of "unstable" and the date.
Also add a comment that they're using a rolling release model and link to enkore/i3pystatus#584.

@mguentner
Copy link
Contributor Author

@davidak confirmed :/

It only affects the clock, this did not occur when the base was different.

@mguentner mguentner force-pushed the i3pystatus_unstable branch 2 times, most recently from 0f427f9 to b224934 Compare April 13, 2018 13:57
@dotlambda
Copy link
Member

@GrahamcOfBorg build i3pystatus

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: i3pystatus

Partial log (click to expand)

Successfully installed i3pystatus-3.35
/build/source
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/rmvqggmindlfyv77196pfvg44mgz1i5i-i3pystatus-unstable-2018-04-11
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/rmvqggmindlfyv77196pfvg44mgz1i5i-i3pystatus-unstable-2018-04-11/lib  /nix/store/rmvqggmindlfyv77196pfvg44mgz1i5i-i3pystatus-unstable-2018-04-11/bin 
patching script interpreter paths in /nix/store/rmvqggmindlfyv77196pfvg44mgz1i5i-i3pystatus-unstable-2018-04-11
checking for references to /build in /nix/store/rmvqggmindlfyv77196pfvg44mgz1i5i-i3pystatus-unstable-2018-04-11...
wrapping `/nix/store/rmvqggmindlfyv77196pfvg44mgz1i5i-i3pystatus-unstable-2018-04-11/bin/i3pystatus'...
wrapping `/nix/store/rmvqggmindlfyv77196pfvg44mgz1i5i-i3pystatus-unstable-2018-04-11/bin/i3pystatus-setting-util'...

@mguentner
Copy link
Contributor Author

So then we just need to figure out why suddenly the clock stopped working.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: i3pystatus

Partial log (click to expand)

/build/source
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/q3fgn9jm2riny6rslhnwypa5b38d4h3z-i3pystatus-unstable-2018-04-11
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/q3fgn9jm2riny6rslhnwypa5b38d4h3z-i3pystatus-unstable-2018-04-11/lib  /nix/store/q3fgn9jm2riny6rslhnwypa5b38d4h3z-i3pystatus-unstable-2018-04-11/bin
patching script interpreter paths in /nix/store/q3fgn9jm2riny6rslhnwypa5b38d4h3z-i3pystatus-unstable-2018-04-11
checking for references to /build in /nix/store/q3fgn9jm2riny6rslhnwypa5b38d4h3z-i3pystatus-unstable-2018-04-11...
wrapping `/nix/store/q3fgn9jm2riny6rslhnwypa5b38d4h3z-i3pystatus-unstable-2018-04-11/bin/i3pystatus-setting-util'...
wrapping `/nix/store/q3fgn9jm2riny6rslhnwypa5b38d4h3z-i3pystatus-unstable-2018-04-11/bin/i3pystatus'...
/nix/store/q3fgn9jm2riny6rslhnwypa5b38d4h3z-i3pystatus-unstable-2018-04-11

@mguentner
Copy link
Contributor Author

This works:

 LC_TIME=C result/bin/i3pystatus

@Mic92
Copy link
Member

Mic92 commented Apr 13, 2018

It must doing something weird because the following works:

python3 -c 'import locale; locale.setlocale(locale.LC_TIME, "en_DK.UTF-8")'

@mguentner
Copy link
Contributor Author

@Mic92 thanks for investigating.

Again, it worked fine with an older base. Something other than that must have changed. I am not investigating further as putting LC_TIME=C in my i3 config is close enough for me.

But I feel like this should be fixed :)

@dotlambda
Copy link
Member

Did you try bisecting which commit in their/our history broke this?

@dotlambda
Copy link
Member

@mguentner What's your opinion on #38738 (comment)?

@@ -20,7 +20,8 @@ python3Packages.buildPythonApplication rec {

libpulseaudioPath = stdenv.lib.makeLibraryPath [ libpulseaudio ];
ldWrapperSuffix = "--suffix LD_LIBRARY_PATH : \"${libpulseaudioPath}\"";
makeWrapperArgs = [ ldWrapperSuffix ]; # libpulseaudio.so is loaded manually
# LC_TIME != C results in locale.Error: unsupported locale setting
makeWrapperArgs = [ "--set LC_TIME C" ldWrapperSuffix ]; # libpulseaudio.so is loaded manually
Copy link
Member

Choose a reason for hiding this comment

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

at least now it should work for everyone.

@mguentner
Copy link
Contributor Author

@dotlambda

@mguentner What's your opinion on #38738 (comment)?

I have no opinion on that.

Did you try bisecting which commit in their/our history broke this?

It's our / nixpkgs history, currently doing (since yesterday evening) a bisect.

@dotlambda
Copy link
Member

I have no opinion on that.

In that case, please drop the upper bound and get rid of the downgrade.

@mguentner
Copy link
Contributor Author

Feel free to push the drop the upper bound commit, I will kick out the downgrade (rebase) afterwards.

@dotlambda
Copy link
Member

I think the "unstable" in the version should be left out because it's not unstable, there are just no versioned releases.

@Mic92 Mic92 merged commit 6090c94 into NixOS:master Apr 17, 2018
@mguentner mguentner deleted the i3pystatus_unstable branch April 18, 2018 14:24
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

5 participants