spacer

cpython

changeset 76556:4e9f1017355f

find changesets by author, revision, files, or words in the commit message
Fix #3561. Add an option to place the Python installation into the Windows Path environment variable.
author Brian Curtin <brian@python.org>
date Wed, 25 Apr 2012 08:12:37 -0500
parents 188b96e0ea89
children 5fea362b92fc
files Misc/NEWS Tools/msi/msi.py
diffstat 2 files changed, 22 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/Misc/NEWS
     1.2 +++ b/Misc/NEWS
     1.3 @@ -189,6 +189,9 @@ Tests
     1.4  Tools / Demos
     1.5  -------------
     1.6  
     1.7 +- Issue #3561: The Windows installer now has an option, off by default, for
     1.8 +  placing the Python installation into the system "Path" environment variable.
     1.9 +
    1.10  - Issue #13165: stringbench is now available in the Tools/stringbench folder.
    1.11    It used to live in its own SVN project.
    1.12  
     2.1 --- a/Tools/msi/msi.py
     2.2 +++ b/Tools/msi/msi.py
     2.3 @@ -454,6 +454,10 @@ def add_ui(db):
     2.4                ("SetDLLDirToTarget", 'DLLDIR=""', 751),
     2.5               ])
     2.6  
     2.7 +    # Prepend TARGETDIR to the system path, and remove it on uninstall.
     2.8 +    add_data(db, "Environment",
     2.9 +             [("PathAddition", "=-*Path", "[TARGETDIR];[~]", "REGISTRY.path")])
    2.10 +
    2.11      # Execute Sequences
    2.12      add_data(db, "InstallExecuteSequence",
    2.13              [("InitialTargetDir", 'TARGETDIR=""', 750),
    2.14 @@ -677,11 +681,11 @@ def add_ui(db):
    2.15      c=features.xbutton("Advanced", "Advanced", None, 0.30)
    2.16      c.event("SpawnDialog", "AdvancedDlg")
    2.17  
    2.18 -    c=features.text("ItemDescription", 140, 180, 210, 30, 3,
    2.19 +    c=features.text("ItemDescription", 140, 180, 210, 40, 3,
    2.20                    "Multiline description of the currently selected item.")
    2.21      c.mapping("SelectionDescription","Text")
    2.22  
    2.23 -    c=features.text("ItemSize", 140, 210, 210, 45, 3,
    2.24 +    c=features.text("ItemSize", 140, 225, 210, 33, 3,
    2.25                      "The size of the currently selected item.")
    2.26      c.mapping("SelectionSize", "Text")
    2.27  
    2.28 @@ -835,7 +839,7 @@ def add_features(db):
    2.29      # (i.e. additional Python libraries) need to follow the parent feature.
    2.30      # Features that have no advertisement trigger (e.g. the test suite)
    2.31      # must not support advertisement
    2.32 -    global default_feature, tcltk, htmlfiles, tools, testsuite, ext_feature, private_crt
    2.33 +    global default_feature, tcltk, htmlfiles, tools, testsuite, ext_feature, private_crt, prepend_path
    2.34      default_feature = Feature(db, "DefaultFeature", "Python",
    2.35                                "Python Interpreter and Libraries",
    2.36                                1, directory = "TARGETDIR")
    2.37 @@ -860,6 +864,15 @@ def add_features(db):
    2.38      testsuite = Feature(db, "Testsuite", "Test suite",
    2.39                          "Python test suite (Lib/test/)", 11,
    2.40                          parent = default_feature, attributes=2|8)
    2.41 +    # prepend_path is an additional feature which is to be off by default.
    2.42 +    # Since the default level for the above features is 1, this needs to be
    2.43 +    # at least level higher.
    2.44 +    prepend_path = Feature(db, "PrependPath", "Add python.exe to Path",
    2.45 +                        "Prepend [TARGETDIR] to the system Path variable. "
    2.46 +                        "This allows you to type 'python' into a command "
    2.47 +                        "prompt without needing the full path.", 13,
    2.48 +                        parent = default_feature, attributes=2|8,
    2.49 +                        level=2)
    2.50  
    2.51  def extract_msvcr90():
    2.52      # Find the redistributable files
    2.53 @@ -1146,6 +1159,8 @@ def add_registry(db):
    2.54                 "InstallPath"),
    2.55                ("REGISTRY.doc", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
    2.56                 "Documentation"),
    2.57 +              ("REGISTRY.path", msilib.gen_uuid(), "TARGETDIR", registry_component, None,
    2.58 +              None),
    2.59                ("REGISTRY.def", msilib.gen_uuid(), "TARGETDIR", registry_component,
    2.60                 None, None)] + tcldata)
    2.61      # See "FeatureComponents Table".
    2.62 @@ -1162,6 +1177,7 @@ def add_registry(db):
    2.63      add_data(db, "FeatureComponents",
    2.64               [(default_feature.id, "REGISTRY"),
    2.65                (htmlfiles.id, "REGISTRY.doc"),
    2.66 +              (prepend_path.id, "REGISTRY.path"),
    2.67                (ext_feature.id, "REGISTRY.def")] +
    2.68                tcldata
    2.69                )
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.