From 4e8bf06a0f2089fc60e8e3d8416da1445c9fb1f6 Mon Sep 17 00:00:00 2001 From: Viktor Ashirov Date: Nov 14 2017 09:08:16 +0000 Subject: Issue 49451 - Add environment markers to lib389 dependencies Bug Description: lib389 should be installable both on python2 and python3. Currently it can be installed using python3 only because of the python3-only dependencies. Fix Description: Use PEP-508 environment markers for setup.py and requirements.txt. https://pagure.io/389-ds-base/issue/49451 Reviewed by: wibrown (Thanks!) --- diff --git a/src/lib389/requirements.txt b/src/lib389/requirements.txt index 3309121..9a96216 100644 --- a/src/lib389/requirements.txt +++ b/src/lib389/requirements.txt @@ -1,6 +1,8 @@ pyasn1 pyasn1-modules -pyldap pytest python-dateutil six +enum34;python_version=="2.7" +python-ldap;python_version=="2.7" +pyldap;python_version>="3.4" diff --git a/src/lib389/setup.py b/src/lib389/setup.py index e7ebbf4..0765f62 100644 --- a/src/lib389/setup.py +++ b/src/lib389/setup.py @@ -69,9 +69,11 @@ setup( install_requires=[ 'pyasn1', 'pyasn1-modules', - 'pyldap', 'pytest', 'python-dateutil', 'six', + 'enum34;python_version=="2.7"', + 'python-ldap;python_version=="2.7"', + 'pyldap;python_version>="3.4"', ], )