* [gentoo-commits] repo/proj/guru:master commit in: app-office/beancount/, app-office/beancount/files/
@ 2021-01-05 15:21 Andrew Ammerlaan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2021-01-05 15:21 UTC (permalink / raw
To: gentoo-commits
commit: 15f13b15dc8f0a1254dfe8e4424f567d326e88b8
Author: Wolfgang E. Sanyer <WolfgangESanyer <AT> gmail <DOT> com>
AuthorDate: Mon Jan 4 22:57:46 2021 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Mon Jan 4 22:57:46 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=15f13b15
app-office/beancount: new package, a ledger-like accounting software
Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer <AT> gmail.com>
app-office/beancount/Manifest | 1 +
app-office/beancount/beancount-2.3.3.ebuild | 56 +++++++++++++++++
.../beancount-2.3.3-disable-install-test.patch | 31 +++++++++
.../beancount-2.3.3-disable-network-tests.patch | 73 ++++++++++++++++++++++
.../beancount-2.3.3-disable-tmp-access-tests.patch | 20 ++++++
app-office/beancount/metadata.xml | 14 +++++
6 files changed, 195 insertions(+)
diff --git a/app-office/beancount/Manifest b/app-office/beancount/Manifest
new file mode 100644
index 00000000..69ea66a1
--- /dev/null
+++ b/app-office/beancount/Manifest
@@ -0,0 +1 @@
+DIST beancount-2.3.3.tar.gz 1784037 BLAKE2B ff62ef30d3bcadd3f1dc195adf71cb58703e50c93e12cf71ef699c651ce67daf89ea8285b53b43811687fb132c02d8d6364651d87bc3e092f9485e6934883110 SHA512 420369105939bcdcf2b7caaba27ab1d486b3dfc18e0a3286d917a6380345eaf5fa64ff5e0779fd2275129b7088de24f4a2dbd0232a482aceb124064e5c56ccc4
diff --git a/app-office/beancount/beancount-2.3.3.ebuild b/app-office/beancount/beancount-2.3.3.ebuild
new file mode 100644
index 00000000..d6403f9d
--- /dev/null
+++ b/app-office/beancount/beancount-2.3.3.ebuild
@@ -0,0 +1,56 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..8} )
+
+DISTUTILS_SINGLE_IMPL=1
+
+inherit distutils-r1
+
+DESCRIPTION="A double-entry accounting system that uses text files as input"
+HOMEPAGE="https://github.com/beancount/beancount"
+SRC_URI="https://github.com/beancount/beancount/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-2.3.3-disable-network-tests.patch"
+ "${FILESDIR}/${PN}-2.3.3-disable-tmp-access-tests.patch"
+ "${FILESDIR}/${PN}-2.3.3-disable-install-test.patch"
+)
+
+RDEPEND="
+ $(python_gen_cond_dep '
+ >=dev-python/beautifulsoup-4[${PYTHON_USEDEP}]
+ >=dev-python/bottle-0.12[${PYTHON_USEDEP}]
+ >=dev-python/google-api-python-client-1.8.2[${PYTHON_USEDEP}]
+ >=dev-python/httplib2-0.10[${PYTHON_USEDEP}]
+ >=dev-python/lxml-3.0[${PYTHON_USEDEP}]
+ >=dev-python/oauth2client-4.0[${PYTHON_USEDEP}]
+ >=dev-python/ply-3.4[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.6.0[${PYTHON_USEDEP}]
+ >=dev-python/python-magic-0.4.12[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.0[${PYTHON_USEDEP}]
+ ')
+"
+
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ $(python_gen_cond_dep '
+ >=dev-python/pytest-5.4.2[${PYTHON_USEDEP}]
+ ')
+ )
+"
+
+python_test(){
+ esetup.py build_ext -i
+ make ctest
+ make test
+}
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch b/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch
new file mode 100644
index 00000000..03c305cd
--- /dev/null
+++ b/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch
@@ -0,0 +1,31 @@
+diff --git a/beancount/scripts/setup_test.py b/beancount/scripts/setup_test.py
+index 59a165d1..45717643 100644
+--- a/beancount/scripts/setup_test.py
++++ b/beancount/scripts/setup_test.py
+@@ -12,6 +12,10 @@ import sys
+ import tarfile
+ import tempfile
+ import unittest
++import pytest
++
++pytest.skip("these installation tests fail in portage and are un-needed"
++ , allow_module_level=True)
+
+ from beancount.utils import test_utils
+
+@@ -30,7 +34,6 @@ class TestSetup(test_utils.TestCase):
+ if path.exists(self.installdir):
+ shutil.rmtree(self.installdir)
+
+- @unittest.skipIf(is_bazel_build(), "Cannot setup within Bazel.")
+ def test_setup(self):
+ # We need to create the installation target directory and have our
+ # PYTHONPATH set on it in order for setuptools to work properly in a
+@@ -50,6 +53,7 @@ class TestSetup(test_utils.TestCase):
+ if path.exists(egg_info):
+ shutil.rmtree(egg_info)
+
++ @pytest.mark.skip(reason="Portage will make sure things install correctly")
+ def run_setup(self, installdir, extra_env=None):
+ """Run setup.py with the given extra environment variables.
+
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch b/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch
new file mode 100644
index 00000000..8e6db27b
--- /dev/null
+++ b/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch
@@ -0,0 +1,73 @@
+diff --git a/beancount/scripts/bake_test.py b/beancount/scripts/bake_test.py
+index 67dbefc0..a95488c1 100644
+--- a/beancount/scripts/bake_test.py
++++ b/beancount/scripts/bake_test.py
+@@ -6,6 +6,7 @@ import textwrap
+ from os import path
+ from unittest import mock
+ import unittest
++import pytest
+
+ import lxml.html
+
+@@ -188,6 +189,7 @@ class TestScriptBake(test_utils.TestCase):
+ test_utils.run_with_args(bake.main, self.get_args() + [filename, output])
+
+ @test_utils.docfile
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_bake_directory(self, filename):
+ """
+ 2013-01-01 open Expenses:Restaurant
+@@ -210,6 +212,7 @@ class TestScriptBake(test_utils.TestCase):
+ class TestScriptArchive(TestScriptBake):
+
+ @test_utils.docfile
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_bake_archive__known(self, filename):
+ """
+ 2013-01-01 open Expenses:Restaurant
+diff --git a/beancount/web/web_test.py b/beancount/web/web_test.py
+index dd7059fc..1aab3e44 100644
+--- a/beancount/web/web_test.py
++++ b/beancount/web/web_test.py
+@@ -4,6 +4,7 @@ __license__ = "GNU GPLv2"
+ import unittest
+ import urllib.parse
+ from os import path
++import pytest
+
+ from beancount.utils import test_utils
+ from beancount.parser import version
+@@ -48,26 +49,32 @@ class TestWeb(unittest.TestCase):
+ self.ignore_regexp)
+
+ @test_utils.docfile
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_empty_file(self, filename):
+ """
+ ;; A file with no entries in it.
+ """
+ self.scrape(filename)
+
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_basic(self):
+ self.scrape('simple/basic.beancount')
+
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_basic_view(self):
+ self.scrape('simple/basic.beancount', extra_args=['--view', 'year/2013'])
+
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_in_incognito(self):
+ self.scrape('simple/basic.beancount', extra_args=['--incognito'])
+
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def test_scrape_starterkit(self):
+ self.scrape('simple/starter.beancount')
+
+ # Note: Great idea, but sorry, too slow (approx. 50s on MBA). We need to
+ # find some way to enable this on demand.
++ @pytest.mark.skip(reason="network unreachable during portage installation")
+ def __test_scrape_example(self):
+ self.scrape('example.beancount')
+
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch b/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch
new file mode 100644
index 00000000..e12d8012
--- /dev/null
+++ b/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch
@@ -0,0 +1,20 @@
+diff --git a/beancount/projects/will_test.py b/beancount/projects/will_test.py
+index 0a8e92b8..12d4c50a 100644
+--- a/beancount/projects/will_test.py
++++ b/beancount/projects/will_test.py
+@@ -3,6 +3,7 @@ __license__ = "GNU GPLv2"
+
+ import logging
+ import unittest
++import pytest
+
+ from beancount import loader
+ from beancount.core import getters
+@@ -95,6 +96,7 @@ class TestWillFunctions(test_utils.TestCase):
+ class TestWillReport(test_utils.TestCase):
+
+ @loader.load_doc()
++ @pytest.mark.skip(reason="Cannot access /tmp during portage installation")
+ def test_create_report(self, entries, _, options_map):
+ """
+ option "title" "Report Creation Test"
diff --git a/app-office/beancount/metadata.xml b/app-office/beancount/metadata.xml
new file mode 100644
index 00000000..0a83b176
--- /dev/null
+++ b/app-office/beancount/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>ezzieyguywuf@gmail.com</email>
+ <name>Wolfgang E. Sanyer</name>
+ </maintainer>
+ <longdescription lang="en">
+ Beancount defines a simple data format or “language” that lets you
+ define financial transaction records in a text file, load them in memory
+ and generate and export a variety of reports, such as balance sheets or
+ income statements.
+ </longdescription>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: app-office/beancount/, app-office/beancount/files/
@ 2023-02-03 21:15 Andrew Ammerlaan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2023-02-03 21:15 UTC (permalink / raw
To: gentoo-commits
commit: 7a6de6b5071308f7646fe164627fc19d0bf23e12
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
AuthorDate: Fri Feb 3 20:05:57 2023 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Fri Feb 3 20:05:57 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7a6de6b5
app-office/beancount: fix deps, enable PEP517
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
...ount-2.3.5.ebuild => beancount-2.3.5-r1.ebuild} | 46 +++++++-------
.../beancount-2.3.3-disable-install-test.patch | 31 ---------
.../beancount-2.3.3-disable-network-tests.patch | 73 ----------------------
.../beancount-2.3.3-disable-tmp-access-tests.patch | 20 ------
4 files changed, 23 insertions(+), 147 deletions(-)
diff --git a/app-office/beancount/beancount-2.3.5.ebuild b/app-office/beancount/beancount-2.3.5-r1.ebuild
similarity index 56%
rename from app-office/beancount/beancount-2.3.5.ebuild
rename to app-office/beancount/beancount-2.3.5-r1.ebuild
index 2c0f06f5d..296a34055 100644
--- a/app-office/beancount/beancount-2.3.5.ebuild
+++ b/app-office/beancount/beancount-2.3.5-r1.ebuild
@@ -4,8 +4,9 @@
EAPI=8
PYTHON_COMPAT=( python3_10 )
-DITUTILS_USE_PEP517=setuptools
+DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
+
inherit distutils-r1
DESCRIPTION="A double-entry accounting system that uses text files as input"
@@ -16,25 +17,22 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-PATCHES=(
- "${FILESDIR}/${PN}-2.3.3-disable-network-tests.patch"
- "${FILESDIR}/${PN}-2.3.3-disable-tmp-access-tests.patch"
- "${FILESDIR}/${PN}-2.3.3-disable-install-test.patch"
-)
+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/pytest[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/python-magic[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ ')
+"
-RDEPEND="$(python_gen_cond_dep '
- dev-python/beautifulsoup4[${PYTHON_USEDEP}]
- >=dev-python/bottle-0.12[${PYTHON_USEDEP}]
- dev-python/google-auth-oauthlib[${PYTHON_USEDEP}]
- >=dev-python/google-api-python-client-1.8.2[${PYTHON_USEDEP}]
- >=dev-python/httplib2-0.10[${PYTHON_USEDEP}]
- >=dev-python/lxml-3.0[${PYTHON_USEDEP}]
- >=dev-python/oauth2client-4.0[${PYTHON_USEDEP}]
- >=dev-python/ply-3.4[${PYTHON_USEDEP}]
- >=dev-python/python-dateutil-2.6.0[${PYTHON_USEDEP}]
- >=dev-python/python-magic-0.4.12[${PYTHON_USEDEP}]
- >=dev-python/requests-2.0[${PYTHON_USEDEP}]
-')"
+EPYTEST_DESELECT=( scripts/setup_test.py )
distutils_enable_tests pytest
@@ -52,13 +50,15 @@ python_compile() {
distutils-r1_python_compile
# keep in sync with hashsrc.py, otherwise expect test failures
- cp beancount/parser/{lexer.l,grammar.y,decimal.h,decimal.c,macros.h,parser.h,parser.c,tokens.h} \
- "${BUILD_DIR}"/lib/${PN}/parser || die
+ cp beancount/parser/{lexer.l,grammar.y,decimal.h,decimal.c,macros.h,parser.h,parser.c,tokens.h} "${BUILD_DIR}"/install$(python_get_sitedir)/${PN}/parser || die
}
python_test(){
- emake ctest
-
cd "${T}" || die
epytest --pyargs ${PN}
}
+
+src_test() {
+ emake ctest
+ distutils-r1_src_test
+}
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch b/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch
deleted file mode 100644
index 03c305cd9..000000000
--- a/app-office/beancount/files/beancount-2.3.3-disable-install-test.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff --git a/beancount/scripts/setup_test.py b/beancount/scripts/setup_test.py
-index 59a165d1..45717643 100644
---- a/beancount/scripts/setup_test.py
-+++ b/beancount/scripts/setup_test.py
-@@ -12,6 +12,10 @@ import sys
- import tarfile
- import tempfile
- import unittest
-+import pytest
-+
-+pytest.skip("these installation tests fail in portage and are un-needed"
-+ , allow_module_level=True)
-
- from beancount.utils import test_utils
-
-@@ -30,7 +34,6 @@ class TestSetup(test_utils.TestCase):
- if path.exists(self.installdir):
- shutil.rmtree(self.installdir)
-
-- @unittest.skipIf(is_bazel_build(), "Cannot setup within Bazel.")
- def test_setup(self):
- # We need to create the installation target directory and have our
- # PYTHONPATH set on it in order for setuptools to work properly in a
-@@ -50,6 +53,7 @@ class TestSetup(test_utils.TestCase):
- if path.exists(egg_info):
- shutil.rmtree(egg_info)
-
-+ @pytest.mark.skip(reason="Portage will make sure things install correctly")
- def run_setup(self, installdir, extra_env=None):
- """Run setup.py with the given extra environment variables.
-
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch b/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch
deleted file mode 100644
index 8e6db27b2..000000000
--- a/app-office/beancount/files/beancount-2.3.3-disable-network-tests.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-diff --git a/beancount/scripts/bake_test.py b/beancount/scripts/bake_test.py
-index 67dbefc0..a95488c1 100644
---- a/beancount/scripts/bake_test.py
-+++ b/beancount/scripts/bake_test.py
-@@ -6,6 +6,7 @@ import textwrap
- from os import path
- from unittest import mock
- import unittest
-+import pytest
-
- import lxml.html
-
-@@ -188,6 +189,7 @@ class TestScriptBake(test_utils.TestCase):
- test_utils.run_with_args(bake.main, self.get_args() + [filename, output])
-
- @test_utils.docfile
-+ @pytest.mark.skip(reason="network unreachable during portage installation")
- def test_bake_directory(self, filename):
- """
- 2013-01-01 open Expenses:Restaurant
-@@ -210,6 +212,7 @@ class TestScriptBake(test_utils.TestCase):
- class TestScriptArchive(TestScriptBake):
-
- @test_utils.docfile
-+ @pytest.mark.skip(reason="network unreachable during portage installation")
- def test_bake_archive__known(self, filename):
- """
- 2013-01-01 open Expenses:Restaurant
-diff --git a/beancount/web/web_test.py b/beancount/web/web_test.py
-index dd7059fc..1aab3e44 100644
---- a/beancount/web/web_test.py
-+++ b/beancount/web/web_test.py
-@@ -4,6 +4,7 @@ __license__ = "GNU GPLv2"
- import unittest
- import urllib.parse
- from os import path
-+import pytest
-
- from beancount.utils import test_utils
- from beancount.parser import version
-@@ -48,26 +49,32 @@ class TestWeb(unittest.TestCase):
- self.ignore_regexp)
-
- @test_utils.docfile
-+ @pytest.mark.skip(reason="network unreachable during portage installation")
- def test_scrape_empty_file(self, filename):
- """
- ;; A file with no entries in it.
- """
- self.scrape(filename)
-
-+ @pytest.mark.skip(reason="network unreachable during portage installation")
- def test_scrape_basic(self):
- self.scrape('simple/basic.beancount')
-
-+ @pytest.mark.skip(reason="network unreachable during portage installation")
- def test_scrape_basic_view(self):
- self.scrape('simple/basic.beancount', extra_args=['--view', 'year/2013'])
-
-+ @pytest.mark.skip(reason="network unreachable during portage installation")
- def test_scrape_in_incognito(self):
- self.scrape('simple/basic.beancount', extra_args=['--incognito'])
-
-+ @pytest.mark.skip(reason="network unreachable during portage installation")
- def test_scrape_starterkit(self):
- self.scrape('simple/starter.beancount')
-
- # Note: Great idea, but sorry, too slow (approx. 50s on MBA). We need to
- # find some way to enable this on demand.
-+ @pytest.mark.skip(reason="network unreachable during portage installation")
- def __test_scrape_example(self):
- self.scrape('example.beancount')
-
diff --git a/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch b/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch
deleted file mode 100644
index e12d8012b..000000000
--- a/app-office/beancount/files/beancount-2.3.3-disable-tmp-access-tests.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/beancount/projects/will_test.py b/beancount/projects/will_test.py
-index 0a8e92b8..12d4c50a 100644
---- a/beancount/projects/will_test.py
-+++ b/beancount/projects/will_test.py
-@@ -3,6 +3,7 @@ __license__ = "GNU GPLv2"
-
- import logging
- import unittest
-+import pytest
-
- from beancount import loader
- from beancount.core import getters
-@@ -95,6 +96,7 @@ class TestWillFunctions(test_utils.TestCase):
- class TestWillReport(test_utils.TestCase):
-
- @loader.load_doc()
-+ @pytest.mark.skip(reason="Cannot access /tmp during portage installation")
- def test_create_report(self, entries, _, options_map):
- """
- option "title" "Report Creation Test"
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-03 21:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-05 15:21 [gentoo-commits] repo/proj/guru:master commit in: app-office/beancount/, app-office/beancount/files/ Andrew Ammerlaan
-- strict thread matches above, loose matches on Subject: below --
2023-02-03 21:15 Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox