Diff docker-compose-1.29.2-r4 with a docker-compose-2.17.2

/usr/portage/app-containers/docker-compose/docker-compose-2.17.2.ebuild 2023-10-09 14:52:28.220368318 +0300
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=8
5

  
6
DISTUTILS_USE_PEP517=setuptools
7
PYTHON_COMPAT=( python3_{9..11} )
8

  
9
inherit bash-completion-r1 distutils-r1
10

  
5
inherit bash-completion-r1 go-module
11 6
MY_PV=${PV/_/-}
7

  
12 8
DESCRIPTION="Multi-container orchestration for Docker"
13 9
HOMEPAGE="https://github.com/docker/compose"
14
SRC_URI="https://github.com/docker/compose/archive/${MY_PV}.tar.gz -> ${P}.gh.tar.gz"
10
SRC_URI="https://github.com/docker/compose/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
11
SRC_URI+=" https://dev.gentoo.org/~williamh/dist/${P}-deps.tar.xz"
15 12

  
16 13
LICENSE="Apache-2.0"
17
SLOT="0"
18
KEYWORDS="~amd64 ~arm64"
14
SLOT="2"
15
KEYWORDS="amd64 arm64"
19 16

  
20
RDEPEND="
21
	>=dev-python/distro-1.5.0[${PYTHON_USEDEP}]
22
	>=dev-python/docker-5[${PYTHON_USEDEP}]
23
	>=dev-python/dockerpty-0.4.1[${PYTHON_USEDEP}]
24
	>=dev-python/docopt-0.6.1[${PYTHON_USEDEP}]
25
	>=dev-python/python-dotenv-0.13.0[${PYTHON_USEDEP}]
26
	>=dev-python/jsonschema-2.5.1[${PYTHON_USEDEP}]
27
	dev-python/paramiko[${PYTHON_USEDEP}]
28
	>=dev-python/PySocks-1.6.0[${PYTHON_USEDEP}]
29
	>=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
30
	>=dev-python/requests-2.20.0[${PYTHON_USEDEP}]
31
	>=dev-python/six-1.3.0[${PYTHON_USEDEP}]
32
	>=dev-python/texttable-0.9.0[${PYTHON_USEDEP}]
33
	>=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]"
34

  
35
DEPEND="${RDEPEND}
36
	test? (
37
		>=dev-python/pytest-5[${PYTHON_USEDEP}]
38
		>=dev-python/ddt-1.2.2[${PYTHON_USEDEP}]
39
		dev-python/py[${PYTHON_USEDEP}]
40
	)"
17
RDEPEND=">=app-containers/docker-cli-23.0.0"
41 18

  
19
RESTRICT="test"
42 20
S="${WORKDIR}/compose-${MY_PV}"
43 21

  
44
distutils_enable_tests pytest
45

  
46
PATCHES=(
47
	# Bug #679968 -- https://bugs.gentoo.org/679968
48
	# Bug #681002 -- https://bugs.gentoo.org/681002
49
	"${FILESDIR}"/${PN}-1.29.0-setup-py.patch
50
	"${FILESDIR}"/${P}-tests-unit-cli-test-py.patch
51
)
52

  
53
DOCS=( CHANGELOG.md README.md )
54

  
55 22
src_prepare() {
56
	# Address QA issue "docker-compose.exe: missing alias (symlink) for completed command."
57
	sed 's,^\(complete.*\) docker-compose\.exe\(.*\),\1\2,' -i contrib/completion/bash/docker-compose || die
58

  
59 23
	default
24
	# do not strip
25
	sed -i -e 's/-s -w//' Makefile || die
60 26
}
61 27

  
62
python_test() {
63
	epytest tests/unit/
28
src_compile() {
29
	emake VERSION=v${PV}
64 30
}
65 31

  
66
python_install_all() {
67
	newbashcomp contrib/completion/bash/docker-compose ${PN}
32
src_test() {
33
	emake test
34
}
68 35

  
69
	insinto /usr/share/zsh/site-functions
70
	doins contrib/completion/zsh/*
36
src_install() {
37
	exeinto /usr/libexec/docker/cli-plugins
38
	doexe bin/build/docker-compose
39
	dodoc README.md
40
}
71 41

  
72
	distutils-r1_python_install_all
42
pkg_postinst() {
43
	ewarn
44
	ewarn "docker-compose 2.x is a sub command of docker"
45
	ewarn "Use 'docker compose' from the command line instead of"
46
	ewarn "'docker-compose'"
47
	ewarn "If you need to keep 1.x around, please run the following"
48
	ewarn "command before your next --depclean"
49
	ewarn "# emerge --noreplace docker-compose:0"
73 50
}
Thank you!