On Saturday, July 14, 2007 at 16:47 Michael Ströder wrote: >> Using a standard Linux distribution, like Gentoo, > Hmm, all modifications to setup.py should work on Windows either.
Do you mean _native_ Win32 or rather Cygwin? Is there native OpenLDAP support for Win32? >> 1. If not already done so, follow the instructions at >> http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install > Is it a MUST? For the .egg, yes, since only setuptools provide the necessary bdist_egg command. >> -from distutils.core import setup, Extension >> +from setuptools import setup, Extension, find_packages > Hmm, this replaces distutils completely. Isn't there any pattern for a > fall-back to distutils if setuptools is not available? Oh, something like: setuptools = False try: from setuptools import setup, Extension, find_packages setuptools = True except: from distutils.core import setup, Extension and later on: packages = None if setuptools and float(sys.version[:3]) < 2.3: packages = find_packages('ldap', 'ldap.schema') >> +if float(sys.version[:3]) < 2.3: >> + packages = find_packages('ldap', 'ldap.schema') >> [..] >> #-- Python packages (doesn't work with Python prior 2.3) >> -# packages = ['ldap', 'ldap.schema'], >> + packages = packages, > And how to build that with Python 2.2 and earlier? Oh, the comment: #-- Python packages (doesn't work with Python prior 2.3) is not mine. Thus, I set packages to None above the if-statement (which should actually be the same as leaving the packages variable out completely, which was the case in the original setup.py). >> + platforms = ['posix'] > Shouldn't that be derived from sys.platform during build? > Or at least to be defined in setup.cfg. That's what it's for. Sorry, I didn't know that - this was my first platform-specific egg, so I thought it's to be set there (I found this one in another setup.py). > For now I consider your patch to solve the .egg thingy for you. I won't > patch the general setup.py in standard source distribution. I might add > your version of setup.py as setup_egg.py under Build/ in the source > distribution. Hmm, perhaps we could come to a more general solution cooperatively. PyPI is quickly becoming for Python what CPAN is for Perl, so I don't think that an important package like Python-LDAP should stand back there. On monday I'll try to create a setup.py that still works with distutils and Python 2.2. But due to my lack of experience in Windows programming I'd highly appreciate, if you (or someone else with the necessary experience) could test the whole thing on the Win32 platform... Do we have a deal? ;o) Greetings Torsten -- Fon: +49-7071-700240 | Fax: +49-7071-700241 | http://www.tk-webart.de Never make anything simple and efficient when a way can be found to make it complex and wonderful. - Murphy's Law No. 13 - ------------------------------------------------------------------------- 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