kakwa / ldapcherry

Web UI for managing users and groups in multiple directory services.
MIT License
225 stars 70 forks source link

python 2.7 install error #14

Closed cyberb closed 5 years ago

cyberb commented 5 years ago

Getting these errors installing under python 2.7

File "/drone/src/github.com/syncloud/users/build/users/python/lib/python2.7/site-packages/CherryPy-18.0.1-py2.7.egg/cherrypy/lib/httputil.py", line 214
    ) from val_err
         ^
SyntaxError: invalid syntax
error: The 'tempora>=1.8' distribution was not found and is required by portend

Is this python 3 only project?

thrix commented 5 years ago

yeah, I see the same thing. @kakwa ?

...

let me try python 3....

thrix commented 5 years ago

yeah, does nto work also :/

kakwa commented 5 years ago

The issue is that python-ldap is Python 2 only as far as I know, So the project is stuck with python2. It is becoming an issue now since cherrypy (the web framework I'm using) is now python 3 only.

According to other tickets, it seems that python-ldap also has changed its API slightly, so there might be other issues.

A rewrite of the LDAP and AD backends using a python 3 compatible ldap library (such as python-ldap3) will probably be required. But it's not something that can be done overnight.

In the mean time, installing an older version of cherrypy might do the trick (the latest version supporting python 2 is v17.4.1 according to their change log: https://github.com/cherrypy/cherrypy/blob/master/CHANGES.rst)

kakwa commented 5 years ago

My bad, it seems that python-ldap added support, for Python 3 about a year ago. When I first wrote this UI, it was Python 2 only, so this project was Python 2 only. It might actually be easier than I though to fix the issue at play here.

However, I want to retain compatibility with older versions, basically, my policy is to remain compatible with the current Debian Stable and the Current RHEL/CentOS release, this will require some testing on my part.

cyberb commented 5 years ago

Is there any workaround or a branch with non backward compatible fix? I really like your project and would like to add it to https://github.com/syncloud/platform as a user management app. We are using self contained snap format so dependencies are not a problem for us.

kakwa commented 5 years ago

I've added compatibility with python 3 and python-ldap 3.X.X with ldapcherry 1.0.0.

It maintains backward compatibility with older versions.

This should solve the present issue.