Building python-ldap RPMs (was: TLS context)
Joe Little
jlittle at open-it.org
Wed Jan 2 04:49:53 CET 2002
Did you just do a new commit on CVS?
the -O1 and -O2 both created .pyo files only.. no .pyc files (odd, that).
Anywho.. I've generated release 2, which drops the .pyo files and does the
post-install compile all, though it feels somewhat wrong since I may be
affecting other things on the system. Furthermore, I don't get the free
chksums on the .pyo and .pyc files.. Oh well, it definitely makes the build
process easier.
-2 is up there, and it does dump the compileall output to the screen. Once
we move beyond the cvs phase, I'll /dev/null that output since it will make
for ugly installations
On 1/1/02 7:29 PM, "Michael Ströder" <michael at stroeder.com> wrote:
> 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