diff options
| author | root <root@alpha.trunkmasters.com> | 2026-07-30 03:04:49 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-07-30 03:04:49 -0500 |
| commit | 0fb86e044f244e00302b1878b3e15e0db0e4b7e5 (patch) | |
| tree | 01eeaaaafa24d9c759103aa30b91c5999ae52a1d /dev-python/pyroaring | |
| parent | 8087a9548fbac1dade3245660600d025f43d6732 (diff) | |
| download | baldeagleos-repo-0fb86e044f244e00302b1878b3e15e0db0e4b7e5.tar.gz baldeagleos-repo-0fb86e044f244e00302b1878b3e15e0db0e4b7e5.tar.xz baldeagleos-repo-0fb86e044f244e00302b1878b3e15e0db0e4b7e5.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pyroaring')
4 files changed, 149 insertions, 0 deletions
diff --git a/dev-python/pyroaring/Manifest b/dev-python/pyroaring/Manifest new file mode 100644 index 000000000000..4761ad3562c7 --- /dev/null +++ b/dev-python/pyroaring/Manifest @@ -0,0 +1 @@ +DIST pyroaring-1.1.0.tar.gz 217093 BLAKE2B 1e26acb0b464e17e7ee4e77558045233d63429b2fb2f0f1878f2e6e9eb9b1697589e7318c034347c2d07e9fe58c0e87c27885e440ab3bd89377edea04cda6466 SHA512 b125a48e124b57c1be7cec55cdf84afde8333712b3b96d64f4a0e6b86d909b275a1a9be7f5ca269d062b5774e43c301e2542fd2444ecb2496eea94b5801158f9 diff --git a/dev-python/pyroaring/files/pyroaring-1.1.0-Link-against-system-CRoaring-rather-than-vendor-copy.patch b/dev-python/pyroaring/files/pyroaring-1.1.0-Link-against-system-CRoaring-rather-than-vendor-copy.patch new file mode 100644 index 000000000000..0b925d653815 --- /dev/null +++ b/dev-python/pyroaring/files/pyroaring-1.1.0-Link-against-system-CRoaring-rather-than-vendor-copy.patch @@ -0,0 +1,71 @@ +https://salsa.debian.org/tti0/python3-pyroaring/-/blob/debian/latest/debian/patches/0001-Link-against-system-CRoaring-rather-than-vendor-copy.patch + +From 1092a1ea9bc5ae6d185a00a9949dbf1cb8b84499 Mon Sep 17 00:00:00 2001 +From: Theodore Tucker <theodore@tti0.net> +Date: Tue, 17 Mar 2026 16:55:38 +0000 +Subject: [PATCH] Link against system CRoaring rather than vendor copy +Forwarded: not-needed + +--- a/setup.py ++++ b/setup.py +@@ -33,54 +33,19 @@ except (IOError, ImportError, RuntimeError): + print('Could not generate long description.') + long_description = '' + +- +-if PLATFORM_WINDOWS: +- # MSVC defaults to C++14, so no explicit C++ standard flag is needed. +- # roaring.c requires C11 for features like alignof and _Static_assert. +- ext_compile_args = [] +- c_compile_args = ['/std:c11'] +-else: +- c_compile_args = ['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D _GLIBCXX_ASSERTIONS'] +- if PLATFORM_MACOSX: +- c_compile_args.append('-mmacosx-version-min=10.14') +- if 'DEBUG' in os.environ: +- c_compile_args.extend(['-O0', '-g']) +- else: +- c_compile_args.append('-O3') +- if 'ARCHI' in os.environ: +- if os.environ['ARCHI'] != "generic": +- c_compile_args.append('-march=%s' % os.environ['ARCHI']) +- # The '-march=native' flag is not universally allowed. In particular, it +- # will systematically fail on aarch64 systems (like the new Apple M1 systems). It +- # also creates troubles under macOS with pip installs and requires ugly workarounds. +- # The best way to handle people who want to use -march=native is to ask them +- # to pass ARCHI=native to their build process. +- # else: +- # c_compile_args.append('-march=native') +- ext_compile_args = c_compile_args + ['-std=c++11'] +- c_compile_args = c_compile_args + ['-std=c11'] ++compile_args = ['-D__STDC_LIMIT_MACROS', '-D__STDC_CONSTANT_MACROS', '-D _GLIBCXX_ASSERTIONS'] + + pyroaring_module = Extension( + 'pyroaring', + sources=[os.path.join(PKG_DIR, 'pyroaring.pyx')], +- extra_compile_args=ext_compile_args, ++ extra_compile_args=compile_args + ["-std=c++11"], + language='c++', ++ libraries=['roaring'], + ) + +-# roaring.c is compiled as a separate static library because it must be compiled +-# as C (not C++), with a C11 standard flag. +-libraries = [( +- 'croaring', +- { +- 'sources': [os.path.join(PKG_DIR, 'roaring.c')], +- 'cflags': c_compile_args, +- }, +-)] +- + setup( + name='pyroaring', + ext_modules=[pyroaring_module], +- libraries=libraries, + package_data={'pyroaring': ['py.typed', '__init__.pyi']}, + packages=['pyroaring'], + version=VERSION, +-- +2.47.3 + diff --git a/dev-python/pyroaring/metadata.xml b/dev-python/pyroaring/metadata.xml new file mode 100644 index 000000000000..55972d60ad61 --- /dev/null +++ b/dev-python/pyroaring/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>zyx@envs.net</email> + <name>zyxhereðŸ’</name> + </maintainer> + <longdescription> + An efficient and light-weight ordered set of integers. This is a Python + wrapper for the C library CRoaring. + </longdescription> + <origin>baldeagleos-repo</origin> +</pkgmetadata> diff --git a/dev-python/pyroaring/pyroaring-1.1.0.ebuild b/dev-python/pyroaring/pyroaring-1.1.0.ebuild new file mode 100644 index 000000000000..f9ccc5f65c53 --- /dev/null +++ b/dev-python/pyroaring/pyroaring-1.1.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 flag-o-matic + +DESCRIPTION="Python wrapper for the C library CRoaring" +HOMEPAGE="https://github.com/Ezibenroc/PyRoaringBitMap" +# tests not included in pypi tarballs +SRC_URI=" + https://github.com/Ezibenroc/PyRoaringBitMap/archive/refs/tags/${PV}.tar.gz + -> ${P}.tar.gz +" + +S="${WORKDIR}/PyRoaringBitMap-${PV}" + +LICENSE="MIT" +SLOT=0 +KEYWORDS="~amd64" + +DEPEND=" + dev-libs/croaring +" + +RDEPEND="${DEPEND} +" + +BDEPEND=" + dev-python/cython[${PYTHON_USEDEP}] + virtual/pkgconfig + test? ( dev-python/hypothesis[${PYTHON_USEDEP}] ) +" + +PATCHES=( + "${FILESDIR}"/${P}-Link-against-system-CRoaring-rather-than-vendor-copy.patch +) + +EPYTEST_PLUGINS=( +) + +distutils_enable_tests pytest + +src_prepare() { + # make sure we are not bundling croaring + rm ${PN}/roaring.{c,h} || die + + distutils-r1_src_prepare +} + +src_configure() { + # fatal error: roaring.h: No such file or directory + append-cppflags $(pkg-config --cflags roaring) + + distutils-r1_src_configure +} + +python_test() { + epytest test.py +} |
