rest25/distutils/builtdist.rst => rest262/distutils/builtdist.rst
190| Summary (in preamble)                    | :option:`description`                        |
191+------------------------------------------+----------------------------------------------+
192| Version                                  | :option:`version`                            |
193+------------------------------------------+----------------------------------------------+
194| Vendor                                   | :option:`author` and :option:`author_email`, |
195|                                          | or  --- & :option:`maintainer` and           |
196|                                          | :option:`maintainer_email`                   |
197+------------------------------------------+----------------------------------------------+
n198-| Copyright                                | :option:`licence`                            |
n198+| Copyright                                | :option:`license`                            |
199+------------------------------------------+----------------------------------------------+
200| Url                                      | :option:`url`                                |
201+------------------------------------------+----------------------------------------------+
202| %description (section)                   | :option:`long_description`                   |
203+------------------------------------------+----------------------------------------------+
204
205Additionally, there are many options in :file:`.spec` files that don't have
206corresponding options in the setup script.  Most of these are handled through
263file winds up deep in the "build tree," in a temporary directory created by
264:command:`bdist_rpm`.)
265
266.. % \XXX{this isn't implemented yet---is it needed?!}
267.. % You can also specify a custom \file{.spec} file with the
268.. % \longprogramopt{spec-file} option; used in conjunction with
269.. % \longprogramopt{spec-only}, this gives you an opportunity to customize
270.. % the \file{.spec} file manually:
n271-.. % 
n271+.. %
272.. % \ begin{verbatim}
273.. % > python setup.py bdist_rpm --spec-only
274.. % # ...edit dist/FooBar-1.0.spec
275.. % > python setup.py bdist_rpm --spec-file=dist/FooBar-1.0.spec
276.. % \ end{verbatim}
n277-.. % 
n277+.. %
278.. % (Although a better way to do this is probably to override the standard
279.. % \command{bdist\_rpm} command with one that writes whatever else you want
280.. % to the \file{.spec} file.)
281
282
283.. _creating-wininst:
284
285Creating Windows Installers
297   python setup.py bdist_wininst
298
299or the :command:`bdist` command with the :option:`--formats` option::
300
301   python setup.py bdist --formats=wininst
302
303If you have a pure module distribution (only containing pure Python modules and
304packages), the resulting installer will be version independent and have a name
n305-like :file:`foo-1.0.win32.exe`.  These installers can even be created on Unix or
n305+like :file:`foo-1.0.win32.exe`.  These installers can even be created on Unix
306-Mac OS platforms.
306+platforms or Mac OS X.
307
308If you have a non-pure distribution, the extensions can only be created on a
309Windows platform, and will be Python version dependent. The installer filename
310will reflect this and now has the form :file:`foo-1.0.win32-py2.0.exe`.  You
311have to create a separate installer for every Python version you want to
312support.
313
n314-The installer will try to compile pure modules into bytecode after installation
n314+The installer will try to compile pure modules into :term:`bytecode` after installation
315on the target system in normal and optimizing mode.  If you don't want this to
316happen for some reason, you can run the :command:`bdist_wininst` command with
317the :option:`--no-target-compile` and/or the :option:`--no-target-optimize`
318option.
319
320By default the installer will display the cool "Python Powered" logo when it is
321run, but you can also supply your own bitmap which must be a Windows
322:file:`.bmp` file with the :option:`--bitmap` option.
324The installer will also display a large title on the desktop background window
325when it is run, which is constructed from the name of your distribution and the
326version number.  This can be changed to another text by using the
327:option:`--title` option.
328
329The installer file will be written to the "distribution directory" --- normally
330:file:`dist/`, but customizable with the :option:`--dist-dir` option.
331
n332+.. _cross-compile-windows:
333+ 
334+Cross-compiling on Windows
335+==========================
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
339+installed, you can use a 32bit version of Windows to create 64bit extensions
340+and vice-versa.
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
344+'win-ia64'.  For example, on a 32bit version of Windows, you could execute::
345+ 
346+   python setup.py build --plat-name=win-amd64
347+ 
348+to build a 64bit version of your extension.  The Windows Installers also
349+support this option, so the command::
350+ 
351+   python setup.py build --plat-name=win-amd64 bdist_wininst
352+ 
353+would create a 64bit installation executable on your 32bit version of Windows.
354+ 
355+To cross-compile, you must download the Python source code and cross-compile
356+Python itself for the platform you are targetting - it is not possible from a
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
362+extensions is possible.
363+ 
364+Note that by default, Visual Studio 2008 does not install 64bit compilers or
365+tools.  You may need to reexecute the Visual Studio setup process and select
366+these tools (using Control Panel->[Add/Remove] Programs is a convenient way to
367+check or modify your existing install.)
332
333.. _postinstallation-script:
334
335The Postinstallation script
336---------------------------
337
338Starting with Python 2.3, a postinstallation script can be specified which the
339:option:`--install-script` option.  The basename of the script must be
385      "CSIDL_FONTS"
386
387   If the folder cannot be retrieved, :exc:`OSError` is raised.
388
389   Which folders are available depends on the exact Windows version, and probably
390   also the configuration.  For details refer to Microsoft's documentation of the
391   :cfunc:`SHGetSpecialFolderPath` function.
392
n429+Vista User Access Control (UAC)
430+===============================
431+ 
432+Starting with Python 2.6, bdist_wininst supports a :option:`--user-access-control`
433+option.  The default is 'none' (meaning no UAC handling is done), and other
434+valid values are 'auto' (meaning prompt for UAC elevation if Python was
435+installed for all users) and 'force' (meaning always prompt for elevation)
393
394.. function:: create_shortcut(target, description, filename[, arguments[, workdir[, iconpath[, iconindex]]]])
395
396   This function creates a shortcut. *target* is the path to the program to be
397   started by the shortcut. *description* is the description of the shortcut.
398   *filename* is the title of the shortcut that the user will see. *arguments*
399   specifies the command line arguments, if any. *workdir* is the working directory
400   for the program. *iconpath* is the file containing the icon for the shortcut,
401   and *iconindex* is the index of the icon in the file *iconpath*.  Again, for
402   details consult the Microsoft documentation for the :class:`IShellLink`
403   interface.
t404- 
405- 
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op