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

Missing {} around parameter in _python_sysconfig_path/var macros #130

Closed
StefanBruens opened this issue Jul 4, 2022 · 1 comment · Fixed by #132
Closed

Missing {} around parameter in _python_sysconfig_path/var macros #130

StefanBruens opened this issue Jul 4, 2022 · 1 comment · Fixed by #132

Comments

@StefanBruens
Copy link

%_python_sysconfig_path() %([ -x %1 ] && %1 -c "import sysconfig as s; print(s.get_paths().get('%2'))" || echo "!!_%1_not_installed_!!")
%_python_sysconfig_var() %([ -x %1 ] && %1 -c "import sysconfig as s; print(s.get_config_var('%2'))" || echo "!!_%1_not_installed_!!")

Currently, the macro reports

[   62s] warning: line 47: Possible unexpanded macro in: PreReq: python = !!_%1_not_installed_!!
[   62s] error: line 47: Illegal char '!' (0x21) in: PreReq: python = !!_%1_not_installed_!!

in case the wanted python is not installed, instead of the apparently wanted e.g. "!!python3_not_installed!!".

This should apparently read echo "!!_%{1}_not_installed_!!".

@bnavigator
Copy link
Collaborator

Good catch

bnavigator added a commit to bnavigator/python-rpm-macros that referenced this issue Jul 4, 2022
missing python interpreter
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Jul 29, 2022
…991154

https://build.opensuse.org/request/show/991154
by user mcepl + RBrownFactory
- Update to version 20220725.2ae32d5:
  * restore end-of-line in alternative scriptlets
- Update to version 20220721.0a061eb:
  * make python_flavored_alternatives less verbose
  * Move install of libalts from sciptlets to python_clone -a -- close gh#openSUSE/python-rpm-macros#133
  * hard-code %py_ver -- fix gh#openSUSE/python-rpm-macros#131
  * fix gh#openSUSE/python-rpm-macros#130 print proper error on missing python interpreter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants