[MERGE] Fix installation of bzrlib.benchmarks
Aaron Bentley
aaron.bentley at utoronto.ca
Thu Jun 22 14:24:27 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> On 21 Jun 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
>> Jelmer Vernooij wrote:
>>> Hi,
>>>
>>> The attached bundle fixes the installation of bzrlib.benchmarks.
>> +1 and merged. But this has happened often enough that I think we
>> should be testing it.
>
> I had a look at this. It's actually a little hard to test because you
> won't see the problem until you actually try to run the benchmarks in
> the installed copy.
What I had in mind was checking checking whether the source files
matched the installed files. e.g. scanning bzrlib, seeing that
benchmarks/__init__.py should be installed, maybe running a script that
just imported every module that is visible in the source tree.
> (More accurately, it's trivial to check that this
> specific bug is fixed but harder to check that we have installed
> everything the right way.)
>
> Really it would be better to fix the Don'tRepeatYourself problem of
> listing all the modules there - we should just get distutils to install
> everything under that directory. I think we can do that; I'll have a
> look in a bit.
Sure; at worst, we can do os.listdir in setup.py, to scan for packages
and modules.
> In the meantime this patch fixes something else that was annoying me:
> the test for setup.py fails if you run it from a different working
> directory.
That's a good goal.
+0 on the patch. I like the idea, but sys.argv[0] isn't the right way
to get the path-- it just provides the text the user typed, without
following symlinks or being aware of $PATH. Here's a tweak that uses
the bzrlib file path to find setup.py.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEmpoL0F+nu1YWqI0RAqVGAJ9U6WlPl7/pbnVxs5n5sNfNDin/zACggJE8
jYs3pa39z24RDYhQtoKrX9o=
=4t/A
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup-fix.patch
Type: text/x-patch
Size: 3070 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060622/8b712f0c/attachment.bin
More information about the bazaar
mailing list