From f8c85711c95cb3398b2a0ae3aeb3100cbf454cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 8 Feb 2025 03:49:20 +0000 Subject: [PATCH 1/2] Remove haveWheel condition in setup.py Remove wheel devel dependency --- requirements/devel.txt | 1 - setup.py | 42 ++++++++++++++++++------------------------ 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/requirements/devel.txt b/requirements/devel.txt index 90bd3692..d23ccd05 100644 --- a/requirements/devel.txt +++ b/requirements/devel.txt @@ -4,7 +4,6 @@ appdirs setuptools sip == 6.9.1 -wheel twine requests >= 2.26.0 cython==3.0.10 diff --git a/setup.py b/setup.py index 5d9c1c3c..27cc6691 100644 --- a/setup.py +++ b/setup.py @@ -23,8 +23,6 @@ from setuptools.command.bdist_wheel import bdist_wheel as orig_bdist_wheel from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName import buildtools.version as version -haveWheel = True - # Create a buildtools.config.Configuration object cfg = Config(noWxConfig=True) DOCS_BASE='http://docs.wxPython.org' @@ -174,30 +172,28 @@ class wx_bdist_egg(orig_bdist_egg): # Run the default bdist_egg command orig_bdist_egg.run(self) +class wx_bdist_wheel(orig_bdist_wheel): + def finalize_options(self): + # Do a bit of monkey-patching to let bdist_wheel know that there + # really are extension modules in this build, even though they are + # not built here. + def _has_ext_modules(self): + return True + from setuptools.dist import Distribution + #Distribution.is_pure = _is_pure + Distribution.has_ext_modules = _has_ext_modules -if haveWheel: - class wx_bdist_wheel(orig_bdist_wheel): - def finalize_options(self): - # Do a bit of monkey-patching to let bdist_wheel know that there - # really are extension modules in this build, even though they are - # not built here. - def _has_ext_modules(self): - return True - from setuptools.dist import Distribution - #Distribution.is_pure = _is_pure - Distribution.has_ext_modules = _has_ext_modules - - orig_bdist_wheel.finalize_options(self) + orig_bdist_wheel.finalize_options(self) - def run(self): - # Ensure that there is a basic library build for bdist_egg/wheel to pull from. - self.run_command("build") + def run(self): + # Ensure that there is a basic library build for bdist_egg/wheel to pull from. + self.run_command("build") - _cleanup_symlinks(self) + _cleanup_symlinks(self) - # Run the default bdist_wheel command - orig_bdist_wheel.run(self) + # Run the default bdist_wheel command + orig_bdist_wheel.run(self) class wx_install(orig_install): @@ -233,10 +229,8 @@ CMDCLASS = { 'bdist_egg' : wx_bdist_egg, 'install' : wx_install, 'sdist' : wx_sdist, + 'bdist_wheel' : wx_bdist_wheel, } -if haveWheel: - CMDCLASS['bdist_wheel'] = wx_bdist_wheel - #---------------------------------------------------------------------- From f32b3dd28933b2c2aa9420b5987914bd11536a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sat, 8 Feb 2025 14:32:55 +0000 Subject: [PATCH 2/2] Remove references to Python 2.7 defaults from build.py --- build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index d82b94b1..e75de097 100755 --- a/build.py +++ b/build.py @@ -48,8 +48,8 @@ import buildtools.version as version # defaults -PYVER = '2.7' -PYSHORTVER = '27' +PYVER = '3.9' +PYSHORTVER = '39' PYTHON = None # it will be set later PYTHON_ARCH = 'UNKNOWN' @@ -106,7 +106,7 @@ Usage: ./build.py [command(s)] [options] Commands: N.N NN Major.Minor version number of the Python to use to run - the other commands. Default is 2.7. Or you can use + the other commands. Default is 3.9. Or you can use --python to specify the actual Python executable to use. dox Run Doxygen to produce the XML file used by ETG scripts