[python-ldap] Issues installing py-ldap2

Christopher Dukes chris.dukes.aix at gmail.com
Fri Nov 11 18:19:12 CET 2011

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