[python-ldap] Issues installing py-ldap2

McCann, Brian bmccann at andmore.com
Fri Nov 11 18:25:02 CET 2011

I was just in the process of replying.  I discovered the root of the problem.

The machine that builds the ports is FreeBSD 6.2-RELEASE.  The machines the packages are getting installed on are 6.3-RELEASE-p7.  Easy install is looking for an egg named "python_ldap-2.4.3-py2.7-freebsd-6.2-RELEASE-P7.i386.egg" and failing, because the egg is really named "python_ldap-2.4.3-py2.7-freebsd-6.2-RELEASE-i386.egg".  It's then going and doing a fresh download/install.  Because the setup.cfg is "stock" with the wrong directories when using FreeBSD, it's barfing.

Thanks for your help...off to work out a fix.

-----Original Message-----
From: Christopher Dukes [mailto:chris.dukes.aix at gmail.com] 
Sent: Friday, November 11, 2011 12:19 PM
To: McCann, Brian
Cc: python-ldap at python.org
Subject: RE: [python-ldap] Issues installing py-ldap2

On Fri, 2011-11-11 at 11:46 -0500, McCann, Brian wrote:
> The command I ran was "pkg_add py27-ldap2-2.4.3.tbz".  I ran it again with more verbose output...here's what it does.

First and foremost... as you are running FreeBSD 6, no one actually
cares.  It's older than Legacy.  Sorry.

Second, none of your problems are actually with python-ldap.  They are
purely problems with your understanding of FreeBSD package management.

'pkg_add tarball' does not chase dependencies.  'pkg_add -r tarball'
chases dependencies and sometimes gets them right.  'portmaster' and
'portupgrade' can chase dependencies correctly... but there is pain.
> extract: execute '/usr/bin/env PYTHONPATH=/usr/local/lib/python2.7/site-packages  /usr/local/bin/easy_install-2.7 -q -N -S /usr/local/lib/python2.7/site-packages  -d /usr/local/lib/python2.7/site-packages  -s /usr/local/bin  python-ldap==2.4.3'
> ---End---
That's coming from USE_PYDISTUTILS=easy_install and ports/Mk/bsd.python.mk putting an @exec and @unexec in the +COMMENTS in the tarball.
As for why they do that... Take it to a FreeBSD mailing list.

If you want to do things right... either stick with the compiled ports that the FreeBSD community makes available, or use 'portmaster' or 'portupgrade' to manage your packages on your build server and use http or NFS or rsync to distribute built packages to your clients.

Between the presence of FreeBSD 6 and your use of 'pkg_add tarball' I suspect that you have version control hell on your non-build server systems.

> After that execute line is where the previous paste comes in...so you could say easy_install is the program "causing" the error.
> I'm installing this package from a local file, not a remote repo or anything.  I SCP'd the file from the machine I built the package on to the target machine.
> Something else that confuses me is why is easy_install even trying to compile anything at all.  Based on the files the package extracted, it doesn't have any C code, nor can I even locate these "Modules/errors.h" etc files after I run pkg_add.  I would THINK if easy_install was fetching them on its own from the Internet, it would say so in its output.

And yet you've not bothered to see what {pre,post}-{un,}install scripts
are in the package, nor to factor in any issues in package dependencies.
It isn't like *install scripts are a new concept, I've been seeing them
in package managers that were available in 1987.

More information about the python-ldap mailing list