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

[libsodium] libsodium/1.0.18: Recipe broken on Python < 3.6 #869

Closed
cassava opened this issue Feb 13, 2020 · 3 comments · Fixed by #870
Closed

[libsodium] libsodium/1.0.18: Recipe broken on Python < 3.6 #869

cassava opened this issue Feb 13, 2020 · 3 comments · Fixed by #870
Assignees
Labels
bug Something isn't working

Comments

@cassava
Copy link

cassava commented Feb 13, 2020

The use of f-strings in the Python recipe causes the package to not be installed with a Python version that is less than 3.6. This is a serious problem for using conan with older distributions, such as Ubuntu Xenial or CentOS. Instead of f-strings, the .format(...) or % interpolation methods should be used.

Package and Environment Details

  • Package Name/Version: libsodium/1.0.18

Conan output

ERROR: Error loading conanfile at '~/.conan/data/libsodium/1.0.18/_/_/export/conanfile.py': Unable to load conanfile in ~/.conan/data/libsodium/1.0.18/_/_/export/conanfile.py
  File "/usr/lib/python3.5/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 693, in _load
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 661, in exec_module
  File "<frozen importlib._bootstrap_external>", line 767, in get_code
  File "<frozen importlib._bootstrap_external>", line 727, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "~/.conan/data/libsodium/1.0.18/_/_/export/conanfile.py", line 126
    raise ConanInvalidConfiguration(f"Unsupported arch or Neutrino version for libsodium: {self.settings.os} {self.settings.arch}")
                                                                                                                                 ^
SyntaxError: invalid syntax

Locations in Recipe

libsodium/1.0.18/conanfile.py
126:            raise ConanInvalidConfiguration(f"Unsupported arch or Neutrino version for libsodium: {self.settings.os} {self.settings.arch}")
148:            raise ConanInvalidConfiguration(f"Unsupported os for libsodium: {self.settings.os}")

This is as far as I can tell the only package in this repository that uses f-strings.

@cassava cassava added the bug Something isn't working label Feb 13, 2020
@danimtb
Copy link
Member

danimtb commented Feb 13, 2020

You are totally right about that. Thanks for reporting!!

uilianries added a commit to uilianries/conan-center-index that referenced this issue Feb 13, 2020
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@memsharded
Copy link
Member

That probably deserves a hook, it is easy that these slip into recipes without knowing.

@cassava
Copy link
Author

cassava commented Feb 14, 2020

Thanks for the quick response! Y'all are awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants