diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-08-24 19:01:23 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-08-24 19:01:23 +0000 |
| commit | 510fe9ea61c267f0cd219e99af02d60079be30ea (patch) | |
| tree | cbbde275c3db3da7602149459f6ac390e79caf70 /dev-python/pycxx | |
| parent | 93c1d6a2ff9e45036853fc29609b6c391ef2f47f (diff) | |
| download | baldeagleos-repo-510fe9ea61c267f0cd219e99af02d60079be30ea.tar.gz baldeagleos-repo-510fe9ea61c267f0cd219e99af02d60079be30ea.tar.xz baldeagleos-repo-510fe9ea61c267f0cd219e99af02d60079be30ea.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pycxx')
| -rw-r--r-- | dev-python/pycxx/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/pycxx/metadata.xml | 4 | ||||
| -rw-r--r-- | dev-python/pycxx/pycxx-7.1.10.ebuild | 115 |
3 files changed, 120 insertions, 0 deletions
diff --git a/dev-python/pycxx/Manifest b/dev-python/pycxx/Manifest index 1f467aae12e4..eb42c0ed2124 100644 --- a/dev-python/pycxx/Manifest +++ b/dev-python/pycxx/Manifest @@ -1 +1,2 @@ +DIST pycxx-7.1.10.zip 242530 BLAKE2B 6d3ea6da0640ad338068b82798b1e89ba168da7cb5bbe50db987a36153e4c22fffa6e4a99ea843b12fd54e3f966c436345063c7272f19be697c1189c3c32a019 SHA512 0531144dc4ac1ecde8d1b5fae5c385f33e944ff4a3fd96cf0c307b9cb295f2c595c7593ce1a57ce5f5ded1d7491a2cc1bf1eb49f80102fb11d7861aee8341998 DIST pycxx-7.1.8.tar.gz 154789 BLAKE2B e4b635d4b53ae3fd0790d6eddcd465acfc5272213e9752e7c2a1840edddb66f09bc9617373246964859125a27dc82110de6b4f4ffa44c41c94c338c846490e47 SHA512 3c9c3a23dfa9777c6a48b8600e7336cbadb60080a1051071583d534ead6c691dd9d304613073d6fb0c632eb1703b043b4214826c0ae7bd4b2ca72203ec03c0a2 diff --git a/dev-python/pycxx/metadata.xml b/dev-python/pycxx/metadata.xml index 62110170e994..c59a337f42ca 100644 --- a/dev-python/pycxx/metadata.xml +++ b/dev-python/pycxx/metadata.xml @@ -1,6 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://liguros.gitlab.io/dtd/metadata.dtd"> <pkgmetadata> + <maintainer type="person"> + <email>gienah@gentoo.org</email> + <name>Mark Wright</name> + </maintainer> <longdescription lang="en"> PyCXX is a set of C++ facilities to make it easier to write Python extensions. The chief way in which PyCXX makes it easier to write diff --git a/dev-python/pycxx/pycxx-7.1.10.ebuild b/dev-python/pycxx/pycxx-7.1.10.ebuild new file mode 100644 index 000000000000..e3fe92a136f3 --- /dev/null +++ b/dev-python/pycxx/pycxx-7.1.10.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" + +PYTHON_COMPAT=( python3_{10..14} ) +DISTUTILS_USE_PEP517=setuptools + +inherit distutils-r1 toolchain-funcs + +DESCRIPTION="Set of facilities to extend Python with C++" +HOMEPAGE="https://cxx.sourceforge.net" +SRC_URI="https://sourceforge.net/code-snapshots/svn/c/cx/cxx/code/cxx-code-r464-trunk.zip -> ${P}.zip" + +S="${WORKDIR}"/cxx-code-r464-trunk/CXX + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="doc examples test" +RESTRICT="!test? ( test )" + +BDEPEND=" + $(python_gen_cond_dep ' + dev-python/setuptools[${PYTHON_USEDEP}] + ' 3.12) + app-arch/unzip +" + +python_prepare_all() { + rm -R Src/Python2/ || die + + # Without this, pysvn fails. + # Src/Python3/cxxextensions.c: No such file or directory + sed -e "/^#include/s:Src/::" -i Src/*.{c,cxx} || die "sed failed" + + distutils-r1_python_prepare_all +} + +python_compile() { + distutils-r1_python_compile + if use test; then + pushd Src || die + local S_SRCS="cxx_exceptions.cxx cxxextensions.c cxx_extensions.cxx cxxsupport.cxx IndirectPythonInterface.cxx" + local S_OBJS="" + for i in ${S_SRCS}; do + local S_O="${BUILD_DIR}/${i%%.c*}.o" + local c_cmd=( + $(tc-getCXX) \ + ${CPPFLAGS} ${CFLAGS} ${ASFLAGS} \ + -I"${S}" -I"${EPREFIX}/usr/include/${EPYTHON}" \ + -fPIC -c ${i} -o "${S_O}" + ) + printf '%s\n' "${c_cmd[*]}" + "${c_cmd[@]}" || die "compile test ${i} failed" + S_OBJS+="${S_O} " + done + popd || die + pushd Demo/Python3 || die + cp -p test_example.py "${BUILD_DIR}" || die + local D_SRCS="example.cxx range.cxx rangetest.cxx" + local D_OBJS="" + for i in ${D_SRCS}; do + local D_O="${BUILD_DIR}/${i%%.c*}.o" + local c_cmd=( + $(tc-getCXX) \ + ${CPPFLAGS} ${CFLAGS} ${ASFLAGS} \ + -I"${S}" -I"${S}"/Demo/Python3 -I"${EPREFIX}/usr/include/${EPYTHON}" \ + -fPIC -c ${i} -o "${D_O}" + ) + printf '%s\n' "${c_cmd[*]}" + "${c_cmd[@]}" || die "compile test ${i} failed" + S_OBJS+="${D_O} " + done + local l_example_cmd=( + $(tc-getCXX) \ + ${CPPFLAGS} ${CFLAGS} ${ASFLAGS} \ + -I$"{S}" -I"${S}"/Demo/Python3 -I$"{EPREFIX}/usr/include/${EPYTHON}" \ + -shared -fPIC -o "${BUILD_DIR}"/example.so ${S_OBJS} ${D_OBJS} -l${EPYTHON} -ldl + ) + printf '%s\n' "${l_example_cmd[*]}" + "${l_example_cmd[@]}" || die "link test example.so failed" + popd || die + fi +} + +python_test() { + pushd "${BUILD_DIR}" || die + export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${BUILD_DIR}" + local cmd=( + "${EPYTHON}" test_example.py + ) + printf '%s\n' "${cmd[*]}" + "${cmd[@]}" || die "test_example failed" + popd || die +} + +python_install() { + distutils-r1_python_install + + # Move misplaced files into place + dodir "/usr/share/${EPYTHON}" + mv "${D}/usr/CXX" "${D}/usr/share/${EPYTHON}/CXX" || die + mv "${D}/usr/include/${EPYTHON}"/{cxx,CXX} || die +} + +python_install_all() { + use doc && local HTML_DOCS=( Doc/. ) + if use examples ; then + docinto examples + dodoc -r Demo/Python3/. + docompress -x /usr/share/doc/${PF}/examples + fi + distutils-r1_python_install_all +} |
