Ticket #1074: zetuptoolz-dont-write-script-exe.2.dpatch

File zetuptoolz-dont-write-script-exe.2.dpatch, 6.6 KB (added by davidsarah, at 2010-07-10T22:32:04Z)

zetuptoolz: don't write .exe files for scripts (fixed version)

Line 
1Sat Jul 10 23:17:58 GMT Daylight Time 2010  david-sarah@jacaranda.org
2  * zetuptoolz: don't write .exe files for scripts
3
4New patches:
5
6[zetuptoolz: don't write .exe files for scripts
7david-sarah@jacaranda.org**20100710221758
8 Ignore-this: c2762c4602968ff86d1040ee18f8d5c9
9] {
10hunk ./setuptools-0.6c15dev.egg/setuptools/command/easy_install.py 576
11 
12     def install_wrapper_scripts(self, dist):
13         if not self.exclude_scripts:
14-            for args in get_script_args(dist):
15+            for args in get_script_args(dist, script_dir=self.script_dir):
16                 self.write_script(*args)
17 
18 
19hunk ./setuptools-0.6c15dev.egg/setuptools/command/easy_install.py 1567
20     return executable
21 
22 
23-def get_script_args(dist, executable=sys_executable, wininst=False):
24+def get_script_args(dist, executable=sys_executable, wininst=False, script_dir=None):
25     """Yield write_script() argument tuples for a distribution's entrypoints"""
26     spec = str(dist.as_requirement())
27     header = get_script_header("", executable, wininst)
28hunk ./setuptools-0.6c15dev.egg/setuptools/command/easy_install.py 1584
29                 ")\n"
30             ) % locals()
31             if sys.platform=='win32' or wininst:
32-                # On Windows/wininst, add a .py extension and an .exe launcher
33+                # On Windows/wininst, add a .py extension.
34                 if group=='gui_scripts':
35hunk ./setuptools-0.6c15dev.egg/setuptools/command/easy_install.py 1586
36-                    ext, launcher = '-script.pyw', 'gui.exe'
37+                    ext = '.pyw'
38                     old = ['.pyw']
39                     new_header = re.sub('(?i)python.exe','pythonw.exe',header)
40                 else:
41hunk ./setuptools-0.6c15dev.egg/setuptools/command/easy_install.py 1590
42-                    ext, launcher = '-script.py', 'cli.exe'
43+                    ext = '.py'
44                     old = ['.py','.pyc','.pyo']
45                     new_header = re.sub('(?i)pythonw.exe','python.exe',header)
46 
47hunk ./setuptools-0.6c15dev.egg/setuptools/command/easy_install.py 1599
48                 else:
49                     hdr = header
50                 yield (name+ext, hdr+script_text, 't', [name+x for x in old])
51-                yield (
52-                    name+'.exe', resource_string('setuptools', launcher),
53-                    'b') # write in binary mode
54-                yield (name+'.exe.manifest', _launcher_manifest % (name,), 't')
55+
56+                # If there is already an .exe launcher from a previous install,
57+                # also rewrite the -script.py[w].
58+                if script_dir and os.path.exists(os.path.join(script_dir, name+'.exe')):
59+                    yield (name+'-script'+ext, hdr+script_text, 't')
60             else:
61                 # On other platforms, we assume the right thing to do is to
62                 # just write the stub with no extension.
63hunk ./setuptools-0.6c15dev.egg/setuptools/command/easy_install.py 1609
64                 yield (name, header+script_text)
65 
66-_launcher_manifest = """
67-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
68-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
69- <assemblyIdentity version="1.0.0.0"
70- processorArchitecture="X86"
71- name="%s.exe"
72- type="win32"/>
73-
74- <!-- Identify the application security requirements. -->
75- <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
76- <security>
77- <requestedPrivileges>
78- <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
79- </requestedPrivileges>
80- </security>
81- </trustInfo>
82-</assembly>"""
83-
84-
85-
86-
87-
88-
89-
90-
91-
92-
93-
94-
95-
96-
97-
98-
99-
100-
101-
102-
103-
104-
105-
106 
107 def rmtree(path, ignore_errors=False, onerror=auto_chmod):
108     """Recursively delete a directory tree.
109}
110
111Context:
112
113[upcase_since_on_welcome
114terrellrussell@gmail.com**20100708193903] 
115[server_version_on_welcome_page.dpatch.txt
116freestorm77@gmail.com**20100605191721
117 Ignore-this: b450c76dc875f5ac8cca229a666cbd0a
118 
119 
120 - The storage server version is 0 for all storage nodes in the Welcome Page
121 
122 
123] 
124[NEWS: add NEWS snippets about two recent patches
125zooko@zooko.com**20100708162058
126 Ignore-this: 6c9da6a0ad7351a960bdd60f81532899
127] 
128[directory_html_top_banner.dpatch
129freestorm77@gmail.com**20100622205301
130 Ignore-this: 1d770d975e0c414c996564774f049bca
131 
132 The div tag with the link "Return to Welcome page" on the directory.xhtml page is not correct
133 
134] 
135[tahoe_css_toolbar.dpatch
136freestorm77@gmail.com**20100622210046
137 Ignore-this: 5b3ebb2e0f52bbba718a932f80c246c0
138 
139 CSS modification to be correctly diplayed with Internet Explorer 8
140 
141 The links on the top of page directory.xhtml are not diplayed in the same line as display with Firefox.
142 
143] 
144[runnin_test_tahoe_css.dpatch
145freestorm77@gmail.com**20100622214714
146 Ignore-this: e0db73d68740aad09a7b9ae60a08c05c
147 
148 Runnin test for changes in tahoe.css file
149 
150] 
151[runnin_test_directory_xhtml.dpatch
152freestorm77@gmail.com**20100622201403
153 Ignore-this: f8962463fce50b9466405cb59fe11d43
154 
155 Runnin test for diretory.xhtml top banner
156 
157] 
158[stringutils.py: tolerate sys.stdout having no 'encoding' attribute.
159david-sarah@jacaranda.org**20100626040817
160 Ignore-this: f42cad81cef645ee38ac1df4660cc850
161] 
162[quickstart.html: python 2.5 -> 2.6 as recommended version
163david-sarah@jacaranda.org**20100705175858
164 Ignore-this: bc3a14645ea1d5435002966ae903199f
165] 
166[SFTP: don't call .stopProducing on the producer registered with OverwriteableFileConsumer (which breaks with warner's new downloader).
167david-sarah@jacaranda.org**20100628231926
168 Ignore-this: 131b7a5787bc85a9a356b5740d9d996f
169] 
170[docs/how_to_make_a_tahoe-lafs_release.txt: trivial correction, install.html should now be quickstart.html.
171david-sarah@jacaranda.org**20100625223929
172 Ignore-this: 99a5459cac51bd867cc11ad06927ff30
173] 
174[setup: in the Makefile, refuse to upload tarballs unless someone has passed the environment variable "BB_BRANCH" with value "trunk"
175zooko@zooko.com**20100619034928
176 Ignore-this: 276ddf9b6ad7ec79e27474862e0f7d6
177] 
178[trivial: tiny update to in-line comment
179zooko@zooko.com**20100614045715
180 Ignore-this: 10851b0ed2abfed542c97749e5d280bc
181 (I'm actually committing this patch as a test of the new eager-annotation-computation of trac-darcs.)
182] 
183[docs: about.html link to home page early on, and be decentralized storage instead of cloud storage this time around
184zooko@zooko.com**20100619065318
185 Ignore-this: dc6db03f696e5b6d2848699e754d8053
186] 
187[docs: update about.html, especially to have a non-broken link to quickstart.html, and also to comment out the broken links to "for Paranoids" and "for Corporates"
188zooko@zooko.com**20100619065124
189 Ignore-this: e292c7f51c337a84ebfeb366fbd24d6c
190] 
191[TAG allmydata-tahoe-1.7.0
192zooko@zooko.com**20100619052631
193 Ignore-this: d21e27afe6d85e2e3ba6a3292ba2be1
194] 
195Patch bundle hash:
196ef3c4a6a5315001d2d22e9232d9eee1dcc835753