Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: dev-python/cffsubr/files/, dev-python/cffsubr/
Date: Sat, 19 Jun 2021 01:15:51
Message-Id: 1624065002.30428ee43b309fcc2edf55d3aadf74e1d552e24c.Alessandro-Barbieri@gentoo
1 commit: 30428ee43b309fcc2edf55d3aadf74e1d552e24c
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Sat Jun 19 01:10:02 2021 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Sat Jun 19 01:10:02 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=30428ee4
7
8 dev-python/cffsubr: initial import
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 dev-python/cffsubr/Manifest | 1 +
13 dev-python/cffsubr/cffsubr-0.2.8.ebuild | 39 ++++++++++++++++++++++
14 .../cffsubr/files/cffsubr-0.2.8-fix-setup-py.patch | 18 ++++++++++
15 dev-python/cffsubr/files/cffsubr-system_tx.diff | 12 +++++++
16 dev-python/cffsubr/metadata.xml | 5 +++
17 5 files changed, 75 insertions(+)
18
19 diff --git a/dev-python/cffsubr/Manifest b/dev-python/cffsubr/Manifest
20 new file mode 100644
21 index 000000000..d42a93d36
22 --- /dev/null
23 +++ b/dev-python/cffsubr/Manifest
24 @@ -0,0 +1 @@
25 +DIST cffsubr-0.2.8.tar.gz 124245 BLAKE2B fa78acf9158faf3917f194a2c30a13c2a598a7476a89dc79f95440eb04fe91663e7620729e6be1635ce1df24fff34068c42ea155abb17f016f50e961d13f52af SHA512 5f5a655168c6157799d17e20762893f23a7f7d90e739fb5bbe0a4fd895dc2b1c5359b5bdb92f4cb8333f841cd5b471359825d709f2477afd2bd7322760359d24
26
27 diff --git a/dev-python/cffsubr/cffsubr-0.2.8.ebuild b/dev-python/cffsubr/cffsubr-0.2.8.ebuild
28 new file mode 100644
29 index 000000000..d98815a40
30 --- /dev/null
31 +++ b/dev-python/cffsubr/cffsubr-0.2.8.ebuild
32 @@ -0,0 +1,39 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_8 )
39 +
40 +inherit distutils-r1
41 +
42 +SRC_URI="https://github.com/adobe-type-tools/cffsubr/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
43 +KEYWORDS="~amd64"
44 +DESCRIPTION="Standalone CFF subroutinizer based on AFDKO tx tool"
45 +HOMEPAGE="https://github.com/adobe-type-tools/cffsubr"
46 +LICENSE="Apache-2.0"
47 +SLOT="0"
48 +
49 +RDEPEND="
50 + >=dev-util/afdko-3.6.1[${PYTHON_USEDEP}]
51 +"
52 +BDEPEND="
53 + dev-python/setuptools_scm[${PYTHON_USEDEP}]
54 +"
55 +
56 +PATCHES=(
57 + "${FILESDIR}/${PN}-system_tx.diff"
58 + "${FILESDIR}/${P}-fix-setup-py.patch"
59 +)
60 +
61 +distutils_enable_tests pytest
62 +
63 +pkg_setup() {
64 + export SETUPTOOLS_SCM_PRETEND_VERSION="${PV%_*}"
65 +}
66 +
67 +src_prepare() {
68 + #no bundled afdko
69 + rm -rf external || die
70 + default
71 +}
72
73 diff --git a/dev-python/cffsubr/files/cffsubr-0.2.8-fix-setup-py.patch b/dev-python/cffsubr/files/cffsubr-0.2.8-fix-setup-py.patch
74 new file mode 100644
75 index 000000000..2d429c2b8
76 --- /dev/null
77 +++ b/dev-python/cffsubr/files/cffsubr-0.2.8-fix-setup-py.patch
78 @@ -0,0 +1,18 @@
79 +--- a/setup.py
80 ++++ b//setup.py
81 +@@ -135,7 +135,6 @@
82 + platforms=["posix", "nt"],
83 + package_dir={"": "src"},
84 + packages=find_packages("src"),
85 +- ext_modules=[tx],
86 + zip_safe=False,
87 + cmdclass=cmdclass,
88 + install_requires=[
89 +@@ -145,7 +144,6 @@
90 + setup_requires=[
91 + "setuptools_scm",
92 + # finds all git tracked files including submodules when making sdist MANIFEST
93 +- "setuptools-git-ls-files",
94 + ],
95 + extras_require={"testing": ["pytest"]},
96 + python_requires=">=3.6",
97
98 diff --git a/dev-python/cffsubr/files/cffsubr-system_tx.diff b/dev-python/cffsubr/files/cffsubr-system_tx.diff
99 new file mode 100644
100 index 000000000..16c41c74c
101 --- /dev/null
102 +++ b/dev-python/cffsubr/files/cffsubr-system_tx.diff
103 @@ -0,0 +1,12 @@
104 +--- a/src/cffsubr/__init__.py
105 ++++ b/src/cffsubr/__init__.py
106 +@@ -60,8 +60,7 @@ def _run_embedded_tx(*args, **kwargs):
107 + subprocess.CompletedProcess object with the following attributes:
108 + args, returncode, stdout, stderr.
109 + """
110 +- with path(__name__, TX_EXE) as tx_cli:
111 +- return subprocess.run([str(tx_cli)] + list(args), **kwargs)
112 ++ return subprocess.run(['tx'] + list(args), **kwargs)
113 +
114 +
115 + def _tx_subroutinize(data: bytes, output_format: str = CFFTableTag.CFF) -> bytes:
116
117 diff --git a/dev-python/cffsubr/metadata.xml b/dev-python/cffsubr/metadata.xml
118 new file mode 100644
119 index 000000000..6f49eba8f
120 --- /dev/null
121 +++ b/dev-python/cffsubr/metadata.xml
122 @@ -0,0 +1,5 @@
123 +<?xml version="1.0" encoding="UTF-8"?>
124 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
125 +<pkgmetadata>
126 +<!-- maintainer-needed -->
127 +</pkgmetadata>