-
Notifications
You must be signed in to change notification settings - Fork 49
Add installation instructions to README.md #140
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are instructions for people using homebrew, not for everyone.
Please, make sure to highlight the fact that using homebrew is not required, untested (by me,
I don't use homebrew), and that it's an all-or-nothing decision. There is no (or difficult) sharing between built/installed-by-homebrew binaries and regular binaries installed using the Apple command line dev tools or Xcode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the Debian part, sure, these instructions are pretty generic. I'm still loathe to recommend people just run "apt-get update" as that could break their setup as other, unrelated, things might get upgraded too, or am I confusing update with upgrade here ?
Hi @ovalhub, sounds reasonable! let me know what you think: For Mac:
|
|
On Thu, 18 Feb 2021, ddelange wrote:
Hi @ovalhub, sounds reasonable! let me know what you think:
For Mac: 1. let's split installing icu4c and installing pyicu into
separate bullet points?
Whether icu4c needs to be installed first on Mac depends on whether one
wants to use the system installed icu4c or not. See point about using homebrew
below. Not using homebrew but the Apple command line devtools or XCode, if
one chooses to install another, usually newer, version of icu4c they should
follow instructions in icu4c's Readme.html file at
https://htmlpreview.github.io/?https://github.com/unicode-org/icu/blob/master/icu4c/readme.html#HowToBuild
which basiscally state, for Mac:
$ tar -cvzf icu-X.Y.tar.gz
$ cd icu/source
$ ./runConfigureICU MacOSX (use --help to see other options)
$ make
$ (sudo) make install
If you don't have pkg-config installed and the icu4c build didn't produce an
icu-config program, you might want to install pkg-config as well since the
pyicu build from sources will try to configure itself using icu-config or
pkg-config.
2. for the first bullet-point, let's link to installing from source first
and offer the brew codeblock as alternative (I'm happily using it, see the
gist for full working example)? Could you formulate your warning about brew
into a quote I can copy-paste above the codeblock?
Homebrew is a bit of an all or nothing solution. One should NOT mix homebrew
builds with non homebrew builds. The decision to use homebrew for pyicu
depends on the decision to use homebrew for python itself. Because python
controls many of the C++ compilation flags used to build extensions by
remembering how it was itself built, if you get python from homebrew you
*must* build pyicu using homebrew's c++ compiler, gcc. Conversely, if you use
Apple's system python, which can be python 2.7.16 (from the python command) or
python 3.8.2 (from the python3 command) on macos 10.15.7, you must also use
Apple's command line devtools (or XCode) to build pyicu, and probably icu4c
itself. Same if you built python from sources using Apple's command line
devtools (my situation).
Side note: we should not even be having this conversation about homeblrew,
really. If you want the homebrew situation, specifically, to get better, why
not submit pyicu to homebrew so that it becomes trivially installable as
anything else from homebrew ? I'm not doing it myself since I'm not using
homebrew as I'm choosing to stay on the non-homebrew side of the fence.
3. could you provide your favourite link for installing icu4c from source? I
couldn't immediately find it on http://site.icu-project.org
See above, it's predictably documented like most other open source projects.
For Debian:
4. same link to source installation first? or can be omitted here as apt is
deeply integrated in Debian?
I believe pyicu is available from Debian directly. For example:
https://packages.debian.org/source/stretch/pyicu
It's even available from netbsd's pkgsrc ;-)
https://pkgsrc.se/textproc/py-ICU
If one prefers to build pyicu from sources, say to get a newer version than
what is distributed by packagers, they should follow the above instructions
for Mac (non homebrew).
5. apt-get update doesnt touch packages, only updates package lists, should
be safe. for the rest all good? or anything you'd like to additionally see
there?
All good then.
6. also split into two bullet points for libicu-dev and pyicu?
If one mixes builds, that is, installs icu4c from apt-get or whatever and
then chooses to build pyicu from sources, they might need to install a few
other packages such as icu-dev, python-dev, gcc, etc...., etc...
(see note about pkg-config above as well)
7. Shall I change the pip commands to capitalized PyICU (not that it
matters, but for the looks)?
I don't care, whatever works !
Andi..
|
On Thu, 18 Feb 2021, ddelange wrote:
8. Do you want me to squash and force push or shall I do an additional
commit?
I don't understand the difference (I still use svn for pyicu), do whatever
is easiest. I guess one set of diffs is better (squashed, right ?)
Andi..
|
I can confirm, and have updated the installation instructions. Please let me know if you want to see it with more verbosity (I can also link to your comment actually, let me do that..) AFAIK it doesn't matter how ICU itself was compiled (e.g. I use clang-compiled CPython from |
👍 added link Please let me know if you'd like to see more verbosity anywhere! |
On Mar 2, 2021, at 02:15, ddelange ***@***.***> wrote:
The decision to use homebrew for pyicu depends on the decision to use homebrew for python itself.
I can confirm, and have updated the installation instructions. Please let me know if you want to see it with more verbosity (I can also link to your comment actually, let me do that..)
AFAIK it doesn't matter how ICU itself was compiled. Just as long as the compiler used for Python and the compiler used for PyICU match up. Please correct me though if you know of edge cases.
I think that's correct. I think people have installed ICU from homebrew, then built PyICU using system or another non-homebrew python successfully.
Andi..
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you !
thank you for your contribution ! |
I've had to point colleagues running Mac to https://gist.github.com/ddelange/6e04e81b99fae08e817a00515d4a378d repeatedly, so why not add it here :)
Closes #139