]> git.pld-linux.org Git - packages/python-django-crispy-forms.git/blame - python-django-crispy-forms.spec
up to 1.6.1
[packages/python-django-crispy-forms.git] / python-django-crispy-forms.spec
CommitLineData
86d9fcbf
ER
1#
2# Conditional build:
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
7
8%define module crispy_forms
9%define egg_name django_crispy_forms
10%define pypi_name django-crispy-forms
11Summary: Best way to have Django DRY forms
12Name: python-%{pypi_name}
7fa03368
ER
13Version: 1.6.1
14Release: 1
86d9fcbf
ER
15License: MIT
16Group: Libraries/Python
17Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
7fa03368 18# Source0-md5: 84f6ceb0ecfac6ad049ec4cf35b24ee9
86d9fcbf
ER
19URL: https://django-crispy-forms.readthedocs.io/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-modules
24BuildRequires: python-setuptools
25%endif
26%if %{with python3}
27BuildRequires: python3-modules
28BuildRequires: python3-setuptools
29%endif
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34django-crispy-forms is a Django application that lets you easily
35build, customize and reuse forms using your favorite CSS framework,
36without writing template code and without having to take care of
37annoying details.
38
39%package -n python3-%{pypi_name}
40Summary: Best way to have Django DRY forms
41Group: Libraries/Python
42
43%description -n python3-%{pypi_name}
44django-crispy-forms is a Django application that lets you easily
45build, customize and reuse forms using your favorite CSS framework,
46without writing template code and without having to take care of
47annoying details.
48
49%prep
50%setup -q -n %{pypi_name}-%{version}
51
52%build
53%if %{with python2}
54%py_build %{?with_tests:test}
55%endif
56
57%if %{with python3}
58%py3_build %{?with_tests:test}
59%endif
60
61%if %{with doc}
62cd docs
63%{__make} -j1 html
64rm -rf _build/html/_sources
65%endif
66
67%install
68rm -rf $RPM_BUILD_ROOT
69%if %{with python2}
70%py_install
71%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
72%py_postclean
73%endif
74
75%if %{with python3}
76%py3_install
77%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/tests
78%endif
79
80%clean
81rm -rf $RPM_BUILD_ROOT
82
83%if %{with python2}
84%files
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
89%endif
90
91%if %{with python3}
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
97%endif
This page took 0.148735 seconds and 4 git commands to generate.