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.iso-639: add setuptools dependency #68984

Merged
merged 1 commit into from Sep 18, 2019

Conversation

averelld
Copy link
Contributor

Motivation for this change

Needed at runtime (can be tested by using streamlink). cc #68314

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 nix-review --run "nix-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.
Notify maintainers

cc @

@worldofpeace
Copy link
Contributor

Can you paste the error you encounter? I couldn't reproduce.

@averelld
Copy link
Contributor Author

Ah, it's possible this was just in release-19.09.

streamlink https://www.twitch.tv/videos/480528462 best                                                                                                                                                ~
[cli][info] Found matching plugin twitch for URL https://www.twitch.tv/videos/480528462
Traceback (most recent call last):
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/bin/.streamlink-wrapped", line 11, in <module>
    sys.exit(main())
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink_cli/main.py", line 1033, in main
    handle_url()
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink_cli/main.py", line 577, in handle_url
    streams = fetch_streams(plugin)
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink_cli/main.py", line 457, in fetch_streams
    sorting_excludes=args.stream_sorting_excludes)
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/plugin/plugin.py", line 317, in streams
    ostreams = self._get_streams()
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/plugins/twitch.py", line 768, in _get_streams
    return self._get_hls_streams("video")
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/plugins/twitch.py", line 737, in _get_hls_streams
    force_restart=not stream_type == "live"
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/stream/hls.py", line 374, in parse_variant_playlist
    locale = session_.localization
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/session.py", line 496, in localization
    return Localization(self.get_option("locale"))
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/utils/l10n.py", line 118, in __init__
    self.language_code = language_code
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/utils/l10n.py", line 143, in language_code
    self.language, self.country = self._parse_locale_code(language_code)
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/utils/l10n.py", line 128, in _parse_locale_code
    return self.get_language(parts[0]), self.get_country(parts[1])
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/utils/l10n.py", line 172, in get_language
    return Language.get(language)
  File "/nix/store/qdylmrk0fkyh43miifj0pb7x639bk8ds-streamlink-1.1.1/lib/python3.7/site-packages/streamlink/utils/l10n.py", line 78, in get
    l = languages.get(alpha2=language)
  File "/nix/store/idzmzk0w9clsppmn3kvy435a1qig9hw4-python3.7-iso-639-0.4.5/lib/python3.7/site-packages/iso639/iso639.py", line 265, in get
    return getattr(self, key)[value]
  File "/nix/store/idzmzk0w9clsppmn3kvy435a1qig9hw4-python3.7-iso-639-0.4.5/lib/python3.7/site-packages/iso639/iso639.py", line 132, in __getattr__
    'alpha2': self.part1,
  File "/nix/store/idzmzk0w9clsppmn3kvy435a1qig9hw4-python3.7-iso-639-0.4.5/lib/python3.7/site-packages/iso639/iso639.py", line 105, in __get__
    val = self.f(instance)
  File "/nix/store/idzmzk0w9clsppmn3kvy435a1qig9hw4-python3.7-iso-639-0.4.5/lib/python3.7/site-packages/iso639/iso639.py", line 198, in part1
    return dict((x.part1, x) for x in self.languages if x.part1)
  File "/nix/store/idzmzk0w9clsppmn3kvy435a1qig9hw4-python3.7-iso-639-0.4.5/lib/python3.7/site-packages/iso639/iso639.py", line 105, in __get__
    val = self.f(instance)
  File "/nix/store/idzmzk0w9clsppmn3kvy435a1qig9hw4-python3.7-iso-639-0.4.5/lib/python3.7/site-packages/iso639/iso639.py", line 174, in languages
    l, i, m, p5, p2, p1 = _fabtabular()
  File "/nix/store/idzmzk0w9clsppmn3kvy435a1qig9hw4-python3.7-iso-639-0.4.5/lib/python3.7/site-packages/iso639/iso639.py", line 20, in _fabtabular
    from pkg_resources import resource_filename
ModuleNotFoundError: No module named 'pkg_resources'
zsh: exit 1     streamlink https://www.twitch.tv/videos/480528462 best

Anyway, it is a runtime-dep: https://github.com/noumar/iso639/blob/master/iso639/iso639.py#L20

@worldofpeace
Copy link
Contributor

Thanks for confirming @averelld.

@worldofpeace worldofpeace merged commit 175aecb into NixOS:master Sep 18, 2019
@worldofpeace
Copy link
Contributor

backported in e73366b

@averelld averelld deleted the iso639-add-setuptools branch September 18, 2019 18:48
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