Skip to content

Drop distutils workaround and simplify setup.py #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 8 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@
"""

import sys,os

has_setuptools = False
try:
from setuptools import setup, Extension
has_setuptools = True
except ImportError:
from distutils.core import setup, Extension
from setuptools import setup, Extension

if sys.version_info[0] == 2 and sys.version_info[1] < 7:
raise RuntimeError('This software requires Python 2.7 or 3.x.')
Expand Down Expand Up @@ -66,24 +60,6 @@ class OpenLDAP2:
#-- Let distutils/setuptools do the rest
name = 'python-ldap'

# Python 2.3.6+ and setuptools are needed to build eggs, so
# let's handle setuptools' additional keyword arguments to
# setup() in a fashion that doesn't break compatibility to
# distutils. This still allows 'normal' builds where either
# Python > 2.3.5 or setuptools (or both ;o) are not available.
kwargs = {}
if has_setuptools:
kwargs = {
'include_package_data': True,
'install_requires': [
'setuptools',
'pyasn1 >= 0.3.7',
'pyasn1_modules >= 0.1.5',
],
'zip_safe': False,
'python_requires': '>=2.7,!=3.0.*,!=3.1.*,!=3.2.*',
}

setup(
#-- Package description
name = name,
Expand Down Expand Up @@ -186,6 +162,12 @@ class OpenLDAP2:
],
package_dir = {'': 'Lib',},
data_files = LDAP_CLASS.extra_files,
include_package_data=True,
install_requires=[
'pyasn1 >= 0.3.7',
'pyasn1_modules >= 0.1.5',
],
zip_safe=False,
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*',
test_suite = 'Tests',
**kwargs
)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy