3 %bcond_with doc # don't build doc
4 %bcond_with tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_with python3 # CPython 3.x module
8 %define module django_auth_ldap
9 %define egg_name django_auth_ldap
10 %define pypi_name django-auth-ldap
11 Summary: Django LDAP authentication backend
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: 88db539ca8492c91a8adaca68d70129b
19 URL: http://bitbucket.org/psagers/django-auth-ldap/
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.714
23 BuildRequires: python-modules
24 BuildRequires: python-setuptools
25 BuildRequires: sphinx-pdg
28 BuildRequires: python-mockldap >= 0.2.7
29 BuildRequires: python-setuptools >= 0.6c11
32 BuildRequires: python3-modules
33 BuildRequires: python3-setuptools
35 BuildRequires: python3-mockldap >= 0.2.7
36 BuildRequires: python3-setuptools >= 0.6c11
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 This is a Django authentication backend that authenticates against an
46 %package -n python3-%{pypi_name}
47 Summary: Django LDAP authentication backend
48 Group: Libraries/Python
50 %description -n python3-%{pypi_name}
51 This is a Django authentication backend that authenticates against an
55 %setup -q -n %{pypi_name}-%{version}
57 %{__rm} -r %{egg_name}.egg-info
61 %py_build %{?with_tests:test}
65 %py3_build %{?with_tests:test}
69 sphinx-build-2 docs/source html
70 %{__rm} -r html/.{doctrees,buildinfo}
74 rm -rf $RPM_BUILD_ROOT
85 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
90 %{py_sitescriptdir}/%{module}
91 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
95 %files -n python3-%{pypi_name}
96 %defattr(644,root,root,755)
97 %{py3_sitescriptdir}/%{module}
98 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info