%global mod_name Flask-AutoIndex Name: python-flask-autoindex Version: 0.6 Release: 3%{?dist} Summary: A mod_autoindex for Flask Group: Development/Libraries License: BSD URL: http://github.com/sublee/flask-autoindex Source0: https://files.pythonhosted.org/packages/source/F/%{mod_name}/%{mod_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-flask BuildRequires: python2-flask-silk BuildRequires: python2-future BuildRequires: python2-setuptools BuildRequires: python3-devel BuildRequires: python3-flask BuildRequires: python3-flask-silk BuildRequires: python3-flask-sphinx-themes BuildRequires: python3-future BuildRequires: python3-setuptools BuildRequires: python3-sphinx %global _description\ Flask-AutoIndex generates an index page for your Flask application\ automatically. The result is just like mod_autoindex, but the look is\ more awesome! %description %_description %package -n python2-flask-autoindex Summary: %summary Requires: python2-flask Requires: python2-flask-silk %{?python_provide:%python_provide python2-flask-autoindex} %description -n python2-flask-autoindex %_description %package -n python3-flask-autoindex Summary: %summary Requires: python3-flask Requires: python3-flask-silk %{?python_provide:%python_provide python3-flask-autoindex} %description -n python3-flask-autoindex %_description %package docs Summary: Documentation for %{name} %description docs HTML documentation for %{name}. %prep %setup -q -c # Fix Silk import sed -i 's/from flask.ext.silk/from flask_silk/' %{mod_name}-%{version}/flask_autoindex/__init__.py # Fix version number in the documentation sed -i 's/0\.2\.0/%{version}/' %{mod_name}-%{version}/docs/conf.py # Fix package name in the tests sed -i 's/flask\.ext\./flask_/' %{mod_name}-%{version}/tests/__init__.py # Prepare to build for both python2 and python3 cp -a %{mod_name}-%{version} python3 mv %{mod_name}-%{version} python2 %build pushd python2 %py2_build popd pushd python3 %py3_build # Build the documentation sphinx-build-%{python3_version} docs html popd %install pushd python3 %py3_install mv %{buildroot}%{_bindir}/fai %{buildroot}%{_bindir}/python3-fai popd pushd python2 %py2_install popd %check pushd python2 PYTHONPATH=$PWD/build/lib python2 tests/__init__.py popd pushd python3 PYTHONPATH=$PWD/build/lib python3 tests/__init__.py popd %files -n python2-flask-autoindex %doc python2/README %license python2/LICENSE %{_bindir}/fai %{python2_sitelib}/flask_autoindex/ %{python2_sitelib}/*.egg-info/ %files -n python3-flask-autoindex %doc python3/README %license python3/LICENSE %{_bindir}/python3-fai %{python3_sitelib}/flask_autoindex/ %{python3_sitelib}/*.egg-info/ %files docs %doc python3/html/* %changelog * Sat Jul 14 2018 Fedora Release Engineering - 0.6-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 0.6-2 - Rebuilt for Python 3.7 * Sat Jun 2 2018 Jerry James - 0.6-1 - Update to latest upstream release - Use license macro - Build for both python 2 and python 3 - Build documentation * Fri Feb 09 2018 Fedora Release Engineering - 0.4.1-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.4.1-16 - Python 2 binary package renamed to python2-flask-autoindex See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Jul 27 2017 Fedora Release Engineering - 0.4.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.4.1-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Tue Jul 19 2016 Fedora Release Engineering - 0.4.1-13 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.4.1-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 0.4.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.4.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 11 2013 2012 pcpa - 0.4.1-9 - Correct rawhide FTBFS (#992891) * Sun Aug 04 2013 Fedora Release Engineering - 0.4.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 0.4.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Wed Sep 19 2012 pcpa - 0.4.1-6 - Update to match upstream new tarball but with same version The new tarball was done to address issues in the review process - Add %%check section to use new test files in upstream tarball - Remove LICENSE Source1 as it is now in upstream tarball * Tue Sep 18 2012 pcpa - 0.4.1-5 - Correct incoherent version in changelog - Add LICENSE file from upstream to source rpm * Thu Sep 13 2012 pcpa - 0.4.1-4 - Add missing python-setuptools build requires (#839071) * Fri Aug 17 2012 pcpa - 0.4.1-3 - Correct package for clean mock chroot build * Sun Aug 5 2012 pcpa - 0.4.1-2 - No need to set CFLAGS for noarch (#839071) - Add requires of python-flask-silk (#839097) * Tue Jul 10 2012 pcpa - 0.4.1-1 - Initial python-flask-autoindex spec.