[qmtest] [b,s]dist creation

Stefan Seefeld seefeld at sympatico.ca
Sat Sep 13 00:09:51 UTC 2003


Mark Mitchell wrote:

> #3: bdist_rpm didn't work for me:
> 
> rpm -ba --define _topdir
> /home/mitchell/dev/qm-mainline/build/bdist.linux-i686/rpm --clean
> build/bdist.linux-i686/rpm/SPECS/qm.spec
> 
> On Red Hat 8.0, you have to say "rpmbuild -ba".  The current release
> script uses "rpmbuild" everywhere, because we generally don't build for
> older versions of GNU/Linux.  How do we change this bit?

I'll provide a new bdist_rpm command shortly which changes two little
bits of the original one:

* it uses 'rpmbuild' instead of 'rpm'
* it runs 'install --optimize --compile' instead of 'install'

Unfortunately the original code is not that well designed, so to merge
these two changes in I have to copy&paste some very lengthy
functions :-(

> #4. bdist_wininst is extremely cool.  Very, very cool.  However, here's

after some deeper look into the code I'm not that much convinced any more
about its coolness.

> the downside: after installation, I couldn't run QMTest. :-(
> 
> Here's the error:
>   
> Traceback (most recent call last):
>   File "c:\Python22\scripts\qmtest.py", line 39, in ?
>     import qm
>   File "C:\Python22\Lib\site-packages\qm\__init__.py", line 36, in ?
>     from qm.diagnostic import error, warning, message
>   File "C:\Python22\Lib\site-packages\qm\diagnostic.py", line 212, in ?
>     __initialize_module()
>   File "C:\Python22\Lib\site-packages\qm\diagnostic.py", line 205, in __initialize_module
>     diagnostic_set.ReadFromFile(diagnostic_file)
>   File "C:\Python22\Lib\site-packages\qm\diagnostic.py", line 83, in ReadFromFile
>     file = open(path, "r")
> IOError: [Errno 2] No such file or directory: 'build\x08dist.win32\\wininst\\DATA\\share\\qm\\diagnostics\\common.txt'
> 
> What's up with that, do you think?

I'v had a close look at this. The issue is this:

bdist_wininst calls 'install' with the 'install_data' parameter (and others) set to
some special path that is only used temporarily, i.e. inside the distribution
directory structure. The final install paths, i.e. the ones where the installer
puts the files are different.
A big chunk of the installer is some base64 encoded binary pasted right into the
python module. Obviously I'm unable to figure out what that code does beside bootstrapping
the installation process. I'v tried to contact the author or even the distutils list
without any response so far :-(
As I don't know how (and when !) the final installation paths are computed, I don't
know how to fix this problem. All I know is where the data files got installed on my
machine, but that's hardly enough to conclude anything.
If anybody here has some hints or ideas, I'd very much appreciate it !

Regards,
		Stefan




More information about the qmtest mailing list