0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mercurial(Python 2.7 on Windows x64)にhg-gitをインストールする

Posted at

大変なのは…

dulwichのインストールに必要な64ビット版VisualCのインストールでした!
こちらに備忘録を書きましたので、参考になれば幸いです。
Windows7/8.1(x64)にVC10(64bitアプリコンパイル用)をインストーラーを使わずインストールする

必要なものをいろいろインストールする

  • easy_install(setuptools)
    => python ez_setup.py
  • pip(あれ?これは必要じゃなかったかも)
    => easy_install pip

hg-gitのインストール

の前にやっちゃいます。
よく分からないし、面倒臭いので
(Pythonパス)/Lib/distutils/msvc9compiler.py
を直に弄っちゃいます。VCのパスやinclude, libなどを直接設定します。

diff -r 59032f1c6c69 msvc9compiler.py
--- a/msvc9compiler.py	Thu Oct 23 21:13:44 2014 +0900
+++ b/msvc9compiler.py	Thu Oct 23 23:11:45 2014 +0900
@@ -380,12 +380,10 @@
                 plat_spec = PLAT_TO_VCVARS[get_platform()] + '_' + \
                             PLAT_TO_VCVARS[plat_name]
 
-            vc_env = query_vcvarsall(VERSION, plat_spec)
-
             # take care to only use strings in the environment.
-            self.__paths = vc_env['path'].encode('mbcs').split(os.pathsep)
-            os.environ['lib'] = vc_env['lib'].encode('mbcs')
-            os.environ['include'] = vc_env['include'].encode('mbcs')
+            self.__paths = ["C:/Tools/VC10x64/bin/amd64;C:/Tools/VC10x64/bin/x64"]
+            os.environ['lib'] = "C:/Tools/VC10x64/lib/amd64;C:/Tools/VC10x64/lib/x64"
+            os.environ['include'] = "C:/Tools/VC10x64/include"
 
             if len(self.__paths) == 0:
                 raise DistutilsPlatformError("Python was built with %s, "

あとは

easy_install -Z hg-git

すればインストールが開始されます。

おしまい

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?