push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
From 6ba3b97253cf540fdf4b36672f290def72386096 Mon Sep 17 00:00:00 2001
From: Dan Callaghan <djc@djc.id.au>
Date: Sun, 23 Apr 2023 21:26:53 +1000
Subject: [PATCH] use packaged ots
diff --git a/setup.py b/setup.py
index 6c3ccae..ca021da 100755
--- a/setup.py
+++ b/setup.py
@@ -248,7 +248,6 @@ def run(self):
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"],
diff --git a/src/python/ots/__init__.py b/src/python/ots/__init__.py
index 5fc1724..db9d21e 100644
--- a/src/python/ots/__init__.py
+++ b/src/python/ots/__init__.py
@@ -3,7 +3,7 @@
import sys
import os
-OTS_SANITIZE = os.path.join(os.path.dirname(__file__), "ots-sanitize")
+OTS_SANITIZE = "@ots_sanitize@"
__all__ = ["sanitize", "OTSError", "CalledProcessError"]
--
2.38.4

View File

@@ -0,0 +1,42 @@
{
lib,
buildPythonPackage,
fetchPypi,
replaceVars,
opentype-sanitizer,
setuptools-scm,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "ots-python";
version = "9.1.0";
format = "setuptools";
src = fetchPypi {
pname = "opentype-sanitizer";
inherit version;
hash = "sha256-1Zdd+eRECimZl8L8CCkm7pCjN0TafSsc5i2Y6/oH88I=";
};
patches = [
# Invoke ots-sanitize from the opentype-sanitizer package instead of
# downloading precompiled binaries from the internet.
# (nixpkgs-specific, not upstreamable)
(replaceVars ./0001-use-packaged-ots.patch {
ots_sanitize = "${opentype-sanitizer}/bin/ots-sanitize";
})
];
propagatedBuildInputs = [ opentype-sanitizer ];
nativeBuildInputs = [ setuptools-scm ];
nativeCheckInputs = [ pytestCheckHook ];
meta = with lib; {
description = "Python wrapper for ots (OpenType Sanitizer)";
homepage = "https://github.com/googlefonts/ots-python";
license = licenses.bsd3;
maintainers = with maintainers; [ danc86 ];
};
}