Re: qarte - compilation fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Martin Gansser" <martin.gansser@xxxxxxxxx> wrote:

> when compiling qarte-4.4.0 with this spec file
> https://martinkg.fedorapeople.org/Packages/test/qarte.spec

>  '[' noarch = noarch ']'
> + case "${QA_CHECK_RPATHS:-}" in
> + /usr/lib/rpm/check-buildroot
> + /usr/lib/rpm/brp-compress
> + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
> + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
> Compiling /home/martin/rpmbuild/BUILDROOT/qarte-4.0.0-1.fc27.x86_64/usr/share/qarte/arteconcert.py ...
>   File "/usr/share/qarte/arteconcert.py", line 385
>     def update_pitch(self, *args, html=False):
>                                      ^
> SyntaxError: invalid syntax

> error: Bad exit status from /var/tmp/rpm-tmp.rp9wQD (%install)

> only when i comment the following line, the program compiles fine:
> #####cp -p *.py* %{buildroot}%{_datadir}/%{name}

To state the obvious: arteconcert.py is Python 3,
brp-python-bytecompile uses /usr/bin/python (which is most
likely Python 2):

| [tim@passepartout ~]$ python2 -m py_compile ~/RPMS/BUILD/qarte-4.0.0/arteconcert.py
|   File "/home/tim/RPMS/BUILD/qarte-4.0.0/arteconcert.py", line 385
|     def update_pitch(self, *args, html=False):
|                                      ^
| SyntaxError: invalid syntax

| [tim@passepartout ~]$ python3 -m py_compile ~/RPMS/BUILD/qarte-4.0.0/arteconcert.py
| [tim@passepartout ~]$

Following the advice from
https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation,
prepending:

| %global __python %{__python3}

to your qarte.spec works, but there may be cleaner solu-
tions.

Tim
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux