From e09532cf340bb463de57dee7db0138b25ca11ec0 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Jul 28 2018 13:05:52 +0000 Subject: Generate dependencies automatically Signed-off-by: Igor Gnatenko --- diff --git a/pagure.spec b/pagure.spec index 5691c5e..6740c60 100644 --- a/pagure.spec +++ b/pagure.spec @@ -1,3 +1,4 @@ +%{?python_enable_dependency_generator} %if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) %global python_pkgversion %{nil} %else @@ -10,7 +11,7 @@ Name: pagure Version: 4.0.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A git-centered forge License: GPLv2+ @@ -28,38 +29,29 @@ BuildRequires: systemd-devel BuildRequires: systemd BuildRequires: python%{python_pkgversion}-devel BuildRequires: python%{python_pkgversion}-setuptools -BuildRequires: python%{python_pkgversion}-bcrypt - -BuildRequires: python%{python_pkgversion}-alembic -BuildRequires: python%{python_pkgversion}-arrow -BuildRequires: python%{python_pkgversion}-binaryornot -BuildRequires: python%{python_pkgversion}-bleach -BuildRequires: python%{python_pkgversion}-blinker -BuildRequires: python%{python_pkgversion}-chardet -BuildRequires: python%{python_pkgversion}-cryptography -BuildRequires: python%{python_pkgversion}-docutils -BuildRequires: python%{python_pkgversion}-flask -BuildRequires: python%{python_pkgversion}-flask-wtf -BuildRequires: python%{python_pkgversion}-flask-multistatic -BuildRequires: python%{python_pkgversion}-markdown -BuildRequires: python%{python_pkgversion}-nose -BuildRequires: python%{python_pkgversion}-psutil -BuildRequires: python%{python_pkgversion}-pygit2 >= %{min_pygit2_version} -BuildRequires: python%{python_pkgversion}-pygments -BuildRequires: python%{python_pkgversion}-fedora -BuildRequires: python%{python_pkgversion}-openid -BuildRequires: python%{python_pkgversion}-openid-cla -BuildRequires: python%{python_pkgversion}-openid-teams -BuildRequires: python%{python_pkgversion}-straight-plugin -BuildRequires: python%{python_pkgversion}-wtforms -BuildRequires: python%{python_pkgversion}-munch -BuildRequires: python%{python_pkgversion}-enum34 -BuildRequires: python%{python_pkgversion}-redis - -BuildRequires: python%{python_pkgversion}-sqlalchemy > 0.8 -Requires: python%{python_pkgversion}-sqlalchemy > 0.8 +%if 0%{?el6} +BuildRequires: python%{python_pkgversion}-sqlalchemy >= 0.8 +BuildRequires: python%{python_pkgversion}-jinja2 >= 2.4 +%endif +%if 0%{?el6} +# Needed only for local authentication and/or Pagure CI +Requires: python%{python_pkgversion}-cryptography +# Required only for the `local` authentication backend Requires: python%{python_pkgversion}-bcrypt +# Required only for the `fas` and `openid` authentication backends +Requires: python%{python_pkgversion}-fedora +# Required only for the `oidc` authentication backend +# flask-oidc +# Required only if `USE_FLASK_SESSION_EXT` is set to `True` +# flask-session +%else +Recommends: python%{python_pkgversion}-cryptography +Recommends: python%{python_pkgversion}-bcrypt +Recommends: python%{python_pkgversion}-fedora +%endif + +%if %{undefined python_enable_dependency_generator} Requires: python%{python_pkgversion}-alembic Requires: python%{python_pkgversion}-arrow Requires: python%{python_pkgversion}-binaryornot @@ -67,25 +59,25 @@ Requires: python%{python_pkgversion}-bleach Requires: python%{python_pkgversion}-blinker Requires: python%{python_pkgversion}-celery Requires: python%{python_pkgversion}-chardet -Requires: python%{python_pkgversion}-cryptography Requires: python%{python_pkgversion}-docutils Requires: python%{python_pkgversion}-enum34 Requires: python%{python_pkgversion}-flask -Requires: python%{python_pkgversion}-flask-wtf Requires: python%{python_pkgversion}-flask-multistatic +Requires: python%{python_pkgversion}-flask-wtf Requires: python%{python_pkgversion}-markdown +Requires: python%{python_pkgversion}-munch Requires: python%{python_pkgversion}-pillow Requires: python%{python_pkgversion}-psutil Requires: python%{python_pkgversion}-pygit2 >= %{min_pygit2_version} Requires: python%{python_pkgversion}-pygments -Requires: python%{python_pkgversion}-fedora Requires: python%{python_pkgversion}-openid Requires: python%{python_pkgversion}-openid-cla Requires: python%{python_pkgversion}-openid-teams +Requires: python%{python_pkgversion}-redis +Requires: python%{python_pkgversion}-sqlalchemy >= 0.8 Requires: python%{python_pkgversion}-straight-plugin Requires: python%{python_pkgversion}-wtforms -Requires: python%{python_pkgversion}-munch -Requires: python%{python_pkgversion}-redis +%endif %if (0%{?fedora} && 0%{?fedora} <= 27) || (0%{?rhel} && 0%{?rhel} <= 7) Requires: mod_wsgi @@ -177,6 +169,9 @@ in the future pull-requests) git repo. %prep %autosetup -p1 +%if ! 0%{?el6} +sed -i -e "/__requires__/d" setup.py +%endif # In case it gets broken in git at least the rpm will be good chmod +x pagure/hooks/files/* @@ -357,6 +352,9 @@ install -p -m 644 pagure-ev/pagure_ev.service \ %changelog +* Sat Jul 28 2018 Igor Gnatenko - 4.0.4-2 +- Generate dependencies automatically + * Tue Jul 24 2018 Neal Gompa - 4.0.4-1 - Rebase to 4.0.4 - Add patch from Mageia to backport fix for pagure-milters