Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/breezy/
Date: Sat, 25 Sep 2021 07:01:22
Message-Id: 1632553236.0b57ebe2ee33ede5c82d04965840436d3876c647.arthurzam@gentoo
1 commit: 0b57ebe2ee33ede5c82d04965840436d3876c647
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 25 06:57:22 2021 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 25 07:00:36 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b57ebe2
7
8 dev-vcs/breezy: initial packaging (v3.2.1)
9
10 Some notes for this package:
11 - has huge test suite, around ~30,000. Sadly some of them need
12 disabling (0.8%)
13 - takes ~24 minutes per python target
14 - installs aliases for old bzr bin names
15 - anyone can help and improve the ebuild
16
17 Closes: https://bugs.gentoo.org/705018
18 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
19
20 dev-vcs/breezy/Manifest | 1 +
21 dev-vcs/breezy/breezy-3.2.1.ebuild | 86 ++++++++++++++++++++++++++++++++++++++
22 dev-vcs/breezy/metadata.xml | 13 ++++++
23 3 files changed, 100 insertions(+)
24
25 diff --git a/dev-vcs/breezy/Manifest b/dev-vcs/breezy/Manifest
26 new file mode 100644
27 index 00000000000..a2600d08a8e
28 --- /dev/null
29 +++ b/dev-vcs/breezy/Manifest
30 @@ -0,0 +1 @@
31 +DIST breezy-3.2.1.tar.gz 9445046 BLAKE2B 67de39c93351d2f78b1b64764a6ad11f26bd31c9bb2d73ef65f8722764d7db8c574f0e116f77dca1b93a53a360f984fb2861f94e0e7f41ce97ad0f703332e25e SHA512 bfbbff1301f7cc13a2d59b1add80c196f3b45b69994194dcae96c0be151f807c965854047c86e43f54dd8c7aa24d56b25afdd00f0063e83b362a8c46d5858226
32
33 diff --git a/dev-vcs/breezy/breezy-3.2.1.ebuild b/dev-vcs/breezy/breezy-3.2.1.ebuild
34 new file mode 100644
35 index 00000000000..67f34e53335
36 --- /dev/null
37 +++ b/dev-vcs/breezy/breezy-3.2.1.ebuild
38 @@ -0,0 +1,86 @@
39 +# Copyright 2021 Gentoo Authors
40 +# Distributed under the terms of the GNU General Public License v2
41 +
42 +EAPI=8
43 +
44 +PYTHON_COMPAT=( python3_{8..10} )
45 +
46 +inherit distutils-r1 optfeature
47 +
48 +DESCRIPTION="Distributed Version Control System with a Friendly UI"
49 +HOMEPAGE="https://www.breezy-vcs.org/ https://github.com/breezy-team/breezy"
50 +SRC_URI="https://launchpad.net/brz/$(ver_cut 1-2)/${PV}/+download/${P}.tar.gz"
51 +
52 +LICENSE="GPL-2+"
53 +SLOT="0"
54 +KEYWORDS="~amd64 ~x86"
55 +
56 +# Most tests don't need tests, but deselecting those that need is too hard
57 +RESTRICT="test"
58 +PROPERTIES="test_network"
59 +
60 +RDEPEND="
61 + dev-python/configobj[${PYTHON_USEDEP}]
62 + dev-python/dulwich[${PYTHON_USEDEP}]
63 + dev-python/fastimport[${PYTHON_USEDEP}]
64 + dev-python/patiencediff[${PYTHON_USEDEP}]
65 + !dev-vcs/bzr
66 +"
67 +BDEPEND="
68 + sys-devel/gettext
69 + dev-python/cython[${PYTHON_USEDEP}]
70 + test? (
71 + app-crypt/gpgme[python,${PYTHON_USEDEP}]
72 + dev-python/paramiko[${PYTHON_USEDEP}]
73 + dev-python/pycryptodome[${PYTHON_USEDEP}]
74 + dev-python/testtools[${PYTHON_USEDEP}]
75 + $(python_gen_cond_dep '
76 + dev-python/subunit[${PYTHON_USEDEP}]
77 + ' python3_{8,9})
78 + )
79 +"
80 +
81 +distutils_enable_tests --install unittest
82 +
83 +src_prepare() {
84 + distutils-r1_src_prepare
85 + # Fix man instal location
86 + sed -e '/DATA_FILES/s/man\//share\/&/' -i setup.py || die
87 +
88 + # Fix call to unittest's stuff
89 + grep -r breezy -le 'loadTestsFromModuleNames' | xargs sed -i -e 's/loadTestsFromModuleNames/loadTestsFromNames/' || die
90 +
91 + # Very horrible, looks like too much, but only ~250 tests out of ~30,000.
92 + # Before every bump, check the need for every disable, using direct test
93 + # for only a specific file.
94 + # Don't disable tests by removing files, as this results in bad imports.
95 + sed -e 's/test_bzr_connect_to_bzr_ssh/_&/' -i breezy/tests/test_transport.py || die
96 + sed -e 's/test_is_compatible_and_registered/_&/' \
97 + -e 's/test_make_repository/_&/' -i breezy/plugins/weave_fmt/test_repository.py || die
98 + sed -e 's/test_server_exception_with_hook/_&/' -i breezy/tests/blackbox/test_serve.py || die
99 + sed -e 's/test_dump_/_&/' -i breezy/bzr/tests/blackbox/test_dump_btree.py || die
100 + sed -e 's/test_/_&/' -i breezy/plugins/fastimport/tests/test_head_tracking.py || die
101 +
102 + sed -e '/test_vfs_ratchet/d' -i breezy/bzr/tests/__init__.py || die
103 + sed -e '/test_blackbox/d' -i breezy/git/tests/__init__.py || die
104 + sed -e '/test_upload/d' -i breezy/plugins/upload/tests/__init__.py || die
105 + sed -e '/test_bzrdir/d' -i breezy/plugins/weave_fmt/__init__.py || die
106 + sed -e '/test_big_file/d' -i breezy/tests/blackbox/__init__.py || die
107 + sed -e '/breezy.tests.test_gpg/d' \
108 + -e '/breezy.tests.test_plugins/d' \
109 + -e '/breezy.tests.test_source/d' \
110 + -i breezy/tests/__init__.py || die
111 +}
112 +
113 +src_install() {
114 + distutils-r1_src_install
115 +
116 + # Symlink original bzr's bin names to new names
117 + dosym brz /usr/bin/bzr
118 + dosym git-remote-brz /usr/bin/git-remote-bzr
119 +}
120 +
121 +pkg_postinst() {
122 + optfeature "access branches over sftp" "dev-python/pycryptodome dev-python/paramiko"
123 + optfeature "PGP sign and verify commits" "app-crypt/gpgme[python]"
124 +}
125
126 diff --git a/dev-vcs/breezy/metadata.xml b/dev-vcs/breezy/metadata.xml
127 new file mode 100644
128 index 00000000000..abd73e6a6b9
129 --- /dev/null
130 +++ b/dev-vcs/breezy/metadata.xml
131 @@ -0,0 +1,13 @@
132 +<?xml version="1.0" encoding="UTF-8"?>
133 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
134 +<pkgmetadata>
135 + <maintainer type="person">
136 + <email>arthurzam@g.o</email>
137 + <name>Arthur Zamarin</name>
138 + </maintainer>
139 + <upstream>
140 + <remote-id type="github">breezy-team/breezy</remote-id>
141 + <remote-id type="launchpad">brz</remote-id>
142 + <remote-id type="pypi">breezy</remote-id>
143 + </upstream>
144 +</pkgmetadata>