# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/mypaint/hotfix-distutils.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- mypaint-2.0.1/setup.py.vanilla 2024-04-30 14:41:38.795000000 +0200 +++ mypaint-2.0.1/setup.py 2024-04-30 14:42:41.044000000 +0200 @@ -14,8 +14,8 @@ import tempfile import shutil -from distutils.command.build import build -from distutils.command.clean import clean +from setuptools.command.build import build +#from setuptools.command.clean import clean from setuptools import setup from setuptools import Extension @@ -495,22 +495,6 @@ install.run(self) -class Clean (clean): - """Custom clean: also remove swig-generated wrappers. - - distutils's clean has always left these lying around in the source, - and they're a perpetual trip hazard when sharing the same source - tree with a Windows VM. - - """ - - def run(self): - build_temp_files = glob.glob("lib/mypaintlib_wrap.c*") - for file in build_temp_files: - self.announce("removing %r" % (file,), level=2) - os.unlink(file) - return clean.run(self) - class Demo (Command): """Builds, then do a test run from a temporary install tree""" @@ -1000,7 +984,6 @@ "managed_install": ManagedInstall, "managed_uninstall": ManagedUninstall, "install_scripts": InstallScripts, - "clean": Clean, }, scripts=[ "mypaint.py", --- mypaint-2.0.1/setup.py.vanilla 2024-04-30 14:47:58.746000000 +0200 +++ mypaint-2.0.1/setup.py 2024-04-30 14:48:10.117000000 +0200 @@ -616,7 +616,7 @@ self.announce("installing %s as %s" % (src, targ_basename), level=2) if self.dry_run: return [] - with open(src, "rU") as in_fp: + with open(src, "r") as in_fp: with open(targ, "w") as out_fp: line = in_fp.readline().rstrip() if line.startswith("#!"):