From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 65F211581D3 for ; Wed, 15 May 2024 16:55:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CB594E2ABE; Wed, 15 May 2024 16:55:36 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B1217E2ABE for ; Wed, 15 May 2024 16:55:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 040A633BDEF for ; Wed, 15 May 2024 16:55:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 92FBB1AD9 for ; Wed, 15 May 2024 16:55:33 +0000 (UTC) From: "Julien Roy" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Julien Roy" Message-ID: <1715792116.f334193b0b7871740589dced59f3f5571f49d4ae.julien@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: app-office/beancount/ X-VCS-Repository: repo/proj/guru X-VCS-Files: app-office/beancount/Manifest app-office/beancount/beancount-2.3.6.ebuild X-VCS-Directories: app-office/beancount/ X-VCS-Committer: julien X-VCS-Committer-Name: Julien Roy X-VCS-Revision: f334193b0b7871740589dced59f3f5571f49d4ae X-VCS-Branch: dev Date: Wed, 15 May 2024 16:55:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fe3cff9f-44b3-44eb-809e-871c43f41e72 X-Archives-Hash: 099227000dacd5d288f4748e29e84c44 Message-ID: <20240515165533.I8zqWjx5nlF99iZ2P0gc9NXp6bq1sF7QrkxwxAGXNKY@z> commit: f334193b0b7871740589dced59f3f5571f49d4ae Author: Julien Roy jroy ca> AuthorDate: Wed May 15 16:52:10 2024 +0000 Commit: Julien Roy jroy ca> CommitDate: Wed May 15 16:55:16 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=f334193b app-office/beancount: add 2.3.6, enable py3.12 Closes: https://bugs.gentoo.org/931358 Closes: https://bugs.gentoo.org/850412 Signed-off-by: Julien Roy jroy.ca> app-office/beancount/Manifest | 1 + app-office/beancount/beancount-2.3.6.ebuild | 112 ++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/app-office/beancount/Manifest b/app-office/beancount/Manifest index afb4ee6891..3f8cd19516 100644 --- a/app-office/beancount/Manifest +++ b/app-office/beancount/Manifest @@ -1 +1,2 @@ DIST beancount-2.3.5.gh.tar.gz 1718715 BLAKE2B 2bcbf250e6947c6ea93f7c4308fac2ea03c0b5b722dc4a6eb396133880ca201235ceb8cbb2e3a6e63afe573e1b3ab8bb945444a1edc73791b73200fb4d45bd18 SHA512 a3f1343ddf54cf13ef60802de210dc89e9ae202bca802b1b4eb532588f71d51fa4b71672b4e6a1e9676135d406fd55c421b80c439fa2f5f4279e61211f558a2a +DIST beancount-2.3.6.gh.tar.gz 1720239 BLAKE2B 769aa27a9edc201e33a85f92780b4140b1758a35ca865255183bdcaf4c515ba3bf4c6711aa2842c9219027a44a7cc334c39b48eb36f5145caa689ba90cda64d5 SHA512 52b65f99753e9473aae7736419d104e46b422b33f854170cc0242a95c1d12483aae95264138f81d28c9a7b50ca961e75163cce83868db5bcc9afe7d2337f3036 diff --git a/app-office/beancount/beancount-2.3.6.ebuild b/app-office/beancount/beancount-2.3.6.ebuild new file mode 100644 index 0000000000..c49b53d487 --- /dev/null +++ b/app-office/beancount/beancount-2.3.6.ebuild @@ -0,0 +1,112 @@ +# Copyright 2021-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +DISTUTILS_USE_PEP517=setuptools +DISTUTILS_SINGLE_IMPL=1 + +inherit distutils-r1 toolchain-funcs + +DESCRIPTION="A double-entry accounting system that uses text files as input" +HOMEPAGE=" + https://beancount.github.io + https://github.com/beancount/beancount +" +SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + $(python_gen_cond_dep ' + dev-python/beautifulsoup4[${PYTHON_USEDEP}] + dev-python/bottle[${PYTHON_USEDEP}] + dev-python/chardet[${PYTHON_USEDEP}] + dev-python/google-api-python-client[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/ply[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/python-magic[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] + ') +" +BDEPEND=" + sys-devel/bison + sys-devel/flex +" + +EPYTEST_DESELECT=( scripts/setup_test.py ) + +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + + # remove test deps from 'install_requires' + sed "/pytest/d" -i setup.py || die + + # we'll regenerate C sources + rm ${PN}/parser/grammar.{c,h} || die + rm ${PN}/parser/lexer.{c,h} || die + + # repair tests + sed "/def find_repository_root/a\ return '${S}'" \ + -i ${PN}/utils/test_utils.py || die + sed "s/\[PROGRAM\]/['${EPYTHON}', PROGRAM]/" \ + -i ${PN}/tools/treeify_test.py || die + sed "/DATA_DIR =/c\ DATA_DIR = '${S}/${PN}/utils/file_type_testdata'" \ + -i ${PN}/utils/file_type_test.py || die +} + +src_configure() { + tc-export CC +} + +python_compile() { + distutils-r1_python_compile + + # keep in sync with hashsrc.py, otherwise expect test failures + local csources=( + decimal.{c,h} + grammar.y + lexer.l + macros.h + parser.{c,h} + tokens.h + ) + + for file in "${csources[@]}"; do + cp ${PN}/parser/${file} "${BUILD_DIR}"/install$(python_get_sitedir)/${PN}/parser || die + done +} + +src_compile() { + local mymakeflags=( + PYCONFIG="$(python_get_PYTHON_CONFIG)" + ) + + emake "${mymakeflags[@]}" ${PN}/parser/grammar.c + emake "${mymakeflags[@]}" ${PN}/parser/lexer.c + + distutils-r1_src_compile + + use test && \ + emake "${mymakeflags[@]}" ${PN}/parser/tokens_test +} + +python_test(){ + cd "${T}" || die + epytest --pyargs ${PN} +} + +src_test() { + local mymakeflags=( + PYCONFIG="$(python_get_PYTHON_CONFIG)" + ) + + emake "${mymakeflags[@]}" ctest + distutils-r1_src_test +}