Skip to content

Commit

Permalink
x11-fonts/py-opentype-sanitizer: Update to 9.1.0
Browse files Browse the repository at this point in the history
- Convert to USE_PYTHON=pep517
- Rename build.py to build_ext.py. Otherwise, it masks PEP517_BUILD_CMD (python -m build ...).

Changes:	https://github.com/googlefonts/ots-python/releases
  • Loading branch information
sunpoet committed Jun 5, 2023
1 parent e560add commit 6c4a339
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 24 deletions.
9 changes: 6 additions & 3 deletions x11-fonts/py-opentype-sanitizer/Makefile
@@ -1,5 +1,5 @@
PORTNAME= opentype-sanitizer
PORTVERSION= 9.0.0
PORTVERSION= 9.1.0
CATEGORIES= x11-fonts python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Expand All @@ -11,15 +11,18 @@ WWW= https://github.com/googlefonts/ots-python
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR}
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ots-sanitize:x11-fonts/ots

USES= python:3.6+
USE_PYTHON= autoplist concurrent distutils pytest
USE_PYTHON= autoplist concurrent pep517 pytest

LDFLAGS+= -lpython${PYTHON_VER}${PYTHON_ABIVER}

post-patch:
@${MV} ${WRKSRC}/build.py ${WRKSRC}/build_ext.py
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/src/python/ots/__init__.py
@${RM} -r ${WRKSRC}/src/c/

Expand Down
6 changes: 3 additions & 3 deletions x11-fonts/py-opentype-sanitizer/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1663672778
SHA256 (opentype-sanitizer-9.0.0.tar.gz) = 4b89660e166a1fe057ab1c6b63038fc48ee73e768e80e1bf982abaf7b16fa064
SIZE (opentype-sanitizer-9.0.0.tar.gz) = 162061
TIMESTAMP = 1685792192
SHA256 (opentype-sanitizer-9.1.0.tar.gz) = d5975df9e4440a299997c2fc082926ee90a33744da7d2b1ce62d98ebfa07f3c2
SIZE (opentype-sanitizer-9.1.0.tar.gz) = 159945
10 changes: 10 additions & 0 deletions x11-fonts/py-opentype-sanitizer/files/patch-pyproject.toml
@@ -0,0 +1,10 @@
--- pyproject.toml.orig 2023-05-31 23:17:56 UTC
+++ pyproject.toml
@@ -3,7 +3,5 @@ requires = [
"setuptools",
"wheel",
"setuptools_scm",
- "meson >= 0.48",
- "ninja",
]
build-backend = "setuptools.build_meta"
36 changes: 18 additions & 18 deletions x11-fonts/py-opentype-sanitizer/files/patch-setup.py
@@ -1,6 +1,6 @@
--- setup.py.orig 2019-10-09 09:44:36 UTC
--- setup.py.orig 2023-05-31 23:17:56 UTC
+++ setup.py
@@ -16,17 +16,17 @@ if sys.version_info[:2] < (3, 6):
@@ -17,19 +17,8 @@ if sys.version_info[:2] < (3, 6):
)
cmdclass = {}
Expand All @@ -9,34 +9,34 @@
-except ImportError:
- pass
-else:
+#try:
+# from wheel.bdist_wheel import bdist_wheel
+#except ImportError:
+# pass
+#else:

- class UniversalBdistWheel(bdist_wheel):
- def get_tag(self):
- return ("py2.py3", "none") + bdist_wheel.get_tag(self)[2:]
+# class UniversalBdistWheel(bdist_wheel):
+# def get_tag(self):
+# return ("py2.py3", "none") + bdist_wheel.get_tag(self)[2:]

- cmdclass["bdist_wheel"] = UniversalBdistWheel
+# cmdclass["bdist_wheel"] = UniversalBdistWheel


-
-
class Download(Command):
@@ -212,9 +212,9 @@ class CustomEggInfo(egg_info):

user_options = [
@@ -213,10 +202,6 @@ class CustomEggInfo(egg_info):
egg_info.run(self)


-cmdclass["download"] = Download
-cmdclass["build_ext"] = ExecutableBuildExt
-cmdclass["egg_info"] = CustomEggInfo
+#cmdclass["download"] = Download
+#cmdclass["build_ext"] = ExecutableBuildExt
+#cmdclass["egg_info"] = CustomEggInfo
-
build_options = []
platform_tags = get_platform().split("-")
if "macosx" in platform_tags:
@@ -227,7 +212,7 @@ if "macosx" in platform_tags:
ots_sanitize = Executable(
"ots.ots-sanitize", script="build.py", output_dir=os.path.join("build", "meson")
"ots.ots-sanitize",
- script="build.py",
+ script="build_ext.py",
options=build_options,
output_dir=os.path.join("build", "meson"),
)

0 comments on commit 6c4a339

Please sign in to comment.