Open kezabelle opened 12 years ago
Thank you for all those details,
As I don't own anything else that Linux, I haven't try to install on OSX (or even Windows), and I'm a beginner with packaging for Python as well. I'll try to google for some more information about packaging for OSX, but I won't even be able to test it, and it won't be so easy for me then.
I'll see what I can do thought, and sorry
Thanks
I've never packaged anything for Python, so you're already doing better than I :)
I have, however, pip installed all manner of stuff over the years, and none has ever required intltool, or distutils extra. Many other packages that provide .po files for translations seem to get by without said requirement, presumably by building the translations before packaging? This is mostly speculation - I don't even know how to package things.
I think that testing you can pip install tyrs into a throwaway virtualenv (probably something like below)
virtualenv throwaway --no-site-packages
source throwaway/bin/activate
pip install tyrs
would at least fix the site-packages issue I've documented, which may be the only outstanding issue (as intltool can at least be installed via homebrew)
To further this issue, with this small diff, I am able to install to a virtualenv successfully via python setup.py develop && python setup.py build && python setup.py install
(each run separately to verify they work).
diff --git a/setup.cfg b/setup.cfg
index abefc9a..0f910b3 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,3 @@
-[install]
-prefix=/usr
-
[build]
i18n = True
Basically, the prefix in the setup.cfg seems to take precedence in lieu of an --install-option="--prefix=?", and removing it leaves it, presumably, up to distutils, setuptools or whatever.
That still leaves the Distutils-extra/intltool part, which ideally I'd like to get around (because I've never encountered another package requiring it, which is indicitive of there being some workaround (I also can't find any documentation for it on Canonical's Launchpad)), but at least it installs.
Thanks for this, and sorry, I didn't really take time to look at this issue. About the distutils-extra, it was required for the build_i18n stuff, but haven't look deeply into it. Thanks by the way for your nice and clean bug repport.
The setup build/install script seems to be heavily opinionated in ways that make it hard to install tyrs on OSX. Specifically:
pip install tyrs
the build will fail because the build tries to call out to intltool-update, which isn't part of the OSX toolchain - this can be circumvented by using mxcl/homebrew to dobrew install intltool
.The default version of Python on a mac doesn't have site-packages in that directory, and I suspect those installed by fink/macports/homebrew may have different opinions on where it should be, too.
Running
python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
yields /Library/Python/2.6/site-packages rather than /usr/lib/python2.6/site-packages.Similarly, attempting to install in a virtualenv (
virtualenv {anything} --no-site-packages
) provides the same error, indicating that it may be a problem for more than just the default Python installed on Macs.