[qmtest] [b,s]dist creation
Stefan Seefeld
seefeld at sympatico.ca
Sat Sep 6 18:04:03 UTC 2003
Mark Mitchell wrote:
> A few notes:
>
> #1: I happened to have a bunch of extra stuff lying around in "scripts"
> when I ran "python2 setup.py sdist". That all got put into the dist
> file. I think we need to refine MANIFEST.in somewhat to be less
> all-inclusive. The other possibility is to check out pristine versions
> of QMTest before building packages (which is what the current release
> script does). That's OK, too. What do you think?
I'd be fine with both. Actually, I'm aware that the current MANIFEST
template is too inclusive. That's partly because I don't fully understand
the current directory structure and partly because I hope that once this
build system is fully working we could clean the layout up a bit, i.e.
make the source tree more isomorphic to an installed tree. Then the
MANIFEST.in would be straight forward and clean.
For a temporary solution it would probably be most efficient if you fixed
that file as you know best which files are official and which are not.
> #2: To correct the above, I removed the stuff in scripts, but it still
> tried to use it. I had to manually remove MANIFEST to get it to rebuild
> correctly. Perhaps we need to automate this process using the Makefile
> or more magic in the distutils work you've done. Or maybe we just need
> to have good directions about how to do stuff and/or update the
> scripts/qm-release.
yeah, in your first build the MANIFEST file was generated with wrong entries.
This file had to be removed manually. There are parameters to the 'sdist'
command that force this file to be regenerated. But that's amounts to the
same work as removing it by hand. We sure could make it such that it was always
regenerated first.
> #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?
yeah, I now remember that from RH 8, and found a solution at
http://www.rpm.org/hintskinks/rpmbuild/
I'v been running RH 9.0 for a while, and there it works again.
Of course, if this turns out to be a problem I have to extend the 'bdist_rpm'
command to use 'rpmbuild' instead.
> #4. bdist_wininst is extremely cool. Very, very cool. However, here's
> 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?
no idea yet. I only built it, but didn't actually test anything on the windows platform.
I'll try to get to that on monday at work...
> The manual will also need updating if we do this, because the installed
> QMTest is in a different place than it used to be. (It put it in
> c:\Python22\Scripts\qmtest.py.)
Well, I would suggest to rename/move the 'qmtest.py' file then (and others),
so yes, the man pages need to be adjusted accordingly. Speaking of the
windows executable: I'd very much like to make it (at least optionally)
install two scripts: one that can be run from the windows cmd, the other
from a cygwin shell. I believe the latter could be a tiny wrapper shell
script, so not a big deal.
> #5: I'm a little nervous about relying on a largely unsupported Python
> component, i.e., distutils. I *want* to rely on it, because this stuff
> seems much more automated and more likely to work well with Python and
> it's much more automated. However, I'm pretty sure Bourne shell scripts
> and Makefiles will always work; I'd hate to find out that Python 2.8 had
> a totally busted distutils. Convince me that ain't going to happen. :-)
Yeah, I, too, have mixed feelings about distutils. However, as there isn't
much activity on it right now, and yet many (python) packages use it, I
think it will be around for quite some time. I'm really hoping that for
python 2.8 something better will be around (such as scons with python
building/packaging rules built in), and I'm volunteering to port the pydist
stuff over then :-)
> Coding nits:
>
> - We leave two lines between functions. Some of the stuff in qmdist
> only has one line of spacing.
>
> - There should be:
>
> ########################################################################
> # Imports
> #######################################################################
>
> and other similar blocks in the new qmdist files. (Look at, say,
> executable.py for good examples.)
ok, will do.
> - The MANIFEST.in comments should be full sentences.
fine.
Can I check it in then with these changes applied or do you prefer another
patch first ?
Regards,
Stefan
More information about the qmtest
mailing list