В моем случае это произошло после обновления до Android 8.0. Самозаверяющему сертификату Android было доверено использовать алгоритм подписи SHA1withRSA. Переключение на новый сертификат с использованием алгоритма подписи SHA256withRSA устранило проблему.
Especially since you have Python 2.6 available you can do something like python setup.py install --user
, which will install Mercurial with ~/.local as prefix. You don't have to change the PYTHONPATH for this but only add ~/.local/bin to your PATH.
Regarding advantages and disadvantages: That all depends on what your PYTHONPATH in general looks like since modifying it will naturally modify the load order of packages (which becomes relevant if you have one version of Mercurial installed with one prefix and another with a different prefix). In general, I try to put all custom packages into a certain site-packages folder (say /usr/local/lib/python2.6/site-packages). Again: If you are the only person who will use those libs, the --user flag provided by Python 2.6's distutils makes something like this pretty easy (with adding ~/.local to the default search path for modules).
virtualenv should work just fine as long you your PYTHONPATH is used consistently.
Install mercurial - or any Python package in general - into your user home directory. Thus you can access them from any Python (of same version) or any virtualenv. See PEP 370 for details.
$ cd mercurial-x.y.z/
$ python2.6 setup.py install --user
$ ~/.local/bin/hg
...
But why do you want to build mercurial manually? I use macports.
$ sudo port install mercurial
$ which hg
/opt/local/bin/hg
Update: Nowadays, I simply use PyPM to install mercurial into ~/.local/bin/hg
.
, как предложил Сридхар, макропорты прекрасно работают на нескольких архитектурах и версиях MacOX + позволяет обновления и многое другое:
$ port variants mercurial
mercurial has the variants:
bash_completion: Completion support for bash
zsh_completion: Install mercurial zsh completion file
$
, так что вы можете использовать:
$ sudo port install mercurial +bash_completion
---> Computing dependencies for mercurial
---> Fetching mercurial
---> Attempting to fetch mercurial-1.3.1.tar.gz from http://arn.se.distfiles.macports.org/python
---> Attempting to fetch mercurial-1.3.1.tar.gz from http://www.selenic.com/mercurial/release/
---> Verifying checksum(s) for mercurial
---> Extracting mercurial
---> Configuring mercurial
---> Building mercurial
---> Staging mercurial into destroot
---> Installing mercurial @1.3.1_0+bash_completion
---> Activating mercurial @1.3.1_0+bash_completion
---> Cleaning mercurial
$
Зачем нужно использовать macports? python easy_install
- самый простой и безошибочный способ:
easy_install -U mercurial
Это просто золотая пуля, всегда.
Все эти ответы выглядят сложными для среднего пользователя Mac OS X, поскольку они относятся к другим установочным платформам. На данный момент веб-сайт Mercurial предлагает установочный пакет (сжатый в виде zip-файла).