diff -Naur ots-python-8.2.1-original/pyproject.toml ots-python-8.2.1/pyproject.toml --- ots-python-8.2.1-original/pyproject.toml 2022-02-01 07:32:19.000000000 -0500 +++ ots-python-8.2.1/pyproject.toml 2022-02-01 09:42:56.098030034 -0500 @@ -3,7 +3,5 @@ "setuptools", "wheel", "setuptools_scm", - "meson >= 0.48", - "ninja", ] build-backend = "setuptools.build_meta" diff -Naur ots-python-8.2.1-original/setup.py ots-python-8.2.1/setup.py --- ots-python-8.2.1-original/setup.py 2022-02-01 07:32:19.000000000 -0500 +++ ots-python-8.2.1/setup.py 2022-02-01 09:43:45.757638974 -0500 @@ -2,11 +2,13 @@ from setuptools import setup, find_packages, Extension, Command from setuptools.command.build_ext import build_ext from setuptools.command.egg_info import egg_info +from setuptools.command.install import install from distutils.file_util import copy_file from distutils.dir_util import mkpath, remove_tree from distutils.util import get_platform from distutils import log import os +from pathlib import Path import sys import subprocess @@ -232,6 +234,18 @@ output_dir=os.path.join("build", "meson"), ) +# Patch for RPM; we are not building the executable after all, but installing a +# symbolic link to one in an external opentype-sanitizer package. This means we +# need to discard the already-configured custom commands, and add our own. + +class CustomInstall(install): + def run(self): + install.run(self) + (Path(self.install_purelib) / "ots" / "ots-sanitize").symlink_to( + Path(os.environ.get("BINDIR", "/usr/bin")) / "ots-sanitize") + +cmdclass = {"install": CustomInstall} + with open("README.md", "r", encoding="utf-8") as readme: long_description = readme.read() @@ -248,7 +262,7 @@ platforms=["posix", "nt"], package_dir={"": "src/python"}, packages=find_packages("src/python"), - ext_modules=[ots_sanitize], + package_data={"ots": ["ots-sanitize"]}, zip_safe=False, cmdclass=cmdclass, setup_requires=["setuptools_scm"],