3 %bcond_with doc # don't build doc
4 %bcond_with tests # do not perform "make test" (needs django settings to test)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module crispy_forms
9 %define egg_name django_crispy_forms
10 %define pypi_name django-crispy-forms
11 Summary: Best way to have Django DRY forms
12 Name: python-%{pypi_name}
16 Group: Libraries/Python
17 Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
18 # Source0-md5: 84f6ceb0ecfac6ad049ec4cf35b24ee9
19 URL: https://django-crispy-forms.readthedocs.io/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-modules
24 BuildRequires: python-setuptools
27 BuildRequires: python3-modules
28 BuildRequires: python3-setuptools
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 django-crispy-forms is a Django application that lets you easily
35 build, customize and reuse forms using your favorite CSS framework,
36 without writing template code and without having to take care of
39 %package -n python3-%{pypi_name}
40 Summary: Best way to have Django DRY forms
41 Group: Libraries/Python
43 %description -n python3-%{pypi_name}
44 django-crispy-forms is a Django application that lets you easily
45 build, customize and reuse forms using your favorite CSS framework,
46 without writing template code and without having to take care of
50 %setup -q -n %{pypi_name}-%{version}
54 %py_build %{?with_tests:test}
58 %py3_build %{?with_tests:test}
64 rm -rf _build/html/_sources
68 rm -rf $RPM_BUILD_ROOT
71 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
77 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/tests
81 rm -rf $RPM_BUILD_ROOT
85 %defattr(644,root,root,755)
86 %doc README.rst LICENSE.txt
87 %{py_sitescriptdir}/%{module}
88 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
92 %files -n python3-%{pypi_name}
93 %defattr(644,root,root,755)
94 %doc README.rst LICENSE.txt
95 %{py3_sitescriptdir}/%{module}
96 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info