aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-09-27 18:00:42 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-09-27 18:47:30 +0200
commit9e42e072351e534f17b942ddcba0489f2cb9a1cf (patch)
tree7997ee4ce364e500477ff66aa16d2d8afb4371cb
parentdev-python/oslo-db: add 11.0.0, drop 8.4.0 (diff)
downloadguru-9e42e072.tar.gz
guru-9e42e072.tar.bz2
guru-9e42e072.zip
dev-python/fastavro: initial import
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
-rw-r--r--dev-python/fastavro/Manifest1
-rw-r--r--dev-python/fastavro/fastavro-1.4.5.ebuild35
-rw-r--r--dev-python/fastavro/metadata.xml16
3 files changed, 52 insertions, 0 deletions
diff --git a/dev-python/fastavro/Manifest b/dev-python/fastavro/Manifest
new file mode 100644
index 000000000..9c8b4ca8d
--- /dev/null
+++ b/dev-python/fastavro/Manifest
@@ -0,0 +1 @@
+DIST fastavro-1.4.5.tar.gz 727602 BLAKE2B dc7c50e230d34d82de3de5cd44bb066836cdbbb5d61959f21afd52289ad47fe3b7d1d60fc57dc9f81ffdb05483afc4533bf05bf6428ab914a97d7637712395da SHA512 22c31daa9dff10fb582c2fbff48a5c3205e9fd22e24783c1b4771f937aa21e3b3fa74c73be97199176ebc86088db717cb7233096c6d7f42a871fa038de542108
diff --git a/dev-python/fastavro/fastavro-1.4.5.ebuild b/dev-python/fastavro/fastavro-1.4.5.ebuild
new file mode 100644
index 000000000..77676d82e
--- /dev/null
+++ b/dev-python/fastavro/fastavro-1.4.5.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+EPYTEST_DESELECT=( tests/test_fastavro.py::test_cython_python )
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit distutils-r1
+
+DESCRIPTION="Fast Avro for Python"
+HOMEPAGE="
+ https://github.com/fastavro/fastavro
+ https://pypi.org/project/fastavro
+"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND=""
+DEPEND="
+ ${RDEPEND}
+ dev-python/cython[${PYTHON_USEDEP}]
+ test? (
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/pandas[${PYTHON_USEDEP}]
+ dev-python/snappy[${PYTHON_USEDEP}]
+ dev-python/zstandard[${PYTHON_USEDEP}]
+ dev-python/lz4[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
diff --git a/dev-python/fastavro/metadata.xml b/dev-python/fastavro/metadata.xml
new file mode 100644
index 000000000..4e9c12ab6
--- /dev/null
+++ b/dev-python/fastavro/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>lssndrbarbieri@gmail.com</email>
+ <name>Alessandro Barbieri</name>
+ </maintainer>
+ <longdescription lang="en">
+Because the Apache Python avro package is written in pure Python, it is relatively slow. In one test case, it takes about 14 seconds to iterate through a file of 10,000 records. By comparison, the JAVA avro SDK reads the same file in 1.9 seconds.
+The fastavro library was written to offer performance comparable to the Java library. With regular CPython, fastavro uses C extensions which allow it to iterate the same 10,000 record file in 1.7 seconds. With PyPy, this drops to 1.5 seconds (to be fair, the JAVA benchmark is doing some extra JSON encoding/decoding).
+</longdescription>
+ <upstream>
+ <remote-id type="github">fastavro/fastavro</remote-id>
+ <remote-id type="pypi">fastavro</remote-id>
+ </upstream>
+</pkgmetadata>