dev-python/cffsubr: initial import

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2021-06-19 03:10:02 +02:00
parent dd3025146d
commit 30428ee43b
5 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST cffsubr-0.2.8.tar.gz 124245 BLAKE2B fa78acf9158faf3917f194a2c30a13c2a598a7476a89dc79f95440eb04fe91663e7620729e6be1635ce1df24fff34068c42ea155abb17f016f50e961d13f52af SHA512 5f5a655168c6157799d17e20762893f23a7f7d90e739fb5bbe0a4fd895dc2b1c5359b5bdb92f4cb8333f841cd5b471359825d709f2477afd2bd7322760359d24

View File

@@ -0,0 +1,39 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_8 )
inherit distutils-r1
SRC_URI="https://github.com/adobe-type-tools/cffsubr/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
DESCRIPTION="Standalone CFF subroutinizer based on AFDKO tx tool"
HOMEPAGE="https://github.com/adobe-type-tools/cffsubr"
LICENSE="Apache-2.0"
SLOT="0"
RDEPEND="
>=dev-util/afdko-3.6.1[${PYTHON_USEDEP}]
"
BDEPEND="
dev-python/setuptools_scm[${PYTHON_USEDEP}]
"
PATCHES=(
"${FILESDIR}/${PN}-system_tx.diff"
"${FILESDIR}/${P}-fix-setup-py.patch"
)
distutils_enable_tests pytest
pkg_setup() {
export SETUPTOOLS_SCM_PRETEND_VERSION="${PV%_*}"
}
src_prepare() {
#no bundled afdko
rm -rf external || die
default
}

View File

@@ -0,0 +1,18 @@
--- a/setup.py
+++ b//setup.py
@@ -135,7 +135,6 @@
platforms=["posix", "nt"],
package_dir={"": "src"},
packages=find_packages("src"),
- ext_modules=[tx],
zip_safe=False,
cmdclass=cmdclass,
install_requires=[
@@ -145,7 +144,6 @@
setup_requires=[
"setuptools_scm",
# finds all git tracked files including submodules when making sdist MANIFEST
- "setuptools-git-ls-files",
],
extras_require={"testing": ["pytest"]},
python_requires=">=3.6",

View File

@@ -0,0 +1,12 @@
--- a/src/cffsubr/__init__.py
+++ b/src/cffsubr/__init__.py
@@ -60,8 +60,7 @@ def _run_embedded_tx(*args, **kwargs):
subprocess.CompletedProcess object with the following attributes:
args, returncode, stdout, stderr.
"""
- with path(__name__, TX_EXE) as tx_cli:
- return subprocess.run([str(tx_cli)] + list(args), **kwargs)
+ return subprocess.run(['tx'] + list(args), **kwargs)
def _tx_subroutinize(data: bytes, output_format: str = CFFTableTag.CFF) -> bytes:

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>