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

s-tui: migrate to python3 #80628

Merged
merged 1 commit into from Feb 22, 2020
Merged

s-tui: migrate to python3 #80628

merged 1 commit into from Feb 22, 2020

Conversation

mweinelt
Copy link
Member

Including glibcLocales in checkInputs resolves a locale.Error exception
during the check phase.

  File "/build/s-tui-1.0.0/s_tui/sensors_menu.py", line 27, in <module>
    import urwid
  File "/nix/store/xxhpq1kcjy0kimfwnwqlzh2pchkp9khi-python3.7-urwid-2.1.0/lib/python3.7/site-packages/urwid/__init__.py", line 26, in <module>
    from urwid.widget import (FLOW, BOX, FIXED, LEFT, RIGHT, CENTER, TOP, MIDDLE,
  File "/nix/store/xxhpq1kcjy0kimfwnwqlzh2pchkp9khi-python3.7-urwid-2.1.0/lib/python3.7/site-packages/urwid/widget.py", line 27, in <module>
    from urwid.util import (MetaSuper, decompose_tagmarkup, calc_width,
  File "/nix/store/xxhpq1kcjy0kimfwnwqlzh2pchkp9khi-python3.7-urwid-2.1.0/lib/python3.7/site-packages/urwid/util.py", line 61, in <module>
    detected_encoding = detect_encoding()
  File "/nix/store/xxhpq1kcjy0kimfwnwqlzh2pchkp9khi-python3.7-urwid-2.1.0/lib/python3.7/site-packages/urwid/util.py", line 58, in detect_encoding
    locale.setlocale(locale.LC_ALL, initial)
  File "/nix/store/ja04f3cmapzb3f2mvjrb883bfqclsirq-python3-3.7.6/lib/python3.7/locale.py", line 608, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

pkgs/tools/system/s-tui/default.nix Outdated Show resolved Hide resolved
Includes LC_ALL = "en_US.UTF-8"; that resolves a locale.Error exception
during the check phase.

[...]
  File "/build/s-tui-1.0.0/s_tui/sensors_menu.py", line 27, in <module>
    import urwid
  File "/nix/store/xxhpq1kcjy0kimfwnwqlzh2pchkp9khi-python3.7-urwid-2.1.0/lib/python3.7/site-packages/urwid/__init__.py", line 26, in <module>
    from urwid.widget import (FLOW, BOX, FIXED, LEFT, RIGHT, CENTER, TOP, MIDDLE,
  File "/nix/store/xxhpq1kcjy0kimfwnwqlzh2pchkp9khi-python3.7-urwid-2.1.0/lib/python3.7/site-packages/urwid/widget.py", line 27, in <module>
    from urwid.util import (MetaSuper, decompose_tagmarkup, calc_width,
  File "/nix/store/xxhpq1kcjy0kimfwnwqlzh2pchkp9khi-python3.7-urwid-2.1.0/lib/python3.7/site-packages/urwid/util.py", line 61, in <module>
    detected_encoding = detect_encoding()
  File "/nix/store/xxhpq1kcjy0kimfwnwqlzh2pchkp9khi-python3.7-urwid-2.1.0/lib/python3.7/site-packages/urwid/util.py", line 58, in detect_encoding
    locale.setlocale(locale.LC_ALL, initial)
  File "/nix/store/ja04f3cmapzb3f2mvjrb883bfqclsirq-python3-3.7.6/lib/python3.7/locale.py", line 608, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting
@ofborg ofborg bot requested a review from infinisil February 22, 2020 15:37
@infinisil infinisil merged commit 1035f72 into NixOS:master Feb 22, 2020
@mweinelt mweinelt deleted the pr/s-tui branch February 22, 2020 19:40
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

2 participants