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/fastavro/
Date: Mon, 27 Sep 2021 16:47:38
Message-Id: 1632761250.9e42e072351e534f17b942ddcba0489f2cb9a1cf.Alessandro-Barbieri@gentoo
1 commit: 9e42e072351e534f17b942ddcba0489f2cb9a1cf
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Mon Sep 27 16:00:42 2021 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Mon Sep 27 16:47:30 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9e42e072
7
8 dev-python/fastavro: initial import
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 dev-python/fastavro/Manifest | 1 +
13 dev-python/fastavro/fastavro-1.4.5.ebuild | 35 +++++++++++++++++++++++++++++++
14 dev-python/fastavro/metadata.xml | 16 ++++++++++++++
15 3 files changed, 52 insertions(+)
16
17 diff --git a/dev-python/fastavro/Manifest b/dev-python/fastavro/Manifest
18 new file mode 100644
19 index 000000000..9c8b4ca8d
20 --- /dev/null
21 +++ b/dev-python/fastavro/Manifest
22 @@ -0,0 +1 @@
23 +DIST fastavro-1.4.5.tar.gz 727602 BLAKE2B dc7c50e230d34d82de3de5cd44bb066836cdbbb5d61959f21afd52289ad47fe3b7d1d60fc57dc9f81ffdb05483afc4533bf05bf6428ab914a97d7637712395da SHA512 22c31daa9dff10fb582c2fbff48a5c3205e9fd22e24783c1b4771f937aa21e3b3fa74c73be97199176ebc86088db717cb7233096c6d7f42a871fa038de542108
24
25 diff --git a/dev-python/fastavro/fastavro-1.4.5.ebuild b/dev-python/fastavro/fastavro-1.4.5.ebuild
26 new file mode 100644
27 index 000000000..77676d82e
28 --- /dev/null
29 +++ b/dev-python/fastavro/fastavro-1.4.5.ebuild
30 @@ -0,0 +1,35 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +EPYTEST_DESELECT=( tests/test_fastavro.py::test_cython_python )
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +
39 +inherit distutils-r1
40 +
41 +DESCRIPTION="Fast Avro for Python"
42 +HOMEPAGE="
43 + https://github.com/fastavro/fastavro
44 + https://pypi.org/project/fastavro
45 +"
46 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
47 +
48 +LICENSE="MIT"
49 +SLOT="0"
50 +KEYWORDS="~amd64"
51 +
52 +RDEPEND=""
53 +DEPEND="
54 + ${RDEPEND}
55 + dev-python/cython[${PYTHON_USEDEP}]
56 + test? (
57 + dev-python/numpy[${PYTHON_USEDEP}]
58 + dev-python/pandas[${PYTHON_USEDEP}]
59 + dev-python/snappy[${PYTHON_USEDEP}]
60 + dev-python/zstandard[${PYTHON_USEDEP}]
61 + dev-python/lz4[${PYTHON_USEDEP}]
62 + )
63 +"
64 +
65 +distutils_enable_tests pytest
66
67 diff --git a/dev-python/fastavro/metadata.xml b/dev-python/fastavro/metadata.xml
68 new file mode 100644
69 index 000000000..4e9c12ab6
70 --- /dev/null
71 +++ b/dev-python/fastavro/metadata.xml
72 @@ -0,0 +1,16 @@
73 +<?xml version="1.0" encoding="UTF-8"?>
74 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
75 +<pkgmetadata>
76 + <maintainer type="person">
77 + <email>lssndrbarbieri@×××××.com</email>
78 + <name>Alessandro Barbieri</name>
79 + </maintainer>
80 + <longdescription lang="en">
81 +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.
82 +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).
83 +</longdescription>
84 + <upstream>
85 + <remote-id type="github">fastavro/fastavro</remote-id>
86 + <remote-id type="pypi">fastavro</remote-id>
87 + </upstream>
88 +</pkgmetadata>