English 中文(简体)
Instaling Mercurial on Mac OS X 10.6now Leopard
原标题:Installing Mercurial on Mac OS X 10.6 Snow Leopard
  • 时间:2009-09-22 17:13:09
  •  标签:

Installing Mercurial on Mac OS X 10.6 Snow Leopard

我从来文方处安装了Mercurial 1.3.1。

cd ~/src
curl -O https://www.mercurial-scm.org/release/mercurial-1.3.1.tar.gz
tar -xzvf mercurial-1.3.1.tar.gz
cd mercurial-1.3.1
make all
sudo make install

这在<代码>/usr/ local/lib/python2.6/site- Packages/上安装了Mecurial的现场包装档案。 我知道,将Mercurial从Mac Disk图像中安装,将把档案安装在/Library/Python/2.6/site- Packages/上,该编码是麦克斯X射线安装现场包装目录。

我已安装了Adal 2.6.2+作为框架,其现场包装目录如下:

图书馆/Framework/Python.framework/Versions/2.6/lib/python2.6/site- Package

我不得不通过这一方式发出:

PYTHONPATH=/usr/ local/lib/python2.6/site- Packages:“${PYTHONPATH}”

为了让雇佣军工作。

Questions

  • How can I install Mercurial from source with the site-packages in a different directory?
  • Is there an advantage or disadvantage to having the site-packages in the current location? Would it be better in one of the Python site-package directories that already exist?
  • Do I need to be concerned about virtualenv working correctly since I have modified PYTHONPATH (or any other conflicts for that matter)?

Reasons for Installing from Source

Dan Benjamin Hivelogic <>提供第Installing on Mercurial。

最佳回答

尤其是,既然你有2.6种,你可以做些什么,如<代码>python的安装。 安装——用户,将装上“Mecurial”和“~/. local”作为预设装置。 您不必为此改变PYTHONPATH,但只为PATH增加~/. local/bin。

关于优势和劣势: 所有这一切都取决于您的PYTHONPATH总体看法,因为修改后将自然地修改包件的装载顺序(如果你有一版装有一门固定装置和另一套有不同的固定装置,这便具有相关性)。 总的来说,我试图将所有海关包裹放在某个地点包装箱中(分析/使用/当地/校准/python2.6/现场包装)。 同样: 如果你是唯一使用这些校准的人,那么第2条第2款提供的——用户旗便会像这种非常容易的事情(在不设的单元搜索道路上添加到点)。

只要始终使用你的PYTHONPATH,虚拟机构就应当做罚款。

问题回答

为什么需要使用港口? 最低途径和错误是:

easy_install -U mercurial

www.un.org/Depts/DGACM/index_spanish.htm 它只是一个简单的金枪,所有时间都是。

Install mercurial - or any protocol in general - into Youuser homeDirectory. 因此,你可以从任何“灰色”或“虚拟”进入。 See PEP 370

$ cd mercurial-x.y.z/
$ python2.6 setup.py install --user
$ ~/.local/bin/hg
...

但是,为什么你想要人工建造汞? 页: 1

$ sudo port install mercurial
$ which hg
/opt/local/bin/hg

<>Update: 如今,我只使用PyPM将汞安装到~/. local/bin/hg

根据Sridhar的建议,Macports在MacOsX +的多个建筑和版本上进行加工,并允许更新和增加:

$ port variants mercurial
mercurial has the variants:
   bash_completion: Completion support for bash
   zsh_completion: Install mercurial zsh completion file
$

2. 请您:

$ 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
$

所有这些答复都很复杂,因为其他安装平台是专用的。 至现在,Mercial网站提供了一台安装机包(作为齐普文件压缩)。





相关问题
热门标签