diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2021-09-25 09:57:22 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2021-09-25 10:00:36 +0300 |
commit | 0b57ebe2ee33ede5c82d04965840436d3876c647 (patch) | |
tree | 222ec492ebbc10d1373fff4308c98c3bb2dce515 /dev-vcs/breezy | |
parent | dev-python/patiencediff: intial import (NIG dep of dev-vcs/breezy) (diff) | |
download | gentoo-0b57ebe2ee33ede5c82d04965840436d3876c647.tar.gz gentoo-0b57ebe2ee33ede5c82d04965840436d3876c647.tar.bz2 gentoo-0b57ebe2ee33ede5c82d04965840436d3876c647.zip |
dev-vcs/breezy: initial packaging (v3.2.1)
Some notes for this package:
- has huge test suite, around ~30,000. Sadly some of them need
disabling (0.8%)
- takes ~24 minutes per python target
- installs aliases for old bzr bin names
- anyone can help and improve the ebuild
Closes: https://bugs.gentoo.org/705018
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'dev-vcs/breezy')
-rw-r--r-- | dev-vcs/breezy/Manifest | 1 | ||||
-rw-r--r-- | dev-vcs/breezy/breezy-3.2.1.ebuild | 86 | ||||
-rw-r--r-- | dev-vcs/breezy/metadata.xml | 13 |
3 files changed, 100 insertions, 0 deletions
diff --git a/dev-vcs/breezy/Manifest b/dev-vcs/breezy/Manifest new file mode 100644 index 000000000000..a2600d08a8eb --- /dev/null +++ b/dev-vcs/breezy/Manifest @@ -0,0 +1 @@ +DIST breezy-3.2.1.tar.gz 9445046 BLAKE2B 67de39c93351d2f78b1b64764a6ad11f26bd31c9bb2d73ef65f8722764d7db8c574f0e116f77dca1b93a53a360f984fb2861f94e0e7f41ce97ad0f703332e25e SHA512 bfbbff1301f7cc13a2d59b1add80c196f3b45b69994194dcae96c0be151f807c965854047c86e43f54dd8c7aa24d56b25afdd00f0063e83b362a8c46d5858226 diff --git a/dev-vcs/breezy/breezy-3.2.1.ebuild b/dev-vcs/breezy/breezy-3.2.1.ebuild new file mode 100644 index 000000000000..67f34e53335e --- /dev/null +++ b/dev-vcs/breezy/breezy-3.2.1.ebuild @@ -0,0 +1,86 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) + +inherit distutils-r1 optfeature + +DESCRIPTION="Distributed Version Control System with a Friendly UI" +HOMEPAGE="https://www.breezy-vcs.org/ https://github.com/breezy-team/breezy" +SRC_URI="https://launchpad.net/brz/$(ver_cut 1-2)/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +# Most tests don't need tests, but deselecting those that need is too hard +RESTRICT="test" +PROPERTIES="test_network" + +RDEPEND=" + dev-python/configobj[${PYTHON_USEDEP}] + dev-python/dulwich[${PYTHON_USEDEP}] + dev-python/fastimport[${PYTHON_USEDEP}] + dev-python/patiencediff[${PYTHON_USEDEP}] + !dev-vcs/bzr +" +BDEPEND=" + sys-devel/gettext + dev-python/cython[${PYTHON_USEDEP}] + test? ( + app-crypt/gpgme[python,${PYTHON_USEDEP}] + dev-python/paramiko[${PYTHON_USEDEP}] + dev-python/pycryptodome[${PYTHON_USEDEP}] + dev-python/testtools[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + dev-python/subunit[${PYTHON_USEDEP}] + ' python3_{8,9}) + ) +" + +distutils_enable_tests --install unittest + +src_prepare() { + distutils-r1_src_prepare + # Fix man instal location + sed -e '/DATA_FILES/s/man\//share\/&/' -i setup.py || die + + # Fix call to unittest's stuff + grep -r breezy -le 'loadTestsFromModuleNames' | xargs sed -i -e 's/loadTestsFromModuleNames/loadTestsFromNames/' || die + + # Very horrible, looks like too much, but only ~250 tests out of ~30,000. + # Before every bump, check the need for every disable, using direct test + # for only a specific file. + # Don't disable tests by removing files, as this results in bad imports. + sed -e 's/test_bzr_connect_to_bzr_ssh/_&/' -i breezy/tests/test_transport.py || die + sed -e 's/test_is_compatible_and_registered/_&/' \ + -e 's/test_make_repository/_&/' -i breezy/plugins/weave_fmt/test_repository.py || die + sed -e 's/test_server_exception_with_hook/_&/' -i breezy/tests/blackbox/test_serve.py || die + sed -e 's/test_dump_/_&/' -i breezy/bzr/tests/blackbox/test_dump_btree.py || die + sed -e 's/test_/_&/' -i breezy/plugins/fastimport/tests/test_head_tracking.py || die + + sed -e '/test_vfs_ratchet/d' -i breezy/bzr/tests/__init__.py || die + sed -e '/test_blackbox/d' -i breezy/git/tests/__init__.py || die + sed -e '/test_upload/d' -i breezy/plugins/upload/tests/__init__.py || die + sed -e '/test_bzrdir/d' -i breezy/plugins/weave_fmt/__init__.py || die + sed -e '/test_big_file/d' -i breezy/tests/blackbox/__init__.py || die + sed -e '/breezy.tests.test_gpg/d' \ + -e '/breezy.tests.test_plugins/d' \ + -e '/breezy.tests.test_source/d' \ + -i breezy/tests/__init__.py || die +} + +src_install() { + distutils-r1_src_install + + # Symlink original bzr's bin names to new names + dosym brz /usr/bin/bzr + dosym git-remote-brz /usr/bin/git-remote-bzr +} + +pkg_postinst() { + optfeature "access branches over sftp" "dev-python/pycryptodome dev-python/paramiko" + optfeature "PGP sign and verify commits" "app-crypt/gpgme[python]" +} diff --git a/dev-vcs/breezy/metadata.xml b/dev-vcs/breezy/metadata.xml new file mode 100644 index 000000000000..abd73e6a6b97 --- /dev/null +++ b/dev-vcs/breezy/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>arthurzam@gentoo.org</email> + <name>Arthur Zamarin</name> + </maintainer> + <upstream> + <remote-id type="github">breezy-team/breezy</remote-id> + <remote-id type="launchpad">brz</remote-id> + <remote-id type="pypi">breezy</remote-id> + </upstream> +</pkgmetadata> |