Building python-ldap RPMs (was: TLS context)

Michael Ströder michael at stroeder.com
Wed Jan 2 04:29:03 CET 2002


Joe,

better you test the current CVS version and my recently sent diffs.
IMHO we can think about packaging later...

Joe Little wrote:
> 
> >> This is all changed behaviour so to speak with distutils.
> >
> > Was byte-compiling enabled in your RPM before? How?
> 
> I did a "make install" into a $DESTDIR (build root) --- make install did
> everything correctly in the GNU configure days. setup.py is a bit too smart
> :)

You should definitely avoid using make install. The Makefile was
produced by David who cannot stay away from typing make. Buuuh! But
as an OpenBSD hacker he does not spend much time with thinking about
RPMs... ;-)

> > What's wrong with using python setup.py bdist_rpm ? BTW: It contains
> > byte-compiled *.pyc files in my case (tested right now).
> 
> It fails for me since it finds python is 1.5

You simply have to type (assuming you used make altinstall when
installing the Python 2.1 version):
$ python2.1 setup.py bdist_rpm

> (which doesn't include distutils)

BTW: There are DistUtils for Python 1.5.

> Second, it looks like the current
> cvs snapshots enforce a 2.0.0pre1 version string.

Well, this can be easily solved...

> > When installing from source distribution (packaged with python
> > setup.py sdist) this will do the trick:
> > $ python setup.py install -O1
> > $ python setup.py install -O2
> 
> what do -01 and -02 do.. or is that O1 O2 (letter 'O')?

-O1 -> *.pyc
-O2 -> *.pyo

> > You could also write a small post-install script using
> > compileall.py.

And how about this as post-install script?

$ python2.1 /usr/lib/python2.1/compileall.py
$ python2.1 -O /usr/lib/python2.1/compileall.py

Ciao, Michael.




More information about the python-ldap mailing list