Blob Blame History Raw
%global mod_name	Flask-AutoIndex

Name:		python-flask-autoindex
Version:	0.4.1
Release:	13%{?dist}
Summary:	A mod_autoindex for Flask
Group:		Development/Libraries
License:	BSD
URL:		http://github.com/sublee/flask-autoindex
Source0:	http://pypi.python.org/packages/source/F/%{mod_name}/%{mod_name}-%{version}.tar.gz
BuildArch:	noarch
BuildRequires:	python-devel
BuildRequires:	python-flask
BuildRequires:	python-flask-silk
BuildRequires:	python-setuptools
Requires:	python-flask
Requires:	python-flask-silk

# https://github.com/sublee/flask-autoindex/issues/12
Patch0:		%{name}-tests.patch

%description
Flask-AutoIndex generates an index page for your Flask application
automatically. The result just like mod_autoindex, but the look is
more awesome!

%prep
%setup -q -n %{mod_name}-%{version}
%patch0 -p1

%build
%{__python} setup.py build

%install
%{__python} setup.py install --root $RPM_BUILD_ROOT

%check
# avoid issues due to flaskext added to PYTHONPATH by the time test.py is run
sed -i 's|^\(from \)flaskext\.\(autoindex\)|\1\2|' \
    tests/__init__.py \
    build/lib/flaskext/autoindex/icons.py
PYTHONPATH=$PWD/build/lib/flaskext:$PYTHONPATH python tests/__init__.py

%files
%doc LICENSE PKG-INFO README
%{python_sitelib}/*-nspkg.pth
%{python_sitelib}/*.egg-info/
%{python_sitelib}/flaskext/*.py*
%{python_sitelib}/flaskext/autoindex

%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-13
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.1-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Aug 11 2013 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.4.1-9
- Correct rawhide FTBFS (#992891)

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Sep 19 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 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 <paulo.cesar.pereira.de.andrade@gmail.com> - 0.4.1-5
- Correct incoherent version in changelog
- Add LICENSE file from upstream to source rpm

* Thu Sep 13 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.4.1-4
- Add missing python-setuptools build requires (#839071)

* Fri Aug 17 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.4.1-3
- Correct package for clean mock chroot build

* Sun Aug 5 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.4.1-2
- No need to set CFLAGS for noarch (#839071)
- Add requires of python-flask-silk (#839097)

* Tue Jul 10 2012 pcpa <paulo.cesar.pereira.de.andrade@gmail.com> - 0.4.1-1
- Initial python-flask-autoindex spec.