%global pypi_name django-auth-ldap %global package_name %(echo "%{pypi_name}" | tr '-' '_' | tr '[:upper:]' '[:lower:]') %{?scl:%global python3_pkgversion %{nil}} %{?scl:%scl_package python-%{pypi_name}} %{!?scl:%global pkg_name %{name}} Name: %{?scl_prefix}python%{python3_pkgversion}-%{pypi_name} Version: 1.7.0 Release: 1%{?dist} Summary: Django LDAP authentication backend Group: Development/Libraries License: MIT URL: https://pypi.io/project/%{pypi_name} Source0: https://pypi.io/packages/source/%(echo "%{pypi_name}" | cut -c 1)/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: %{?scl_prefix_python}python%{python3_pkgversion}-devel BuildRequires: %{?scl_prefix_python}python%{python3_pkgversion}-setuptools %{?scl:BuildRequires: %{scl}-build %{scl}-runtime} Requires: %{?scl_prefix}python%{python3_pkgversion}-django >= 1.11 Requires: %{?scl_prefix}python%{python3_pkgversion}-ldap >= 3.1 %{?scl:Requires: %{scl}-runtime} %description This is a Django authentication backend that authenticates against an LDAP service. Configuration can be as simple as a single distinguished name template, but there are many rich configuration options for working with users, groups, and permissions. %prep %setup -q -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build %{?scl:scl enable %{scl} "} %{__python3} setup.py build %{?scl:"} %install %{?scl:scl enable %{scl} "} %{__python3} \ setup.py \ install \ -O1 \ --skip-build \ --root %{buildroot} \ --install-purelib %{python3_sitelib} %{?scl:"} %files %license LICENSE %doc README.rst %{python3_sitelib}/%{package_name} %{python3_sitelib}/%{package_name}-%{version}-py?.?.egg-info %changelog * Tue Dec 18 2018 Daniel Uvehag - 1.7.0 - Initial package.