pytho****@googl*****
pytho****@googl*****
2011年 11月 7日 (月) 00:50:14 JST
Revision: aec180af15b1 Author: Naoki INADA <inada****@klab*****> Date: Sun Nov 6 07:49:01 2011 Log: Update 2.7.2: using/index, install/index http://code.google.com/p/python-doc-ja/source/detail?r=aec180af15b1 Modified: /install/index.rst /install/index.rst.diff /using/index.rst ======================================= --- /install/index.rst Sun Jun 19 15:57:08 2011 +++ /install/index.rst Sun Nov 6 07:49:01 2011 @@ -204,7 +204,7 @@ +------------------+-------------------------------------------------------+--------------------------------------------------+-------+ | Unix (non-pure) | :file:`{exec-prefix}/lib/python{X.Y}/site-packages` | :file:`/usr/local/lib/python{X.Y}/site-packages` | \(1) | +------------------+-------------------------------------------------------+--------------------------------------------------+-------+ -| Windows | :file:`{prefix}` | :file:`C:\\Python` | \(2) | +| Windows | :file:`{prefix}\\Lib\\site-packages` | :file:`C:\\Python{XY}\\Lib\\site-packages` | \(2) | +------------------+-------------------------------------------------------+--------------------------------------------------+-------+ 注記: @@ -615,6 +615,9 @@ | local | :file:`setup.cfg` | \(3) | +----------------------+-------------------------------------------------+------+ +全てのプラットフォームにおいて、"個人の" ファイルは `--no-user-cfg` オプシ ョンを使って +一時的に無効にすることができます。 + 注記: (1) @@ -840,12 +843,32 @@ GNU C / Cygwin / MinGW ^^^^^^^^^^^^^^^^^^^^^^ -この手引きは2.4.1 以降のPython と 3.0.0 (binutils-2.13.90-20030111-1) 以上 の MinGW でのみ有効です。 - この節では、 Cygwin や MinGW [#]_ 配布物中の GNU C/C++ コンパイラで Distutils を使うために必要な手順について述べます。 Cygwin 向けにビルドされている Python インタプリタを使っているなら、以下の手順をとらなくても Distutils はまったく問題なく動作します。 +全ての拡張ライブラリが MinGW や Cygwin でビルドできるわけではありませんが、 +多くの場合はビルドできます。 +ビルドできない拡張ライブラリは、大抵C++を利用していたり Microsoft Visual Cの +拡張に依存していたりします。 + +distutils に Cygwin を使って拡張をコンパイルさせるには次のようにタイプしま す。 :: + + python setup.py build --compiler=cygwin + +Cygwin を no-cygwin モード [#]_ で使うときや MinGW を使うときは次のようにし ます。 :: + + python setup.py build --compiler=mingw32 + +これらのオプションやコンパイラをデフォルトにしたい場合、 Distutils の +個人用あるいはシステム全体用の設定ファイルを書くことを検討するべきです。 +(:ref:`inst-config-files` を参照してください) + +古いバージョンの Python と MinGW +"""""""""""""""""""""""""""""""""" +以下の手順は Python 2.4.1 以前と MinGW 3.0.0 (binutils-2.13.90-20030111-1) +以前を利用しているときのものです。 + 上記のコンパイラは、いくつかの特殊なライブラリを必要とします。この作業は Borland の C++ よりもやや複雑です。というのは、 ライブラリを変換するためのプログラムが存在しないからです。 まず、 Python DLL が公開している全てのシンボルからなるリストを 作成しなければなりません。 (この作業むけの良いプログラムは、 @@ -869,30 +892,9 @@ 出来上がったライブラリは、 :file:`python25.lib` と同じディレクトリ (Python インストールディレクトリの :file:`libs` ディレクトリになるはずです) に置かなければなりません。 -.. % - 拡張モジュールが他のライブラリ (zlib, ... ) を必要とする場合、それらのライ ブラリも変換しなければなりません。 変換されたファイルは、それぞれ通常のライブラリが置かれているのと同じディレ クトリに置かねばなりません。 -Cygwin を使って Distutils に拡張モジュールをコンパイルさせるには、 :: - - python setup.py build --compiler=cygwin - -のように入力します。また、非 cygwin モードの Cygwin [#]_ や MinGW では、 - -.. % - -:: - - python setup.py build --compiler=mingw32 - -のように入力します。 - -.. % - -上記のオプションやコンパイラをデフォルトにしたいなら、自分用、またはシステ ム全体向けに、 Distutils の設定ファイルを書くことを検討した -方がよいでしょう ( :ref:`inst-config-files` 節を参照してください)。 - .. seealso:: ======================================= --- /install/index.rst.diff Sun Oct 30 17:04:23 2011 +++ /install/index.rst.diff Sun Nov 6 07:49:01 2011 @@ -74,7 +74,6 @@ that was built with Cygwin, everything should work without any of these following steps. --These compilers require some special libraries. This task is more complex than +Not all extensions can be built with MinGW or Cygwin, but many can. Extensions +most likely to not work are those that use C++ or depend on Microsoft Visual C +extensions. @@ -97,6 +96,7 @@ +inferior to 2.4.1 with a MinGW inferior to 3.0.0 (with +binutils-2.13.90-20030111-1). + +-These compilers require some special libraries. This task is more complex than +These compilers require some special libraries. This task is more complex than for Borland's C++, because there is no program to convert the library. First you have to create a list of symbols which the Python DLL exports. (You can find ======================================= --- /using/index.rst Sat Dec 4 03:01:40 2010 +++ /using/index.rst Sun Nov 6 07:49:01 2011 @@ -1,8 +1,8 @@ .. _using-index: -################### - Pythonを利用する -################### +############################# + Python のセットアップと利用 +############################# このドキュメントでは 異なるプラットフォームでのPython環境の