]> git.pld-linux.org Git - SPECS.git/blob - python-django-contact-form.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-django-contact-form.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  django-contact-form
8 Summary:        An extensible contact-form application for Django
9 Name:           python-django-contact-form
10 Version:        1.1
11 Release:        1
12 License:        BSD
13 Group:          Development/Languages
14 Source0:        https://pypi.python.org/packages/source/d/%{module}/%{module}-%{version}.tar.gz
15 # Source0-md5:  cd015803837f8fd1baa45dc7d21d7fce
16 URL:            http://bitbucket.org/ubernostrum/django-contact-form/
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.714
19 %if %{with python2}
20 BuildRequires:  python-modules
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules
25 BuildRequires:  python3-setuptools
26 %endif
27 Requires:       python-django
28 Requires:       python-modules
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 An extensible contact-form application for Django
34
35 %package -n python3-%{module}
36 Summary:        An extensible contact-form application for Django
37 Requires:       python3-django
38
39 %description -n python3-%{module}
40 An extensible contact-form application for Django
41
42 %prep
43 %setup -q -n %{module}-%{version}
44
45 %build
46 %if %{with python2}
47 %py_build %{?with_tests:test}
48 %endif
49
50 %if %{with python3}
51 %py3_build %{?with_tests:test}
52 %endif
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56 %if %{with python2}
57 %py_install
58 %py_postclean
59 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/contact_form/tests
60 %endif
61
62 %if %{with python3}
63 %py3_install
64 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/contact_form/tests
65 %endif
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 rm -rf $RPM_BUILD_ROOT
71 %files
72 %defattr(644,root,root,755)
73 %doc LICENSE README.rst docs/
74 %{py_sitescriptdir}/contact_form
75 %{py_sitescriptdir}/django_contact_form-%{version}-py*.egg-info
76
77 %files -n python3-%{module}
78 %defattr(644,root,root,755)
79 %doc LICENSE README.rst docs/
80 %{py3_sitescriptdir}/contact_form
81 %{py3_sitescriptdir}/django_contact_form-%{version}-py*.egg-info
This page took 0.593495 seconds and 3 git commands to generate.