At 11:37 AM 7/6/2006 +0400, Pavel Volkovitskiy wrote:
On Wednesday 05 July 2006 19:16, you wrote:
I'm trying to install picard (http://musicbrainz.org/wd/PicardDownload) with python -c "import setuptools;execfile('setup.py')" install --single-version-externally-managed --root=/path/to/root but it breaks with: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: -c --help [cmd1 cmd2 ...] or: -c --help-commands or: -c cmd --help
error: option --single-version-externally-managed not recognized
Is that ok and i should use ./setup.py without "import setuptools;execfile('setup.py')" hack, or if this a bug in setuptools that should be fixed?
I'm having trouble reproducing the problem, as this tarball:
doesn't appear to contain a setup.py. Could you give me some more information about what package you are installing from and where its setup.py is coming from?
Sorry, i dind't say, i use 0.7.0-beta3 version https://helixcommunity.org/download.php/2009/picard-0.7.0-beta3.tar.gz
Ah. This setup.py uses a custom "install" command, and setuptools doesn't override that. So the reason you're getting the error message is that picard's install command doesn't support the --single-version-externally-managed option.
The only way to work around this and force picard to use setuptools would be to monkeypatch, e.g. something like:
python -c "import setuptools.command.install, distutils.command.install; distutils.command.install.install = setuptools.command.install.install; execfile('setup.py')" install --root=/path/to/root
This would force picard to subclass setuptools' install command instead of distutils'.
However, even this change may not be sufficient, as it appears that picard's setup script wants to install data to a /usr/share/locale or something similar. I don't think it likely that you'll get this to work with setuptools, which is designed to package libraries, not applications.
But that's probably okay, because I don't really see why you need to wrap this with setuptools. Since you're building a system package anyway, it should suffice to just use a regular --root install without setuptools.
(By the way, --root implies --single-version-externally-managed, so you don't need to use the latter if you are using the former. However, you should only be using --root if you are planning to copy the contents of /path/to/root *to* the actual root, /. Usually this option is used in conjunction with a packaging tool such as RPM. If you aren't planning to copy /path/to/root to /, you shouldn't be using --root either.)
Yeah, i want to make a package. thanks for tip, i wan't use --single-... for manual tests :) (but i'll use it for packae building as it helps to find errors like this)