Установка Mercurial на Mac OS X 10.6 Snow Leopard

В моем случае это произошло после обновления до Android 8.0. Самозаверяющему сертификату Android было доверено использовать алгоритм подписи SHA1withRSA. Переключение на новый сертификат с использованием алгоритма подписи SHA256withRSA устранило проблему.

13
задан Vadim Kotov 16 June 2017 в 22:44
поделиться

5 ответов

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.

8
ответ дан 1 December 2019 в 19:40
поделиться

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.

7
ответ дан 1 December 2019 в 19:40
поделиться

, как предложил Сридхар, макропорты прекрасно работают на нескольких архитектурах и версиях 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
$
5
ответ дан 1 December 2019 в 19:40
поделиться

Зачем нужно использовать macports? python easy_install - самый простой и безошибочный способ:

easy_install -U mercurial

Это просто золотая пуля, всегда.

13
ответ дан 1 December 2019 в 19:40
поделиться

Все эти ответы выглядят сложными для среднего пользователя Mac OS X, поскольку они относятся к другим установочным платформам. На данный момент веб-сайт Mercurial предлагает установочный пакет (сжатый в виде zip-файла).

1
ответ дан 1 December 2019 в 19:40
поделиться
Другие вопросы по тегам:

Похожие вопросы: