388cd90
%{!?__python2:%global __python2 %{__python}}
388cd90
%{!?python2_sitelib:   %global python2_sitelib  %{python_sitelib}}
388cd90
%{!?python2_sitearch:  %global python2_sitearch %{python_sitearch}}
388cd90
%{!?python2_version:   %global python2_version  %{python_version}}
388cd90
92e1224
%global pypi_name django-appconf
92e1224
388cd90
%if 0%{?fedora} > 12
388cd90
%global with_python3 1
388cd90
%else
388cd90
%global with_python3 0
388cd90
%endif
388cd90
92e1224
Name:           python-%{pypi_name}
388cd90
Version:        1.0.1
3bcec28
Release:        5%{?dist}
92e1224
Summary:        A helper class for handling configuration defaults of packaged apps gracefully
92e1224
92e1224
License:        BSD
388cd90
URL:            http://pypi.python.org/pypi/django-appconf/
92e1224
Source0:        http://pypi.python.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
92e1224
BuildArch:      noarch
388cd90
92e1224
BuildRequires:  python2-devel
92e1224
BuildRequires:  python-sphinx
388cd90
BuildRequires:  python-setuptools
92e1224
388cd90
BuildRequires:  python-django-discover-runner
388cd90
BuildRequires:  python-flake8
388cd90
BuildRequires:  python-coverage
388cd90
BuildRequires:  python-django
92e1224
dd09b2e
Requires:       python-django
dd09b2e
92e1224
%description
92e1224
A helper class for handling configuration
92e1224
defaults of packaged Django
92e1224
apps gracefully.
92e1224
388cd90
%if 0%{?with_python3}
388cd90
%package -n python3-%{pypi_name}
388cd90
Summary:        A helper class for handling configuration defaults of packaged apps gracefully
388cd90
388cd90
BuildRequires:  python3-devel
388cd90
BuildRequires:  python-sphinx
388cd90
BuildRequires:  python3-setuptools
388cd90
dd09b2e
Requires:   python3-django
388cd90
388cd90
%description -n python3-%{pypi_name}
388cd90
A helper class for handling configuration
388cd90
defaults of packaged Django
388cd90
apps gracefully.
388cd90
388cd90
%endif
92e1224
92e1224
%prep
388cd90
%setup -qc
388cd90
mv %{pypi_name}-%{version} python2
388cd90
388cd90
pushd python2
388cd90
388cd90
# copy license etc to top level dir
388cd90
cp -a README.rst ..
388cd90
cp -a LICENSE ..
92e1224
388cd90
# generate html docs
92e1224
sphinx-build docs html
92e1224
# remove the sphinx-build leftovers
92e1224
rm -rf html/.{doctrees,buildinfo}
92e1224
388cd90
# move html up to get picked up for docs
388cd90
mv html ..
388cd90
388cd90
popd
388cd90
388cd90
%if 0%{?with_python3}
388cd90
cp -a python2 python3
388cd90
%endif
92e1224
92e1224
%build
388cd90
pushd python2
388cd90
%{__python2} setup.py build
388cd90
popd
388cd90
388cd90
%if 0%{?with_python3}
388cd90
pushd python3
388cd90
%{__python3} setup.py build
388cd90
popd
388cd90
%endif
92e1224
92e1224
92e1224
%install
388cd90
pushd python2
388cd90
%{__python2} setup.py install --skip-build --root %{buildroot}
388cd90
popd
388cd90
388cd90
%if 0%{?with_python3}
388cd90
pushd python3
388cd90
%{__python3} setup.py install --skip-build --root %{buildroot}
388cd90
popd
388cd90
%endif
92e1224
b4c4a45
# checks fail in mock
388cd90
%check
388cd90
pushd python2
388cd90
%{__python} setup.py test
388cd90
export PYTHONPATH=.:$PYTHONPATH
388cd90
export DJANGO_SETTINGS_MODULE=tests.test_settings
388cd90
coverage run %{_bindir}/django-admin test -v2 test
388cd90
popd
92e1224
92e1224
%files
388cd90
%doc html README.rst
388cd90
%license LICENSE
388cd90
%{python2_sitelib}/appconf
388cd90
%{python2_sitelib}/django_appconf-%{version}-py%{python2_version}.egg-info
388cd90
388cd90
%if 0%{?with_python3}
388cd90
%files -n python3-%{pypi_name}
388cd90
%doc html README.rst
388cd90
%license LICENSE
388cd90
%{python3_sitelib}/appconf
388cd90
%{python3_sitelib}/django_appconf-%{version}-py%{python3_version}.egg-info
388cd90
%endif
92e1224
92e1224
%changelog
3bcec28
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-5
3bcec28
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
3bcec28
1e7d96a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
1e7d96a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
1e7d96a
9869e54
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
9869e54
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
9869e54
dd09b2e
* Thu Aug 27 2015 Matthias Runge <mrunge@redhat.com> - 1.0.1-2
388cd90
- update to 1.0.1
388cd90
- python3 subpackage
dd09b2e
- fix requirements py/py3
388cd90
415c3ef
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-4
415c3ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
415c3ef
d248bde
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-3
d248bde
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d248bde
3ea8cf9
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
3ea8cf9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
3ea8cf9
9ef2fc6
* Wed Mar 06 2013 Matthias Runge <mrunge@redhat.com> - 0.6-1
9ef2fc6
- update to appconf-0.6
9ef2fc6
e91e1da
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
e91e1da
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e91e1da
bfc31c3
* Wed Sep 26 2012 Matthias Runge <mrunge@redhat.com> - 0.5-2
bfc31c3
- also add requirement: Django/python-django
bfc31c3
92e1224
* Tue Sep 11 2012 Matthias Runge <mrunge@redhat.com> - 0.5-1
92e1224
- Initial package.