#2 Use Python interpreters for byte-compilation without addtional arguments
Closed a month ago by jpokorny. Opened 2 months ago by lbalhar.
rpms/ lbalhar/clufter master  into  master

file modified
+4 -11

@@ -12,7 +12,7 @@ 

  

  Name:           clufter

  Version:        0.77.1

- Release:        8%{?dist}

+ Release:        9%{?dist}

  Summary:        Tool/library for transforming/analyzing cluster configuration formats

  License:        GPLv2+

  URL:            https://pagure.io/%{name}

@@ -302,21 +302,11 @@ 

  

  # byte-compilation

  %if %{with python2}

- %if "%{?quote:1}" != "" && "%{?quote:1}" != "1"

- %py_byte_compile %{quote:%{__python2} -Es} %{python2_sitelib}/%{name}

- %py_byte_compile %{quote:%{__python2} -Es} %{buildroot}%{_datarootdir}/%{name}/ext-plugins

- %else

  %py_byte_compile %{__python2} %{python2_sitelib}/%{name}

  %py_byte_compile %{__python2} %{buildroot}%{_datarootdir}/%{name}/ext-plugins

  %endif

- %endif

- %if "%{?quote:1}" != "" && "%{?quote:1}" != "1"

- %py_byte_compile %{quote:%{__python3} -I} %{python3_sitelib}/%{name}

- %py_byte_compile %{quote:%{__python3} -I} %{buildroot}%{_datarootdir}/%{name}/ext-plugins

- %else

  %py_byte_compile %{__python3} %{python3_sitelib}/%{name}

  %py_byte_compile %{__python3} %{buildroot}%{_datarootdir}/%{name}/ext-plugins

- %endif

  

  declare bashcompdir="$(pkg-config --variable=completionsdir bash-completion \

                         || echo '%{_datadir}/bash-completion/completions')"

@@ -424,6 +414,9 @@ 

  %{_datarootdir}/%{name}/ext-plugins/lib-pcs

  

  %changelog

+ * Fri Jul 12 2019 Lumír Balhar <lbalhar@redhat.com> - 0.77.1-9

+ - Use Python interpreters for byte-compilation without addtional arguments

+ 

  * Mon Feb 18 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.77.1-8

  - Enable python dependency generator

  

As we discussed earlier, it'd be better to use Python interpreters for byte-compilation without additional arguments.

As you can see here, the new version of the %py_byte_compile macro will use "-s" parameter by default and won't allow using any additional arguments for Python interpreter.

Scratch build looks good to me: https://koji.fedoraproject.org/koji/taskinfo?taskID=36199196

Thanks for the suggestion, took a more long-winded approach along with
even more generic upstream spec file:

https://src.fedoraproject.org/rpms/clufter/c/22a7ab42d1017118f29fb4f187a951828c70186f?branch=master

Let me know if there's still any kind of disruption present.

Also, I am not perticularly happy about allowing any kind of
module/code injection beyond what the Python source files arrange
for themselves explicitly, because it hazards various hard to
track down issues (module aliasing etc.), but alas, I am not
in position to pursue any sort of purity/sanity in this regard.

Pull-Request has been closed by jpokorny

a month ago