From 4868fe92d65a251fcd650fe533d4261cd9a7273b Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Jul 06 2017 21:48:06 +0000 Subject: Provide python2- subpackages and use the license macro. --- diff --git a/python-fedora.spec b/python-fedora.spec index e9b3816..fc46e3c 100644 --- a/python-fedora.spec +++ b/python-fedora.spec @@ -8,9 +8,15 @@ %endif #%%global prerel c2 +%global desc Python modules that help with building Fedora Services. The client module\ +included here can be used to build programs that communicate with many\ +Fedora Infrastructure Applications such as Bodhi, PackageDB, MirrorManager,\ +and FAS2.\ + + Name: python-fedora Version: 0.9.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python modules for talking to Fedora Infrastructure Services Group: Development/Languages @@ -58,27 +64,37 @@ BuildRequires: python-openid-cla BuildRequires: python-six BuildRequires: python-lockfile -Requires: python-munch -Requires: python-kitchen -Requires: python-requests >= 2.6.0 + +%description +%{desc} + + +%package -n python2-fedora +Summary: %{summary} +Group: Development/Languages + Requires: python-beautifulsoup4 -Requires: python-six +Requires: python-kitchen Requires: python-lockfile +Requires: python-munch Requires: python-openidc-client +Requires: python-requests >= 2.6.0 +Requires: python-six # These are now optional dependencies. Some bodhi methods will not work if # they aren't installed but they aren't needed for most functionality of the # module. #Requires: koji python-iniparse yum -%description -Python modules that help with building Fedora Services. The client module -included here can be used to build programs that communicate with many of -Fedora Infrastructure's Applications such as Bodhi, PackageDB, MirrorManager, -and FAS2. +%{?python_provide:%python_provide python2-fedora} + + +%description -n python2-fedora +%{desc} + %if 0%{?with_python3} %package -n python3-fedora -Summary: Python modules for talking to Fedora Infrastructure Services +Summary: %{summary} Group: Development/Languages BuildRequires: python3-devel @@ -102,11 +118,12 @@ Requires: python3-six Requires: python3-lockfile Requires: python3-openidc-client +%{?python_provide:%python_provide python3-fedora} + + %description -n python3-fedora -Python modules that help with building Fedora Services. The client module -included here can be used to build programs that communicate with many of -Fedora Infrastructure's Applications such as Bodhi, PackageDB, MirrorManager, -and FAS2. +%{desc} + %package -n python3-fedora-flask Summary: Python modules for flask applications authing to Fedora Account System @@ -118,6 +135,9 @@ Requires: python3-openid Requires: python3-openid-teams Requires: python3-openid-cla +%{?python_provide:%python_provide python3-fedora-flask} + + %description -n python3-fedora-flask Python modules that help with building Fedora Services. This package includes an auth provider to let flask applications authenticate against the Fedora @@ -125,18 +145,21 @@ Account System. %endif %if 0%{?rhel} < 7 -%package turbogears +%package -n python2-fedora-turbogears Summary: Python modules for TurboGears applications in Fedora Infrastructure Group: Development/Languages License: LGPLv2+ -Requires: %{name} = %{version}-%{release} +Requires: python2-fedora = %{version}-%{release} Requires: TurboGears Requires: python-sqlalchemy Requires: python-decorator Requires: python-bugzilla Requires: python-feedparser -%description turbogears +%{?python_provide:%python_provide python2-fedora-turbogears} + + +%description -n python2-fedora-turbogears Python modules that help with building Fedora Services. This package includes a JSON based auth provider for authenticating TurboGears1 applications against FAS2 over the network, a csrf protected version of the standard TG1 auth @@ -144,11 +167,11 @@ provider, templates to help build CSRF-protected login forms, and miscellaneous other helper functions for TurboGears applications. %endif -%package turbogears2 +%package -n python2-fedora-turbogears2 Summary: Python modules for TurboGears applications in Fedora Infrastructure Group: Development/Languages License: LGPLv2+ -Requires: %{name} = %{version}-%{release} +Requires: python2-fedora = %{version}-%{release} Requires: TurboGears2 Requires: python-sqlalchemy %if 0%{?fedora} || 0%{?rhel} >= 7 @@ -158,41 +181,50 @@ Requires: python-mako0.4 >= 0.3.6 %endif Requires: python-repoze-who-friendlyform -%description turbogears2 +%{?python_provide:%python_provide python2-fedora-turbogears2} + + +%description -n python2-fedora-turbogears2 Python modules that help with building Fedora Services. This package includes middleware for protecting against CSRF attacks, repoze.who authenticators for logging in to TurboGears2 services based on account information lp build CSRF-protected login forms, and miscellaneous other helper functions for TurboGears2 applications. -%package django +%package -n python2-fedora-django Summary: Python modules for django applications authing to Fedora Account System Group: Development/Languages License: LGPLv2+ -Requires: %{name} = %{version}-%{release} +Requires: python2-fedora = %{version}-%{release} %if 0%{?rhel} == 6 Requires: Django %else Requires: python-django %endif -%description django +%{?python_provide:%python_provide python2-fedora-django} + + +%description -n python2-fedora-django Python modules that help with building Fedora Services. This package includes an auth provider to let django applications authenticate against the Fedora Account System. -%package flask +%package -n python2-fedora-flask Summary: Python modules for flask applications authing to Fedora Account System Group: Development/Languages License: LGPLv2+ -Requires: %{name} = %{version}-%{release} +Requires: python2-fedora = %{version}-%{release} Requires: python-flask Requires: python-flask-wtf Requires: python-openid Requires: python-openid-teams Requires: python-openid-cla -%description flask +%{?python_provide:%python_provide python2-fedora-flask} + + +%description -n python2-fedora-flask Python modules that help with building Fedora Services. This package includes an auth provider to let flask applications authenticate against the Fedora Account System. @@ -265,9 +297,10 @@ rm -rf %{buildroot}%{python2_sitelib}/tests/ %find_lang %{name} -%files -f %{name}.lang +%files -f %{name}.lang -n python2-fedora %defattr(-,root,root,-) -%doc NEWS README.rst COPYING AUTHORS +%license COPYING +%doc NEWS README.rst AUTHORS %if 0%{?rhel} != 6 %doc doc %endif @@ -282,7 +315,8 @@ rm -rf %{buildroot}%{python2_sitelib}/tests/ %if 0%{?with_python3} %files -f %{name}.lang -n python3-fedora %defattr(-,root,root,-) -%doc NEWS README.rst COPYING AUTHORS doc +%license COPYING +%doc NEWS README.rst AUTHORS doc %{python3_sitelib}/fedora/ %{python3_sitelib}/python_fedora*egg-info %exclude %{python3_sitelib}/fedora/tg/ @@ -297,21 +331,25 @@ rm -rf %{buildroot}%{python2_sitelib}/tests/ %endif %if 0%{?rhel} < 7 -%files turbogears +%files -n python2-fedora-turbogears %{python2_sitelib}/fedora/tg/ %endif -%files turbogears2 +%files -n python2-fedora-turbogears2 %{python2_sitelib}/fedora/wsgi/ %{python2_sitelib}/fedora/tg2/ -%files django +%files -n python2-fedora-django %{python2_sitelib}/fedora/django/ -%files flask +%files -n python2-fedora-flask %{python2_sitelib}/flask_fas_openid.py* %changelog +* Thu Jul 06 2017 Randy Barlow - 0.9.0-4 +- Provide python2- subpackages. +- Use the license macro. + * Fri May 05 2017 Patrick Uiterwijk - 0.9.0-3 - Add python-openidc-client dependency