]> git.pld-linux.org Git - SPECS.git/blob - python-django-auth-ldap.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / python-django-auth-ldap.spec
1 #
2 # Conditional build:
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
7
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}
13 Version:        1.2.8
14 Release:        2
15 License:        BSD
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
22 %if %{with python2}
23 BuildRequires:  python-modules
24 BuildRequires:  python-setuptools
25 BuildRequires:  sphinx-pdg
26 %endif
27 %if %{with tests}
28 BuildRequires:  python-mockldap >= 0.2.7
29 BuildRequires:  python-setuptools >= 0.6c11
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-mockldap >= 0.2.7
36 BuildRequires:  python3-setuptools >= 0.6c11
37 %endif
38 %endif
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 This is a Django authentication backend that authenticates against an
44 LDAP service.
45
46 %package -n python3-%{pypi_name}
47 Summary:        Django LDAP authentication backend
48 Group:          Libraries/Python
49
50 %description -n python3-%{pypi_name}
51 This is a Django authentication backend that authenticates against an
52 LDAP service.
53
54 %prep
55 %setup -q -n %{pypi_name}-%{version}
56
57 %{__rm} -r %{egg_name}.egg-info
58
59 %build
60 %if %{with python2}
61 %py_build %{?with_tests:test}
62 %endif
63
64 %if %{with python3}
65 %py3_build %{?with_tests:test}
66 %endif
67
68 %if %{with doc}
69 sphinx-build-2 docs/source html
70 %{__rm} -r html/.{doctrees,buildinfo}
71 %endif
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 %if %{with python2}
76 %py_install
77 %py_postclean
78 %endif
79
80 %if %{with python3}
81 %py3_install
82 %endif
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %files
89 %defattr(644,root,root,755)
90 %{py_sitescriptdir}/%{module}
91 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
92 %endif
93
94 %if %{with python3}
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
99 %endif
This page took 0.059989 seconds and 3 git commands to generate.