Merge pull request #2603 from komoto48g/py312-warn
Some checks are pending
ci-build / build-source-dist (push) Waiting to run
ci-build / build-wheels (x64, macos-13, 3.10) (push) Blocked by required conditions
ci-build / build-wheels (x64, macos-13, 3.11) (push) Blocked by required conditions
ci-build / build-wheels (x64, macos-13, 3.12) (push) Blocked by required conditions
ci-build / build-wheels (x64, macos-13, 3.13-dev) (push) Blocked by required conditions
ci-build / build-wheels (x64, macos-13, 3.8) (push) Blocked by required conditions
ci-build / build-wheels (x64, macos-13, 3.9) (push) Blocked by required conditions
ci-build / build-wheels (x64, ubuntu-22.04, 3.10) (push) Blocked by required conditions
ci-build / build-wheels (x64, ubuntu-22.04, 3.11) (push) Blocked by required conditions
ci-build / build-wheels (x64, ubuntu-22.04, 3.12) (push) Blocked by required conditions
ci-build / build-wheels (x64, ubuntu-22.04, 3.13-dev) (push) Blocked by required conditions
ci-build / build-wheels (x64, ubuntu-22.04, 3.8) (push) Blocked by required conditions
ci-build / build-wheels (x64, ubuntu-22.04, 3.9) (push) Blocked by required conditions
ci-build / build-wheels (x64, windows-2022, 3.10) (push) Blocked by required conditions
ci-build / build-wheels (x64, windows-2022, 3.11) (push) Blocked by required conditions
ci-build / build-wheels (x64, windows-2022, 3.12) (push) Blocked by required conditions
ci-build / build-wheels (x64, windows-2022, 3.13-dev) (push) Blocked by required conditions
ci-build / build-wheels (x64, windows-2022, 3.8) (push) Blocked by required conditions
ci-build / build-wheels (x64, windows-2022, 3.9) (push) Blocked by required conditions
ci-build / build-wheels (x86, windows-2022, 3.10) (push) Blocked by required conditions
ci-build / build-wheels (x86, windows-2022, 3.11) (push) Blocked by required conditions
ci-build / build-wheels (x86, windows-2022, 3.12) (push) Blocked by required conditions
ci-build / build-wheels (x86, windows-2022, 3.13-dev) (push) Blocked by required conditions
ci-build / build-wheels (x86, windows-2022, 3.8) (push) Blocked by required conditions
ci-build / build-wheels (x86, windows-2022, 3.9) (push) Blocked by required conditions
ci-build / Build wxPython documentation (push) Waiting to run
ci-build / Publish Python distribution to PyPI (push) Blocked by required conditions
ci-build / Create GitHub Release and upload source (push) Blocked by required conditions
ci-build / Upload wheels to snapshot-builds on wxpython.org (push) Blocked by required conditions

DeprecationWarning due to distutils
This commit is contained in:
Scott Talbert
2024-09-12 20:42:48 -04:00
committed by GitHub
3 changed files with 33 additions and 23 deletions

View File

@@ -40,8 +40,11 @@ try:
except ImportError:
from buildtools.backports.shutil_which import which
try:
from setuptools.modified import newer, newer_group
except ImportError:
from distutils.dep_util import newer, newer_group
from distutils.dep_util import newer, newer_group
from buildtools.config import Config, msg, opj, posixjoin, loadETG, etg2sip, findCmd, \
phoenixDir, wxDir, copyIfNewer, copyFile, \
macSetLoaderNames, \

View File

@@ -23,7 +23,10 @@ import platform
from distutils.file_util import copy_file
from distutils.dir_util import mkpath
from distutils.dep_util import newer
try:
from setuptools.modified import newer
except ImportError:
from distutils.dep_util import newer
import distutils.sysconfig
@@ -907,29 +910,29 @@ def runcmd(cmd, getOutput=False, echoCmd=True, fatal=True, onError=None):
otherKwArgs = dict(stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
sp = subprocess.Popen(cmd, shell=True, env=os.environ, **otherKwArgs)
with subprocess.Popen(cmd, shell=True, env=os.environ, **otherKwArgs) as sp:
output = None
if getOutput:
outputEncoding = 'cp1252' if sys.platform == 'win32' else 'utf-8'
output = sp.stdout.read()
if sys.version_info > (3,):
output = output.decode(outputEncoding)
output = output.rstrip()
rval = sp.wait()
if rval:
# Failed!
#raise subprocess.CalledProcessError(rval, cmd)
print("Command '%s' failed with exit code %d." % (cmd, rval))
output = None
if getOutput:
print(output)
if onError is not None:
onError()
if fatal:
sys.exit(rval)
outputEncoding = 'cp1252' if sys.platform == 'win32' else 'utf-8'
output = sp.stdout.read()
if sys.version_info > (3,):
output = output.decode(outputEncoding)
output = output.rstrip()
return output
rval = sp.wait()
if rval:
# Failed!
#raise subprocess.CalledProcessError(rval, cmd)
print("Command '%s' failed with exit code %d." % (cmd, rval))
if getOutput:
print(output)
if onError is not None:
onError()
if fatal:
sys.exit(rval)
return output
def myExecfile(filename, ns):

View File

@@ -18,7 +18,11 @@ import distutils.command.install_data
import distutils.command.install_headers
import distutils.command.clean
from distutils.dep_util import newer, newer_group
try:
from setuptools.modified import newer, newer_group
except ImportError:
from distutils.dep_util import newer, newer_group
from distutils import log
from .config import Config, posixjoin, loadETG, etg2sip