Hi folks,

I just created a first .egg of python-ldap.
Using a standard Linux distribution, like Gentoo, this can easily be
replayed:

0. Make sure that you have a recent version of openldap, openssl and
cyrus-sasl libraries and headers installed.

1. If not already done so, follow the instructions at
http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install

2. Download and unpack the latest python-ldap tarball (2.3)

3. cd into python-ldap-2.3 and apply the attached (and hopefully
unmangled) patch as follows
patch -p1 <path/to/python-ldap-2.3-setuptools.diff

4. Run
python setup.py bdist_egg

5. If everything went well, you'll have a python-ldap-egg in the newly
created subfolder dist, e.g.
python_ldap-2.3-py2.4-linux-i686.egg

If things don't work or you are too lazy to try these steps, you may
test my precompiled egg at
http://svn.kmrc.de/download/distribution/python_ldap-2.3-py2.4-linux-i686.egg

It is linked against
- openssl 0.9.8e
- cyrus-sasl-2.1.22
- openldap-2.3.35
- glibc-2.5

Any feedback is highly appriciated!

Best regards,
Torsten
-- 
Fon: +49-7071-700240 | Fax: +49-7071-700241 | http://www.tk-webart.de

Ich schreibe dir einen langen Brief, weil ich keine Zeit habe,
einen kurzen zu schreiben.    -- Johann Wolfgang von Goethe --


diff -urN python-ldap-2.3.orig/setup.py python-ldap-2.3/setup.py
--- python-ldap-2.3.orig/setup.py	2006-11-15 18:22:58.000000000 +0100
+++ python-ldap-2.3/setup.py	2007-07-13 14:16:50.422214971 +0200
@@ -6,7 +6,7 @@
 $Id: setup.py,v 1.60 2005/03/01 19:59:42 stroeder Exp $
 """
 
-from distutils.core import setup, Extension
+from setuptools import setup, Extension, find_packages
 from ConfigParser import ConfigParser
 import sys,os,string,time
 
@@ -56,9 +56,14 @@
 	LDAP_CLASS.extra_files[i]=(destdir, origfileslist)
 
 #-- Let distutils do the rest
+name = 'python-ldap'
+packages = None
+if float(sys.version[:3]) < 2.3:
+    packages = find_packages('ldap', 'ldap.schema')
+
 setup(
 	#-- Package description
-	name = 'python-ldap',
+	name = name,
 	version = version,
 	description = 'Various LDAP-related Python modules',
 	author = 'David Leonard, Michael Stroeder, et al.',
@@ -96,7 +101,8 @@
 		),
 	],
 	#-- Python packages (doesn't work with Python prior 2.3)
-#	packages = ['ldap', 'ldap.schema'],
+        packages = packages,
+        include_package_data = True,
 	#-- Python "stand alone" modules 
 	py_modules = [
 		'ldapurl',
@@ -118,5 +124,8 @@
   		'ldap.schema.tokenizer',
 	],
 	package_dir = {'': 'Lib',},
-	data_files = LDAP_CLASS.extra_files
+	data_files = LDAP_CLASS.extra_files,
+        install_requires = ['setuptools'],
+        zip_safe = False,
+        platforms = ['posix']
 )
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to