diff --git a/0002-unbundle-ordereddict.patch b/0002-unbundle-ordereddict.patch index 1793c8e..56575a8 100644 --- a/0002-unbundle-ordereddict.patch +++ b/0002-unbundle-ordereddict.patch @@ -1,8 +1,7 @@ -diff --git a/ldap3/abstract/entry.py b/ldap3/abstract/entry.py -index eed7a42..8ac1454 100644 ---- a/ldap3/abstract/entry.py -+++ b/ldap3/abstract/entry.py -@@ -28,7 +28,7 @@ import json +diff -ru ldap3-2.5.1-orig/ldap3/abstract/entry.py ldap3-2.5.1/ldap3/abstract/entry.py +--- ldap3-2.5.1-orig/ldap3/abstract/entry.py 2018-04-21 02:46:24.000000000 -0400 ++++ ldap3-2.5.1/ldap3/abstract/entry.py 2018-11-12 21:08:04.323279801 -0500 +@@ -28,7 +28,7 @@ try: from collections import OrderedDict except ImportError: @@ -11,38 +10,30 @@ index eed7a42..8ac1454 100644 from os import linesep -diff --git a/setup.py b/setup.py -index 3686ef0..f7dc7f6 100644 ---- a/setup.py -+++ b/setup.py -@@ -22,6 +22,7 @@ - # along with ldap3 in the COPYING and COPYING.LESSER files. +diff -ru ldap3-2.5.1-orig/setup.py ldap3-2.5.1/setup.py +--- ldap3-2.5.1-orig/setup.py 2018-07-21 00:32:31.000000000 -0400 ++++ ldap3-2.5.1/setup.py 2018-11-12 21:03:58.439206727 -0500 +@@ -23,6 +23,7 @@ # If not, see . -+import sys import os - from setuptools import setup ++import sys + import glob + import shutil from json import load -@@ -53,8 +54,13 @@ packages=['ldap3', - 'ldap3.extend.microsoft', - 'ldap3.extend.standard'] +@@ -80,11 +81,13 @@ + -+install_requires=[i.strip() for i in open('requirements.txt').readlines()], + setup_kwargs['cmdclass'] = {'clean': Clean} +- ++install_requires = [i.strip() for i in open('requirements.txt').readlines()] +if sys.version_info < (2, 7): + install_requires.append('ordereddict') -+ - setup_kwargs = {'packages': packages, -- 'package_dir': {'': package_folder}} -+ 'package_dir': {'': package_folder}, -+ 'install_requires': install_requires} - - try: - from Cython.Build import cythonize -@@ -147,7 +153,6 @@ if 'LDAP3_CYTHON_COMPILE' in os.environ and HAS_CYTHON is True: setup(name=package_name, version=version, - install_requires=[i.strip() for i in open('requirements.txt').readlines()], ++ install_requires=install_requires, license=license, author=author, author_email=email, diff --git a/python-ldap3.spec b/python-ldap3.spec index fc177a7..4632511 100644 --- a/python-ldap3.spec +++ b/python-ldap3.spec @@ -1,14 +1,13 @@ -%global modname ldap3 +%global pypi_name ldap3 -Name: python-%{modname} -Version: 2.5 -Release: 3%{?dist} +Name: python-%{pypi_name} +Version: 2.5.1 +Release: 1%{?dist} Summary: Strictly RFC 4511 conforming LDAP V3 pure Python client License: LGPLv2+ URL: https://github.com/cannatag/ldap3 -Source0: %{url}/archive/v%{version}/%{modname}-%{version}.tar.gz - +Source0: %{pypi_source} Patch0002: 0002-unbundle-ordereddict.patch BuildArch: noarch @@ -18,34 +17,35 @@ ldap3 is a strictly RFC 4510 conforming LDAP V3 pure Python client library. %description %{_description} -%package -n python2-%{modname} +%package -n python2-%{pypi_name} Summary: %{summary} -%{?python_provide:%python_provide python2-%{modname}} +%{?python_provide:%python_provide python2-%{pypi_name}} BuildRequires: python2-devel BuildRequires: python2-setuptools Requires: python2-pyasn1 Requires: python2-backports-ssl_match_hostname -%description -n python2-%{modname} %{_description} +%description -n python2-%{pypi_name} %{_description} Python 2 version. -%package -n python3-%{modname} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{summary} -%{?python_provide:%python_provide python3-%{modname}} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -Requires: python3-pyasn1 +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +Requires: python%{python3_pkgversion}-pyasn1 Requires: python2-backports-ssl_match_hostname -%description -n python3-%{modname} %{_description} +%description -n python%{python3_pkgversion}-%{pypi_name} %{_description} Python 3 version. %prep -%autosetup -n %{modname}-%{version} -p1 +%autosetup -n %{pypi_name}-%{version} -p1 + # remove bundled ordereddict -rm -vf %{modname}/utils/ordDict.py +rm -vf %{pypi_name}/utils/ordDict.py %build %py2_build @@ -55,19 +55,23 @@ rm -vf %{modname}/utils/ordDict.py %py2_install %py3_install -%files -n python2-%{modname} +%files -n python2-%{pypi_name} %license COPYING.LESSER.txt %doc README.rst -%{python2_sitelib}/%{modname}-*.egg-info/ -%{python2_sitelib}/%{modname}/ +%{python2_sitelib}/%{pypi_name}-*.egg-info/ +%{python2_sitelib}/%{pypi_name}/ -%files -n python3-%{modname} +%files -n python%{python3_pkgversion}-%{pypi_name} %license COPYING.LESSER.txt %doc README.rst -%{python3_sitelib}/%{modname}-*.egg-info/ -%{python3_sitelib}/%{modname}/ +%{python3_sitelib}/%{pypi_name}-*.egg-info/ +%{python3_sitelib}/%{pypi_name}/ %changelog +* Mon Nov 12 2018 Avram Lubkin - 2.5.1-1 +- Update to 2.5.1 +- Build Python 3 packages for EPEL + * Sat Jul 14 2018 Fedora Release Engineering - 2.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 7cbc1e7..39eca82 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ldap3-2.5.tar.gz) = 300c7243283f574e3db7a2f486d377a983963b847a2b20a2a0dbfd1b3b124418922eddb448364174dba692897146e0ce52e1343e2103074d25b0ffa2633b99b8 +SHA512 (ldap3-2.5.1.tar.gz) = 8cf3e656f3b58ead391f45c44ec2175ecb7abf29047e4eb03d9f95983cb01900159a4e27bef596df5ffdf7fdf3827615663872c35bd57dede8c9b789aad191e7