summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2022-12-15 18:20:03 +0100
committerSebastian Pipping <sping@gentoo.org>2022-12-15 18:27:21 +0100
commit41a920ba3bd67514061ad04dac0699c9c48b6cc0 (patch)
treeddc2ce01b098348008ba4bed2c337e8737dff84e /app-containers
parentxfce-base/xfdesktop: Stabilize 4.16.1 ppc, #886133 (diff)
downloadgentoo-41a920ba3bd67514061ad04dac0699c9c48b6cc0.tar.gz
gentoo-41a920ba3bd67514061ad04dac0699c9c48b6cc0.tar.bz2
gentoo-41a920ba3bd67514061ad04dac0699c9c48b6cc0.zip
app-containers/docker-compose: 1.x.x: Fix tests + EAPI 8 + PythonGHDistfileSuffix
Closes: https://bugs.gentoo.org/885807 Signed-off-by: Sebastian Pipping <sping@gentoo.org>
Diffstat (limited to 'app-containers')
-rw-r--r--app-containers/docker-compose/Manifest2
-rw-r--r--app-containers/docker-compose/docker-compose-1.29.2-r1.ebuild2
-rw-r--r--app-containers/docker-compose/docker-compose-1.29.2-r2.ebuild72
-rw-r--r--app-containers/docker-compose/files/docker-compose-1.29.2-tests-unit-cli-test-py.patch33
4 files changed, 107 insertions, 2 deletions
diff --git a/app-containers/docker-compose/Manifest b/app-containers/docker-compose/Manifest
index 42d5467f54f8..8a8da99c8ed6 100644
--- a/app-containers/docker-compose/Manifest
+++ b/app-containers/docker-compose/Manifest
@@ -1,3 +1,3 @@
-DIST docker-compose-1.29.2.tar.gz 320320 BLAKE2B 2d1a6375127fa09661822f7148665161b45bbd234c93444ae31c1d926513fcbc9fb845f8af01d8f11788f24b7517bff5f6cea2a5da9ade897891f2dd728f26bd SHA512 09f2ae2ae7a17ab5fb3e22580f7a80f1a8253f7ad9fc8f29aca432911bcde46ed22030ff3073cdd7eff3d55aaba17f56e628a178ec05c3a9b4f28495d6045111
+DIST docker-compose-1.29.2.gh.tar.gz 320320 BLAKE2B 2d1a6375127fa09661822f7148665161b45bbd234c93444ae31c1d926513fcbc9fb845f8af01d8f11788f24b7517bff5f6cea2a5da9ade897891f2dd728f26bd SHA512 09f2ae2ae7a17ab5fb3e22580f7a80f1a8253f7ad9fc8f29aca432911bcde46ed22030ff3073cdd7eff3d55aaba17f56e628a178ec05c3a9b4f28495d6045111
DIST docker-compose-2.12.2-deps.tar.xz 139592724 BLAKE2B fd0e375e9cefe802d6d557763838959712f31391c2ac4e5e41d37ce2b6df209c35e86f255197ccb39ca04dc9ea9b04de29347570d0d1b0ed5a0b2d094c5e24a7 SHA512 af4e431dbb4735fa1a2aff2271e052479b4e4dac83f2d7a733aac9aab0ac33e00499d81b6c8a6a36aa330618a89c44993c5b27349752678ce1ac41921f12dfbe
DIST docker-compose-2.12.2.tar.gz 305198 BLAKE2B a39a0c2266abc442f1c65ac00da9dd380df85d2aaa9429898461f12138fe64a7a6c74a45b3bb734419b7093ec69a44b49dfc57ff264a2d3cb576a78a0720db03 SHA512 dfb82ecc5a984d7193da164924c1e430d07b6378028dac7264b8084da2e315e5c5091803a5db79fe27ed06b002c62b295d873b9371bd19d4550a37a28f8ec952
diff --git a/app-containers/docker-compose/docker-compose-1.29.2-r1.ebuild b/app-containers/docker-compose/docker-compose-1.29.2-r1.ebuild
index 81541d84c81a..fe80850192d1 100644
--- a/app-containers/docker-compose/docker-compose-1.29.2-r1.ebuild
+++ b/app-containers/docker-compose/docker-compose-1.29.2-r1.ebuild
@@ -10,7 +10,7 @@ inherit bash-completion-r1 distutils-r1
MY_PV=${PV/_/-}
DESCRIPTION="Multi-container orchestration for Docker"
HOMEPAGE="https://github.com/docker/compose"
-SRC_URI="https://github.com/docker/compose/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/docker/compose/archive/${MY_PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
diff --git a/app-containers/docker-compose/docker-compose-1.29.2-r2.ebuild b/app-containers/docker-compose/docker-compose-1.29.2-r2.ebuild
new file mode 100644
index 000000000000..fc63be54e95e
--- /dev/null
+++ b/app-containers/docker-compose/docker-compose-1.29.2-r2.ebuild
@@ -0,0 +1,72 @@
+# Copyright 2018-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit bash-completion-r1 distutils-r1
+
+MY_PV=${PV/_/-}
+DESCRIPTION="Multi-container orchestration for Docker"
+HOMEPAGE="https://github.com/docker/compose"
+SRC_URI="https://github.com/docker/compose/archive/${MY_PV}.tar.gz -> ${P}.gh.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+
+RDEPEND="
+ >=dev-python/distro-1.5.0[${PYTHON_USEDEP}]
+ >=dev-python/docker-py-5[${PYTHON_USEDEP}]
+ >=dev-python/dockerpty-0.4.1[${PYTHON_USEDEP}]
+ >=dev-python/docopt-0.6.1[${PYTHON_USEDEP}]
+ >=dev-python/python-dotenv-0.13.0[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-2.5.1[${PYTHON_USEDEP}]
+ dev-python/paramiko[${PYTHON_USEDEP}]
+ >=dev-python/PySocks-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.20.0[${PYTHON_USEDEP}]
+ >=dev-python/six-1.3.0[${PYTHON_USEDEP}]
+ >=dev-python/texttable-0.9.0[${PYTHON_USEDEP}]
+ >=dev-python/websocket-client-0.32.0[${PYTHON_USEDEP}]"
+
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-python/pytest-5[${PYTHON_USEDEP}]
+ >=dev-python/ddt-1.2.2[${PYTHON_USEDEP}]
+ )"
+
+S="${WORKDIR}/compose-${MY_PV}"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ # Bug #679968 -- https://bugs.gentoo.org/679968
+ # Bug #681002 -- https://bugs.gentoo.org/681002
+ "${FILESDIR}"/${PN}-1.29.0-setup-py.patch
+ "${FILESDIR}"/${P}-tests-unit-cli-test-py.patch
+)
+
+DOCS=( CHANGELOG.md README.md )
+
+src_prepare() {
+ # Address QA issue "docker-compose.exe: missing alias (symlink) for completed command."
+ sed 's,^\(complete.*\) docker-compose\.exe\(.*\),\1\2,' -i contrib/completion/bash/docker-compose || die
+
+ default
+}
+
+python_test() {
+ distutils_install_for_testing
+ epytest tests/unit/
+}
+
+python_install_all() {
+ newbashcomp contrib/completion/bash/docker-compose ${PN}
+
+ insinto /usr/share/zsh/site-functions
+ doins contrib/completion/zsh/*
+
+ distutils-r1_python_install_all
+}
diff --git a/app-containers/docker-compose/files/docker-compose-1.29.2-tests-unit-cli-test-py.patch b/app-containers/docker-compose/files/docker-compose-1.29.2-tests-unit-cli-test-py.patch
new file mode 100644
index 000000000000..0d6cf44c1887
--- /dev/null
+++ b/app-containers/docker-compose/files/docker-compose-1.29.2-tests-unit-cli-test-py.patch
@@ -0,0 +1,33 @@
+From 988f954a7e185c521e7c0f720684e8a53068b136 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Thu, 15 Dec 2022 18:11:03 +0100
+Subject: [PATCH] tests/unit/cli_test.py: Fix access to
+ py._path.local.LocalPath
+
+.. for test CLITestCase.test_default_project_name:
+
+> class CLITestCase(unittest.TestCase):
+>
+> def test_default_project_name(self):
+> test_dir = py._path.local.LocalPath('tests/fixtures/simple-composefile')
+> [..]
+---
+ tests/unit/cli_test.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/unit/cli_test.py b/tests/unit/cli_test.py
+index fa6e767..83ecef8 100644
+--- a/tests/unit/cli_test.py
++++ b/tests/unit/cli_test.py
+@@ -4,7 +4,7 @@ import tempfile
+ from io import StringIO
+
+ import docker
+-import py
++import py._path.local
+ import pytest
+ from docker.constants import DEFAULT_DOCKER_API_VERSION
+
+--
+2.39.0
+