dev-python/pysimdjson: Remove old

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2024-02-26 15:12:33 +01:00
parent acb532e01b
commit 2286793594
4 changed files with 0 additions and 145 deletions

View File

@@ -1,2 +1 @@
DIST pysimdjson-5.0.2.gh.tar.gz 3828487 BLAKE2B 6197fa9adaa353df82def9f56f821e8b7f9ec955769e9ac28d990542fc0661f3afbe9cd8f7abfc55cdce8eac94c0e5fc78dba9102c7dcfc4e3c4307d0a6fc5bf SHA512 bd7ba4d6f95967f3cd086077406a2c65b895016c9baf16fa9be6dbf77d31487ad5c40e9e3dd2496070605ef37c6a1dc75f3c1b4c96ddc8465132fbcdbde77fd3
DIST pysimdjson-6.0.2.gh.tar.gz 4493696 BLAKE2B 18f107fa5db762813e90dbf788d54ee24f823e177d2529f5311ef2b35320a45fd698ef6f8863c45ffad96c116ad5240eaf5a6724a3030578f89111cc40f24897 SHA512 ef8856dd137780a4345539b1604af34757b58a4b4d11854e420ad2e855f3e3f251b2ba6296c04d1bf2b71f095ca95fe95e9076e8740e98c7c4404a57df3617ba

View File

@@ -1,72 +0,0 @@
diff --git a/setup.py b/setup.py
index 865544d..24fdc36 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
import os.path
import platform
+import itertools
from setuptools import setup, find_packages, Extension
@@ -17,11 +18,18 @@ with open(os.path.join(root, 'README.md'), 'rb') as readme:
system = platform.system()
+libraries = []
+extra_sources = []
extra_compile_args = []
if system == 'Darwin':
extra_compile_args.append('-std=c++11')
+if os.getenv('BUILD_WITH_SYSTEM_LIB'):
+ libraries.append('simdjson')
+else:
+ extra_sources.append('simdjson/simdjson.cpp')
+
if os.getenv('BUILD_WITH_CYTHON') and not CYTHON_AVAILABLE:
print(
'BUILD_WITH_CYTHON environment variable is set, but cython'
@@ -49,12 +57,15 @@ if os.getenv('BUILD_WITH_CYTHON') and CYTHON_AVAILABLE:
extensions = cythonize([
Extension(
'csimdjson',
- [
- 'simdjson/simdjson.cpp',
- 'simdjson/util.cpp',
- 'simdjson/csimdjson.pyx'
- ],
+ list(itertools.chain(
+ [
+ 'simdjson/util.cpp',
+ 'simdjson/csimdjson.pyx'
+ ],
+ extra_sources
+ )),
define_macros=macros,
+ libraries=libraries,
extra_compile_args=extra_compile_args
)
], compiler_directives=compiler_directives, force=force)
@@ -62,12 +73,15 @@ else:
extensions = [
Extension(
'csimdjson',
- [
- 'simdjson/simdjson.cpp',
- 'simdjson/util.cpp',
- 'simdjson/csimdjson.cpp'
- ],
+ list(itertools.chain(
+ [
+ 'simdjson/util.cpp',
+ 'simdjson/csimdjson.cpp'
+ ],
+ extra_sources
+ )),
extra_compile_args=extra_compile_args,
+ libraries=libraries,
language='c++'
)
]

View File

@@ -1,13 +0,0 @@
diff --git a/simdjson/csimdjson.pyx b/simdjson/csimdjson.pyx
index 57c5f35..91182fc 100644
--- a/simdjson/csimdjson.pyx
+++ b/simdjson/csimdjson.pyx
@@ -480,7 +480,7 @@ cdef class Parser:
# a stride in the next step will cause a (potentially
# confusing) IndexError. This isn't a very good error message,
# but it's identical to the one simdjson would have raised.
- raise ValueError('Empty: no JSON found')
+ raise ValueError('EMPTY: no JSON found')
return element_to_primitive(
self,

View File

@@ -1,59 +0,0 @@
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_EXT=1
inherit distutils-r1
DESCRIPTION="Python bindings for simdjson"
HOMEPAGE="
https://github.com/TkTech/pysimdjson/
https://pypi.org/project/pysimdjson/
"
SRC_URI="
https://github.com/TkTech/${PN}/archive/v${PV}.tar.gz
-> ${P}.gh.tar.gz
"
LICENSE="MIT Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="
>=dev-libs/simdjson-2.0.1:=
test? ( dev-libs/simdjson[all-impls(-)] )
"
RDEPEND="
${DEPEND}
"
BDEPEND="
dev-python/cython[${PYTHON_USEDEP}]
"
PATCHES=(
"${FILESDIR}/pysimdjson-5.0.2-system-lib.patch"
"${FILESDIR}/pysimdjson-5.0.2-tests.patch"
)
distutils_enable_tests pytest
src_prepare() {
# benchmarks aren't run
sed -i -e 's:pytest-benchmark:: ; /license_file/ d' setup.cfg || die
# force regen
rm simdjson/csimdjson.cpp || die
# unbundle
> simdjson/simdjson.cpp || die
echo "#include_next <simdjson.h>" > simdjson/simdjson.h || die
distutils-r1_src_prepare
export BUILD_WITH_CYTHON=1 BUILD_WITH_SYSTEM_LIB=1
}
python_compile() {
distutils-r1_python_compile --libraries simdjson
}