Commits

Vinay Sajip  committed 00b7e62 Draft

Routine update.

  • Participants
  • Parent commits ce13f82

Comments (0)

Files changed (2)

File docs/reference.rst

    .. method:: __init__(base=None)
 
       Initialise a cache instance with a specific directory which holds the
-      cache. If base is not specified, the value ``resource-cache` in the
+      cache. If base is not specified, the value ``resource-cache`` in the
       directory returned by :func:`~distlib.util.get_cache_base` is used.
 
    .. method:: get(resource)
 
       :type specification: str
       :param options: If specified, a dictionary of options used to control
-                      script creation. Currently, only the key ``gui`` is
-                      checked: this should be a ``bool`` which, if ``True``,
-                      indicates that the script is a windowed application.
-                      This distinction is only drawn on Windows if
-                      ``add_launchers`` is ``True``, and results in a windowed
-                      native launcher application if ``options['gui']`` is
-                      ``True`` (otherwise, the native executable launcher is a
-                      console application).
+                      script creation. Currently, the following keys are
+                      checked:
 
+                          ``gui``: This should be a ``bool`` which, if ``True``,
+                          indicates that the script is a windowed
+                          application. This distinction is only drawn
+                          on Windows if ``add_launchers`` is ``True``,
+                          and results in a windowed native launcher
+                          application if ``options['gui']`` is ``True``
+                          (otherwise, the native executable launcher
+                          is a console application).
+
+                          ``interpreter_args``: If specified, this should be
+                          a list of strings which are appended to the
+                          interpreter executable in the shebang line. If there
+                          are values with spaces, you will need to surround
+                          them with double quotes.
+
+                          .. note:: Linux does not handle passing arguments
+                             to interpreters particularly well -- multiple
+                             arguments are bundled up into one when passing to
+                             the interpreter -- see
+                             https://en.wikipedia.org/wiki/Shebang_line#Portability
+                             for more information. This may also affect other
+                             POSIX platforms -- consult the OS documentation
+                             for your system if necessary. On Windows, the
+                             ``distlib`` native executable launchers *do* parse
+                             multiple arguments and pass them to the
+                             interpreter.
+
+      :type options: dict
       :returns: A list of absolute pathnames of files installed (or which
                 would have been installed, but for ``dry_run`` being true).
 

File docs/tutorial.rst

   as the return code from the script.
 
   You can pass an optional ``options`` dictionary to the :meth:`make` method.
-  This is meant to contain options which control script generation. The only
-  option currently in use is ``'gui'``, which indicates on Windows that a
-  Windows executable launcher (rather than a launcher which is a console
-  application) should be used. (This only applies if ``add_launchers`` is
-  true.)
+  This is meant to contain options which control script generation. There are
+  two options currently in use:
+
+  ``gui``: This Boolean value, if ``True``, indicates on Windows that a Windows
+  executable launcher (rather than a launcher which is a console application)
+  should be used. (This only applies if ``add_launchers`` is true.)
+
+  ``interpreter_args``: If provided, this should be a list of strings which
+  are added to the shebang line following the interpreter. If there are values
+  with spaces, you will need to surround them with double quotes.
+
+  .. note:: Use of this feature may affect portability, since POSIX does not
+    standardise how these arguments are passed to the interpreter (see
+    https://en.wikipedia.org/wiki/Shebang_line#Portability for more
+    information).
 
   For example, you can pass ``{'gui': True}`` to generate a windowed script.
 
 the :attr:`executable` attribute of a :class:`ScriptMaker` instance to the
 absolute Unicode path of the executable which you want to be written to the
 shebang lines of scripts. If not specified, the executable running the
-:class:`ScriptMaker` code is used.
+:class:`ScriptMaker` code is used. If the value has spaces, you should
+surround it with double quotes.
 
 
 Generating variants of a script