|
23 | 23 | from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
|
24 | 24 | import buildtools.version as version
|
25 | 25 |
|
26 |
| -haveWheel = True |
27 |
| - |
28 | 26 | # Create a buildtools.config.Configuration object
|
29 | 27 | cfg = Config(noWxConfig=True)
|
30 | 28 | DOCS_BASE='http://docs.wxPython.org'
|
@@ -174,30 +172,28 @@ def run(self):
|
174 | 172 | # Run the default bdist_egg command
|
175 | 173 | orig_bdist_egg.run(self)
|
176 | 174 |
|
| 175 | +class wx_bdist_wheel(orig_bdist_wheel): |
| 176 | + def finalize_options(self): |
| 177 | + # Do a bit of monkey-patching to let bdist_wheel know that there |
| 178 | + # really are extension modules in this build, even though they are |
| 179 | + # not built here. |
| 180 | + def _has_ext_modules(self): |
| 181 | + return True |
| 182 | + from setuptools.dist import Distribution |
| 183 | + #Distribution.is_pure = _is_pure |
| 184 | + Distribution.has_ext_modules = _has_ext_modules |
177 | 185 |
|
178 |
| -if haveWheel: |
179 |
| - class wx_bdist_wheel(orig_bdist_wheel): |
180 |
| - def finalize_options(self): |
181 |
| - # Do a bit of monkey-patching to let bdist_wheel know that there |
182 |
| - # really are extension modules in this build, even though they are |
183 |
| - # not built here. |
184 |
| - def _has_ext_modules(self): |
185 |
| - return True |
186 |
| - from setuptools.dist import Distribution |
187 |
| - #Distribution.is_pure = _is_pure |
188 |
| - Distribution.has_ext_modules = _has_ext_modules |
189 |
| - |
190 |
| - orig_bdist_wheel.finalize_options(self) |
| 186 | + orig_bdist_wheel.finalize_options(self) |
191 | 187 |
|
192 | 188 |
|
193 |
| - def run(self): |
194 |
| - # Ensure that there is a basic library build for bdist_egg/wheel to pull from. |
195 |
| - self.run_command("build") |
| 189 | + def run(self): |
| 190 | + # Ensure that there is a basic library build for bdist_egg/wheel to pull from. |
| 191 | + self.run_command("build") |
196 | 192 |
|
197 |
| - _cleanup_symlinks(self) |
| 193 | + _cleanup_symlinks(self) |
198 | 194 |
|
199 |
| - # Run the default bdist_wheel command |
200 |
| - orig_bdist_wheel.run(self) |
| 195 | + # Run the default bdist_wheel command |
| 196 | + orig_bdist_wheel.run(self) |
201 | 197 |
|
202 | 198 |
|
203 | 199 | class wx_install(orig_install):
|
@@ -233,10 +229,8 @@ def run(self):
|
233 | 229 | 'bdist_egg' : wx_bdist_egg,
|
234 | 230 | 'install' : wx_install,
|
235 | 231 | 'sdist' : wx_sdist,
|
| 232 | + 'bdist_wheel' : wx_bdist_wheel, |
236 | 233 | }
|
237 |
| -if haveWheel: |
238 |
| - CMDCLASS['bdist_wheel'] = wx_bdist_wheel |
239 |
| - |
240 | 234 |
|
241 | 235 |
|
242 | 236 | #----------------------------------------------------------------------
|
|
0 commit comments