]> git.pld-linux.org Git - packages/python-django-crispy-forms.git/blob - python-django-crispy-forms.spec
a76ea3be91aed82f5dcd8260fbee1e9d65a63eb4
[packages/python-django-crispy-forms.git] / python-django-crispy-forms.spec
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
11 Summary:        Best way to have Django DRY forms
12 Name:           python-%{pypi_name}
13 Version:        1.6.1
14 Release:        5
15 License:        MIT
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
22 %if %{with python2}
23 BuildRequires:  python-modules
24 BuildRequires:  python-setuptools
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules
28 BuildRequires:  python3-setuptools
29 %endif
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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
37 annoying details.
38
39 %package -n python3-%{pypi_name}
40 Summary:        Best way to have Django DRY forms
41 Group:          Libraries/Python
42
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
47 annoying 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}
62 cd docs
63 %{__make} -j1 html
64 rm -rf _build/html/_sources
65 %endif
66
67 %install
68 rm -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
81 rm -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.051835 seconds and 2 git commands to generate.