From: Romain Porte <debian@microjoe.org>
Date: Sun, 31 Jan 2021 12:04:31 +0100
Subject: Use system ots-sanitize instead of building it from scratch

This package is designed to manually clone and compile the ots-sanitize
program. Since the "opentype-sanitizer" package in Debian already
provides the required binary, source files are modified use the system
binary instead. MANIFEST.in has been cleaned to avoid warnings from
appearing during the build of the package.

We consider that upstream building the binary from scratch is legit, and
thus this patch is not considered to be upstreamed.
---
 MANIFEST.in                | 4 ----
 setup.py                   | 2 --
 src/python/ots/__init__.py | 2 +-
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in
index aaba283..e69de29 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +0,0 @@
-recursive-include src/c/ots *
-prune src/c/ots/tests/fonts
-prune src/c/ots/third_party/brotli/tests/testdata
-prune src/c/ots/third_party/woff2/brotli/tests/testdata
diff --git a/setup.py b/setup.py
index feebcf9..a9719f4 100755
--- a/setup.py
+++ b/setup.py
@@ -236,9 +236,7 @@ setup(
     platforms=["posix", "nt"],
     package_dir={"": "src/python"},
     packages=find_packages("src/python"),
-    ext_modules=[ots_sanitize],
     zip_safe=False,
-    cmdclass=cmdclass,
     setup_requires=["setuptools_scm"],
     extras_require={"testing": ["pytest"]},
     classifiers=[
diff --git a/src/python/ots/__init__.py b/src/python/ots/__init__.py
index 5fc1724..7f24ca4 100644
--- a/src/python/ots/__init__.py
+++ b/src/python/ots/__init__.py
@@ -3,7 +3,7 @@ import subprocess
 import sys
 import os
 
-OTS_SANITIZE = os.path.join(os.path.dirname(__file__), "ots-sanitize")
+OTS_SANITIZE = "ots-sanitize"
 
 __all__ = ["sanitize", "OTSError", "CalledProcessError"]
 
