From cb6140295c235ab4e973279e0ee1cadf0c8aa3ef Mon Sep 17 00:00:00 2001 From: Jan Beran Date: Dec 18 2017 18:14:26 +0000 Subject: New version 1.5.0 Fixes bug https://bugzilla.redhat.com/show_bug.cgi?id=1282084 --- diff --git a/python-flask-admin.spec b/python-flask-admin.spec index 104a273..ba4c3e2 100644 --- a/python-flask-admin.spec +++ b/python-flask-admin.spec @@ -3,15 +3,15 @@ %global sum Simple and extensible admin interface framework for Flask Name: python-%{pkgname} -Version: 1.4.2 -Release: 5%{?dist} +Version: 1.5.0 +Release: 1%{?dist} Summary: %{sum} License: BSD URL: https://github.com/flask-admin/flask-admin/ Source0: https://github.com/flask-admin/flask-admin/archive/v%{version}.tar.gz BuildArch: noarch -BuildRequires: python2-devel python-setuptools python3-devel python3-setuptools +BuildRequires: python2-devel python2-setuptools python3-devel python3-setuptools %global _description\ Flask-Admin is advanced, extensible and simple to use administrative interface\ @@ -31,8 +31,8 @@ and feel.\ %package -n python2-%{pkgname} Summary: %summary -Requires: python-flask -Requires: python-wtforms +Requires: python2-flask +Requires: python2-wtforms %{?python_provide:%python_provide python2-%{pkgname}} %description -n python2-%{pkgname} %_description @@ -43,24 +43,11 @@ Requires: python3-flask Requires: python3-wtforms %{?python_provide:%python_provide python3-%{pkgname}} -%description -n python3-%{pkgname} -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. - - +%description -n python3-%{pkgname} %_description %prep -%setup -q -n %{pkgname}-%{version} +%autosetup -n %{pkgname}-%{version} for f in \ flask_admin/contrib/pymongo/typefmt.py \ flask_admin/tests/mock.py \ @@ -69,38 +56,46 @@ for f in \ echo "#Empty file" > $f done -rm -rf Flask_Admin.egg-info rm -rf examples -rm -rf flask_admin/tests/.coverage -rm -rf flask_admin/tests/test_form.pyc rm flask_admin/translations/README.md + %build %py2_build %py3_build -#Tests passed on my machine but are not included as they require mongod running %install -%{__python2} setup.py install --skip-build --root %{buildroot} -%{__python3} setup.py install --skip-build --root %{buildroot} -(cd %{buildroot} && find . -name 'admin.mo')| %{__grep} -v python3.4 | %{__sed} -e 's|^.||' | %{__sed} -e 's:\(.*/translations/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' >> admin.lang -(cd %{buildroot} && find . -name 'admin.mo') | %{__grep} -v python2.7 | %{__sed} -e 's|^.||' | %{__sed} -e 's:\(.*/translations/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' >> admin3.lang +%py2_install +%py3_install +(cd %{buildroot} && find .%{python2_sitelib} -name 'admin.mo') | %{__sed} -e \ + 's|^.||' | %{__sed} -e \ + 's:\(.*/translations/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \ + >> admin.lang +(cd %{buildroot} && find .%{python3_sitelib} -name 'admin.mo') | %{__sed} -e \ + 's|^.||' | %{__sed} -e \ + 's:\(.*/translations/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:' \ + >> admin3.lang + + +%check +# Tests are not included as they require mongod running + %files -n python2-%{pkgname} -f admin.lang %defattr(644, -, -, 755) %license LICENSE %doc README.rst -%dir %{python_sitelib}/flask_admin -%{python_sitelib}/flask_admin/translations -%{python_sitelib}/flask_admin/static -%{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/ +%dir %{python2_sitelib}/flask_admin +%{python2_sitelib}/flask_admin/translations +%{python2_sitelib}/flask_admin/static +%{python2_sitelib}/flask_admin/*.py* +%{python2_sitelib}/flask_admin/tests/ +%{python2_sitelib}/flask_admin/contrib/ +%{python2_sitelib}/flask_admin/model/ +%{python2_sitelib}/flask_admin/templates/ +%{python2_sitelib}/flask_admin/form/ +%{python2_sitelib}/*.egg-info/ %files -n python3-%{pkgname} -f admin3.lang %defattr(644, -, -, 755) @@ -119,6 +114,10 @@ rm flask_admin/translations/README.md %{python3_sitelib}/*.egg-info/ %changelog +* Mon Dec 18 2017 Jan Beran - 1.5.0-1 +- New version 1.5.0 +- Fix of the single package dependence on both Python 2 and Python 3 + * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1.4.2-5 - Python 2 binary package renamed to python2-flask-admin See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3