Suggestion of dh_purepython
Hi Python folks, I have put together a dh_purepython debhelper script to help the installation of pure Python packages. Still missing: 1) All Python X.Y versions need to be preinstalled. What happens when you install an new Python version? Hmm, we have to register those pure python packages somehow and byte-compile them if we install a new pythonX.Y package. 2) in prerm, cope with empty directories being left in /usr/lib/pythonX.Y/site-packages 3) sanity check for rm -rf in prerm 4) fix permissions of generated .py[co] files and directories, do not rely on umask 5) see BUGS of dh_purepython, for the compileall.py patch see http://sourceforge.net/tracker/index.php?func=detail&aid=501713&group_id=5470&atid=305470 All needed scripts as well as an example debian package can be found at http://www.debian.org/~calvin/purepython/. To install, copy dh_purepython into /usr/bin/ and copy {postinst,prerm}-purepython to /usr/share/debhelper/autoscripts/. ATTENTION: to install the example, you need to patch all your /usr/lib/pythonX.Y/compileall.py files: (patch is for 1.5.2, but easy adoptable) --- compileall.py.orig Thu Jan 10 10:59:35 2002 +++ compileall.py Thu Jan 10 11:53:15 2002 @@ -49,14 +49,14 @@ if os.path.isfile(fullname): head, tail = name[:-3], name[-3:] if tail == '.py': -cfile = fullname + (__debug__ and 'c' or 'o') +cfile = dfile + (__debug__ and 'c' or 'o') ftime = os.stat(fullname)[stat.ST_MTIME] try: ctime = os.stat(cfile)[stat.ST_MTIME] except os.error: ctime = 0 if (ctime > ftime) and not force: continue if not quiet: print 'Compiling', fullname, '...' try: -py_compile.compile(fullname, None, dfile) +py_compile.compile(fullname, cfile, dfile) except KeyboardInterrupt: raise KeyboardInterrupt except: Greetings, Bastian pgpgvCv3Htjjl.pgp Description: PGP signature
math.exp bug on alpha?
Greetings, on alpha debian, python 2.1.1-8: >>> import math >>> math.exp(-720) aborts the interpreter with a floating point exception. The strange thing is, exp(-700) and exp(-750) both work. Any insight? Thanks in advance, Luigi
Re: Suggestion of dh_purepython
On 10-Jan-2002 Bastian Kleineidam wrote: > Hi Python folks, > > I have put together a dh_purepython debhelper script to help > the installation of pure Python packages. > > Still missing: > > 1) All Python X.Y versions need to be preinstalled. What happens >when you install an new Python version? Hmm, we have to >register those pure python packages somehow and byte-compile >them if we install a new pythonX.Y package. > read all python* binaries from /usr/bin, loop through every one that has a version on the end, strip the version out and use it. for i in /usr/bin/python* do # if $i ends in a number # pyver = $i's version number # call /usr/lib/python$pyver/compileall.py done
Re: math.exp bug on alpha?
On Thu, Jan 10, 2002 at 05:25:43PM +, Luigi Ballabio wrote: > > Greetings, > on alpha debian, python 2.1.1-8: > > >>> import math > >>> math.exp(-720) > > aborts the interpreter with a floating point exception. The strange thing > is, exp(-700) and exp(-750) both work. Works for me, no aborts. (i386, python 2.1.1-8) Python 2.1.1+ (#1, Jan 8 2002, 00:37:12) [GCC 2.95.4 20011006 (Debian prerelease)] on linux2 Type "copyright", "credits" or "license" for more information. >>> import math >>> math.exp(-720) 2.0322308024183599e-313 >>> math.exp(-700) 9.8596765437597708e-305 >>> math.exp(-750) 0.0 >>> Greetings, Bastian pgpz6FLc5QYRJ.pgp Description: PGP signature
Re: math.exp bug on alpha?
On Thu, Jan 10, 2002 at 06:29:58PM +0100, Bastian Kleineidam wrote: > On Thu, Jan 10, 2002 at 05:25:43PM +, Luigi Ballabio wrote: > > on alpha debian, python 2.1.1-8: > > > Works for me, no aborts. (i386, python 2.1.1-8) Just compare the platform... :) -- Misha
Pyvorbis and ogg comments
Does anyone know how to set comments in ogg files using the libvorbis bindings? I can set a comment non-permanently (the VorbisComment object works like a dictionary), but I can't work out how to actually *save* those comments that I've set... I asked Chris Cheney, the maintainer, and he didn't know; upstream seem to not be answering mails, so I'm a bit baffled. Aq. -- (funny that, aquarius=>water=>boats=>sailors=>popeye=>[EMAIL PROTECTED] ;)) - Aiken, afe