~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Doc/distutils/builtdist.rst

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-04-08 02:29:05 UTC
  • mto: (10.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 23.
  • Revision ID: james.westby@ubuntu.com-20090408022905-xa5zbe8821m2o77o
Tags: upstream-2.6.2~rc1
ImportĀ upstreamĀ versionĀ 2.6.2~rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
.. % \longprogramopt{spec-file} option; used in conjunction with
269
269
.. % \longprogramopt{spec-only}, this gives you an opportunity to customize
270
270
.. % the \file{.spec} file manually:
271
 
.. % 
 
271
.. %
272
272
.. % \ begin{verbatim}
273
273
.. % > python setup.py bdist_rpm --spec-only
274
274
.. % # ...edit dist/FooBar-1.0.spec
275
275
.. % > python setup.py bdist_rpm --spec-file=dist/FooBar-1.0.spec
276
276
.. % \ end{verbatim}
277
 
.. % 
 
277
.. %
278
278
.. % (Although a better way to do this is probably to override the standard
279
279
.. % \command{bdist\_rpm} command with one that writes whatever else you want
280
280
.. % to the \file{.spec} file.)
334
334
Cross-compiling on Windows
335
335
==========================
336
336
 
337
 
Starting with Python 2.6, distutils is capable of cross-compiling between 
338
 
Windows platforms.  In practice, this means that with the correct tools 
 
337
Starting with Python 2.6, distutils is capable of cross-compiling between
 
338
Windows platforms.  In practice, this means that with the correct tools
339
339
installed, you can use a 32bit version of Windows to create 64bit extensions
340
340
and vice-versa.
341
341
 
342
 
To build for an alternate platform, specify the :option:`--plat-name` option 
343
 
to the build command.  Valid values are currently 'win32', 'win-amd64' and 
 
342
To build for an alternate platform, specify the :option:`--plat-name` option
 
343
to the build command.  Valid values are currently 'win32', 'win-amd64' and
344
344
'win-ia64'.  For example, on a 32bit version of Windows, you could execute::
345
345
 
346
346
   python setup.py build --plat-name=win-amd64
347
347
 
348
 
to build a 64bit version of your extension.  The Windows Installers also 
 
348
to build a 64bit version of your extension.  The Windows Installers also
349
349
support this option, so the command::
350
350
 
351
351
   python setup.py build --plat-name=win-amd64 bdist_wininst
352
352
 
353
353
would create a 64bit installation executable on your 32bit version of Windows.
354
354
 
355
 
To cross-compile, you must download the Python source code and cross-compile 
 
355
To cross-compile, you must download the Python source code and cross-compile
356
356
Python itself for the platform you are targetting - it is not possible from a
357
357
binary installtion of Python (as the .lib etc file for other platforms are
358
 
not included.)  In practice, this means the user of a 32 bit operating 
359
 
system will need to use Visual Studio 2008 to open the 
360
 
:file:`PCBuild/PCbuild.sln` solution in the Python source tree and build the 
361
 
"x64" configuration of the 'pythoncore' project before cross-compiling 
 
358
not included.)  In practice, this means the user of a 32 bit operating
 
359
system will need to use Visual Studio 2008 to open the
 
360
:file:`PCBuild/PCbuild.sln` solution in the Python source tree and build the
 
361
"x64" configuration of the 'pythoncore' project before cross-compiling
362
362
extensions is possible.
363
363
 
364
364
Note that by default, Visual Studio 2008 does not install 64bit compilers or