diff --git a/files/emoji_clean_json.py b/files/emoji_clean_json.py index f8e4e20..a794791 100644 --- a/files/emoji_clean_json.py +++ b/files/emoji_clean_json.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python from __future__ import print_function import json diff --git a/files/pagure.spec b/files/pagure.spec index 306359c..066cc0d 100644 --- a/files/pagure.spec +++ b/files/pagure.spec @@ -11,6 +11,9 @@ %global python_pkgversion %{python3_pkgversion} %endif +# For now, to keep behavior consistent +%global _python_bytecompile_extra 1 + Name: pagure Version: 4.0.4 @@ -369,6 +372,9 @@ sed -e "s/pythonX.Y/python%{python3_version}/g" -i $RPM_BUILD_ROOT/%{_sysconfdir %dir %{_datadir}/pagure/ %config(noreplace) %{_datadir}/pagure/*.wsgi %{_datadir}/pagure/*.py* +%if ! (0%{?rhel} && 0%{?rhel} <= 7) +%{_datadir}/pagure/__pycache__/ +%endif %{_datadir}/pagure/alembic/ %{python_sitelib}/pagure/ %exclude %{python_sitelib}/pagure/themes/pagureio @@ -381,7 +387,7 @@ sed -e "s/pythonX.Y/python%{python3_version}/g" -i $RPM_BUILD_ROOT/%{_sysconfdir %files theme-pagureio %license LICENSE -%{python2_sitelib}/pagure/themes/pagureio/ +%{python_sitelib}/pagure/themes/pagureio/ %files milters diff --git a/pagure/hooks/files/mirror.py b/pagure/hooks/files/mirror.py index 1a5b0b6..77510cf 100755 --- a/pagure/hooks/files/mirror.py +++ b/pagure/hooks/files/mirror.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python """Pagure specific hook to mirror a repo to another location.