python-ldap/python-ldap.spec

83 lines
2.1 KiB
RPMSpec
Raw Normal View History

2007-06-08 12:59:58 +00:00
### Abstract ###
2018-03-21 11:31:23 +00:00
# global prerelease b4
2017-12-11 16:54:09 +00:00
%global openldap_version 2.4.45-4
2021-11-26 15:30:24 +00:00
%global pypi_name python-ldap
2007-06-08 12:59:58 +00:00
Name: python-ldap
2022-07-29 04:10:01 +00:00
Version: 3.4.2
2021-11-26 15:24:56 +00:00
Release: %autorelease
2008-09-03 17:59:54 +00:00
License: Python
Summary: An object-oriented API to access LDAP directory servers
2020-11-13 22:33:35 +00:00
URL: https://python-ldap.org/
2021-11-26 15:30:24 +00:00
Source0: %{pypi_source}
2007-06-08 12:59:58 +00:00
2007-06-08 12:59:58 +00:00
### Build Dependencies ###
2018-07-16 13:38:03 +00:00
BuildRequires: gcc
2017-12-11 16:54:09 +00:00
BuildRequires: openldap-devel >= %{openldap_version}
2007-06-08 12:59:58 +00:00
BuildRequires: openssl-devel
BuildRequires: cyrus-sasl-devel
2017-12-04 14:48:10 +00:00
BuildRequires: python3-devel
BuildRequires: python3-setuptools
# Test dependencies
2017-12-11 16:54:09 +00:00
BuildRequires: openldap-servers >= %{openldap_version}
BuildRequires: openldap-clients >= %{openldap_version}
2017-12-04 14:48:10 +00:00
BuildRequires: python3-pyasn1 >= 0.3.7
BuildRequires: python3-pyasn1-modules >= 0.1.5
2010-10-11 07:35:03 +00:00
%global _description\
python-ldap provides an object-oriented API for working with LDAP within\
Python programs. It allows access to LDAP directory servers by wrapping the\
OpenLDAP 2.x libraries, and contains modules for other LDAP-related tasks\
(including processing LDIF, LDAPURLs, LDAPv3 schema, etc.).
%description %_description
2017-12-04 14:48:10 +00:00
%package -n python3-ldap
Summary: %{summary}
2017-12-11 16:54:09 +00:00
Requires: openldap >= %{openldap_version}
2017-12-04 14:48:10 +00:00
Requires: python3-pyasn1 >= 0.3.7
Requires: python3-pyasn1-modules >= 0.1.5
Requires: python3-setuptools
%{?python_provide:%python_provide python3-ldap}
2018-01-10 11:52:25 +00:00
Obsoletes: python3-pyldap < 3
2017-12-04 14:48:10 +00:00
Provides: python3-pyldap = %{version}-%{release}
Provides: python3-pyldap%{?_isa} = %{version}-%{release}
%description -n python3-ldap %_description
%prep
%autosetup -p1 -n %{name}-%{version}%{?prerelease}
2008-09-03 17:59:54 +00:00
# Fix interpreter
find . -name '*.py' | xargs sed -i '1s|^#!/usr/bin/env python|#!%{__python3}|'
2017-12-04 14:48:10 +00:00
2008-09-03 17:59:54 +00:00
%build
2017-12-04 14:48:10 +00:00
%py3_build
%check
2021-01-21 17:17:59 +00:00
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m unittest discover -v -s Tests -p 't_*'
2017-12-04 14:48:10 +00:00
%install
2017-12-04 14:48:10 +00:00
%py3_install
%files -n python3-ldap
%license LICENCE
%doc CHANGES README TODO Demo
2017-12-04 14:48:10 +00:00
%{python3_sitearch}/_ldap.cpython-*.so
%{python3_sitearch}/ldapurl.py*
%{python3_sitearch}/ldif.py*
%{python3_sitearch}/__pycache__/*
%{python3_sitearch}/slapdtest/
%{python3_sitearch}/ldap/
%{python3_sitearch}/python_ldap-%{version}%{?prerelease}-py%{python3_version}.egg-info/
%changelog
2021-11-26 15:24:56 +00:00
%autochangelog