%global srcname Flask-Admin
Name: python-flask-admin
Version: 1.0.7
Release: 1%{?dist}
Summary: Simple and extensible admin interface framework for Flask
License: BSD
URL: http://flask-admin.readthedocs.org
Source0: https://pypi.python.org/packages/source/F/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python-setuptools
Requires: python-flask
Requires: python-flask-wtf
Requires: python-flask-sqlalchemy
Requires: python-flask-mongoengine
Requires: python-peewee
Requires: python-wtf-peewee
%description
Flask-Admin is advanced, extensible and simple to use administrative interface
building extension for Flask framework.
It comes with batteries included: model scaffolding for SQLAlchemy,
MongoEngine, MongoDB and Peewee ORMs, simple file management interface
and a lot of usage samples.
You're not limited by the default functionality - instead of providing simple
scaffolding for the ORM models, Flask-Admin provides tools that can be used to
construct administrative interfaces of any complexity, using a consistent look
and feel.
%prep
%setup -q -n %{srcname}-%{version}
for f in \
flask_admin/contrib/pymongo/typefmt.py \
flask_admin/tests/mock.py \
flask_admin/static/select2/VERSION-IS-3.2 \
; do
echo "#Empty file" > $f
done
rm -rf Flask_Admin.egg-info
find . -depth -name '__pycache__' -exec rm -rf '{}' \;
%build
%{__python} setup.py build
#Tests passed on my machine but are not included as they require mongod running
%install
%{__python} setup.py install --skip-build --root %{buildroot}
(cd %{buildroot} && find . -name 'admin.mo') | %{__sed} -e 's|^.||' | %{__sed} -e 's:\(.*/translations/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' >> admin.lang
%files -f admin.lang
%doc LICENSE README.rst
%dir %{python_sitelib}/flask_admin
%dir %{python_sitelib}/flask_admin/translations
%{python_sitelib}/flask_admin/translations/*.py*
%{python_sitelib}/flask_admin/translations/*/LC_MESSAGES/*.po
%dir %{python_sitelib}/flask_admin/static
%dir %{python_sitelib}/flask_admin/static/select2
%attr(0644, -, -) %{python_sitelib}/flask_admin/static/select2/*
%{python_sitelib}/flask_admin/static/bootstrap/
%{python_sitelib}/flask_admin/static/admin/
%{python_sitelib}/flask_admin/static/datetimepicker/
%{python_sitelib}/flask_admin/static/vendor/
%{python_sitelib}/flask_admin/*.py*
%{python_sitelib}/flask_admin/tests/
%{python_sitelib}/flask_admin/contrib/
%{python_sitelib}/flask_admin/model/
%{python_sitelib}/flask_admin/templates/
%{python_sitelib}/flask_admin/form/
%{python_sitelib}/*.egg-info/
%changelog
* Wed Jan 08 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.0.7-1
- Updated to 1.0.7
* Tue Aug 13 2013 Matej Stuchlik <mstuchli@redhat.com> - 1.0.6-1
- Updated to 1.0.6
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed May 08 2013 Matej Stuchlik <mstuchli@redhat.com> - 1.0.5-3
- Requires fixes
* Wed Apr 24 2013 Matej Stuchlik <mstuchli@redhat.com> - 1.0.5-2
- Review fixes
* Tue Mar 19 2013 mstuchli <mstuchli@redhat.com> - 1.0.5-1
- Initial spec