diff options
Diffstat (limited to 'dev-python/python-glanceclient')
5 files changed, 222 insertions, 0 deletions
diff --git a/dev-python/python-glanceclient/Manifest b/dev-python/python-glanceclient/Manifest new file mode 100644 index 000000000000..ac2b45b86a87 --- /dev/null +++ b/dev-python/python-glanceclient/Manifest @@ -0,0 +1,2 @@ +DIST python_glanceclient-4.11.0.tar.gz 210930 BLAKE2B b4386364c012b454fd7aaa60f203f53495b790f36886a77b34b62bab4d2d28b34dba0cc54acbd0cd5f0acfb075b11afabeb83219d24c4d1de6129030814b9d4d SHA512 b07869cf5b71cb2a3ed214128dd660fba25cd5789b3fbbdf5874a260583cefc9d8617e0da9a14081fe2afcdb45712e16e514e1c3677bb068c3861953c7fe0318 +DIST python_glanceclient-4.12.0.tar.gz 205137 BLAKE2B 04a3ac06c940072fe4b5c59a966f41a7f4194465a7718232712636f8e48105bdf678868b89674e59525336ccc095f9cc562723634b7535ff4b95580c6327d9ac SHA512 0c8e3ecc0d03cfdc33f0427d5983cabe4140d2a66dec638f9348717183032660009eb832ec31c0ec78b83126a2c3b3b4674bfcbdb7c81de7725e4a88f1c27851 diff --git a/dev-python/python-glanceclient/files/python-glanceclient-4.6.0-test.patch b/dev-python/python-glanceclient/files/python-glanceclient-4.6.0-test.patch new file mode 100644 index 000000000000..6adde80670c0 --- /dev/null +++ b/dev-python/python-glanceclient/files/python-glanceclient-4.6.0-test.patch @@ -0,0 +1,92 @@ +diff --git a/glanceclient/tests/unit/test_http.py b/glanceclient/tests/unit/test_http.py +index 31d21f9..e2ba2c0 100644 +--- a/glanceclient/tests/unit/test_http.py ++++ b/glanceclient/tests/unit/test_http.py +@@ -341,9 +341,9 @@ class TestClient(testtools.TestCase): + self.assertEqual(data, json.loads(self.mock.last_request.body)) + + def test_http_chunked_response(self): +- data = "TEST" ++ data = b"TEST" + path = '/v1/images/' +- self.mock.get(self.endpoint + path, body=io.StringIO(data), ++ self.mock.get(self.endpoint + path, body=io.BytesIO(data), + headers={"Content-Type": "application/octet-stream"}) + + resp, body = self.client.get(path) +@@ -457,9 +457,9 @@ class TestClient(testtools.TestCase): + + def test_log_request_id_once(self): + logger = self.useFixture(fixtures.FakeLogger(level=logging.DEBUG)) +- data = "TEST" ++ data = b"TEST" + path = '/v1/images/' +- self.mock.get(self.endpoint + path, body=io.StringIO(data), ++ self.mock.get(self.endpoint + path, body=io.BytesIO(data), + headers={"Content-Type": "application/octet-stream", + 'x-openstack-request-id': "1234"}) + +diff --git a/glanceclient/tests/unit/test_ssl.py b/glanceclient/tests/unit/test_ssl.py +index f95e777..8b67d4c 100644 +--- a/glanceclient/tests/unit/test_ssl.py ++++ b/glanceclient/tests/unit/test_ssl.py +@@ -87,8 +87,7 @@ class TestHTTPSVerifyCert(testtools.TestCase): + client.images.get('image123') + self.fail('No SSL exception has been raised') + except exc.CommunicationError as e: +- if 'certificate verify failed' not in e.message: +- self.fail('No certificate failure message is received') ++ pass + + @mock.patch('sys.stderr') + def test_v1_requests_cert_verification_no_compression(self, __): +@@ -104,8 +103,7 @@ class TestHTTPSVerifyCert(testtools.TestCase): + client.images.get('image123') + self.fail('No SSL exception has been raised') + except exc.CommunicationError as e: +- if 'certificate verify failed' not in e.message: +- self.fail('No certificate failure message is received') ++ pass + + @mock.patch('sys.stderr') + def test_v2_requests_cert_verification(self, __): +@@ -120,8 +118,7 @@ class TestHTTPSVerifyCert(testtools.TestCase): + gc.images.get('image123') + self.fail('No SSL exception has been raised') + except exc.CommunicationError as e: +- if 'certificate verify failed' not in e.message: +- self.fail('No certificate failure message is received') ++ pass + + @mock.patch('sys.stderr') + def test_v2_requests_cert_verification_no_compression(self, __): +@@ -137,8 +134,7 @@ class TestHTTPSVerifyCert(testtools.TestCase): + gc.images.get('image123') + self.fail('No SSL exception has been raised') + except exc.CommunicationError as e: +- if 'certificate verify failed' not in e.message: +- self.fail('No certificate failure message is received') ++ pass + + @mock.patch('sys.stderr') + def test_v2_requests_valid_cert_verification(self, __): +@@ -154,8 +150,7 @@ class TestHTTPSVerifyCert(testtools.TestCase): + cacert=cacert) + gc.images.get('image123') + except exc.CommunicationError as e: +- if 'certificate verify failed' in e.message: +- self.fail('Certificate failure message is received') ++ pass + + @mock.patch('sys.stderr') + def test_v2_requests_valid_cert_verification_no_compression(self, __): +@@ -171,8 +166,7 @@ class TestHTTPSVerifyCert(testtools.TestCase): + cacert=cacert) + gc.images.get('image123') + except exc.CommunicationError as e: +- if 'certificate verify failed' in e.message: +- self.fail('Certificate failure message is received') ++ pass + + @mock.patch('sys.stderr') + def test_v2_requests_valid_cert_no_key(self, __): diff --git a/dev-python/python-glanceclient/metadata.xml b/dev-python/python-glanceclient/metadata.xml new file mode 100644 index 000000000000..f849de2f5536 --- /dev/null +++ b/dev-python/python-glanceclient/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>prometheanfire@gentoo.org</email> + <name>Matthew Thode</name> + </maintainer> + <maintainer type="project"> + <email>openstack@gentoo.org</email> + <name>Openstack</name> + </maintainer> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <stabilize-allarches/> + <upstream> + <remote-id type="pypi">python-glanceclient</remote-id> + <remote-id type="github">openstack/python-glanceclient</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/python-glanceclient/python-glanceclient-4.11.0.ebuild b/dev-python/python-glanceclient/python-glanceclient-4.11.0.ebuild new file mode 100644 index 000000000000..12636c94bebb --- /dev/null +++ b/dev-python/python-glanceclient/python-glanceclient-4.11.0.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="A client for the OpenStack Glance API" +HOMEPAGE=" + https://opendev.org/openstack/python-glanceclient/ + https://github.com/openstack/python-glanceclient/ + https://pypi.org/project/python-glanceclient/ +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~arm arm64 ~riscv x86" + +RDEPEND=" + >=dev-python/keystoneauth1-3.6.2[${PYTHON_USEDEP}] + >=dev-python/oslo-utils-3.33.0[${PYTHON_USEDEP}] + >=dev-python/oslo-i18n-3.15.3[${PYTHON_USEDEP}] + >=dev-python/pbr-2.1.0[${PYTHON_USEDEP}] + >=dev-python/prettytable-0.7.1[${PYTHON_USEDEP}] + >=dev-python/pyopenssl-17.1.0[${PYTHON_USEDEP}] + >=dev-python/requests-2.14.2[${PYTHON_USEDEP}] + >=dev-python/warlock-1.2.0[${PYTHON_USEDEP}] + >=dev-python/wrapt-1.7.0[${PYTHON_USEDEP}] +" +BDEPEND=" + >=dev-python/pbr-2.1.0[${PYTHON_USEDEP}] + test? ( + dev-python/ddt[${PYTHON_USEDEP}] + dev-python/fixtures[${PYTHON_USEDEP}] + >=dev-python/openstacksdk-0.10.0[${PYTHON_USEDEP}] + dev-python/requests-mock[${PYTHON_USEDEP}] + dev-python/testscenarios[${PYTHON_USEDEP}] + dev-python/testtools[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests unittest + +PATCHES=( + # combined patch for urllib3-2 and py3.12 test failures + # https://bugs.launchpad.net/python-glanceclient/+bug/2069684 + # https://bugs.launchpad.net/python-glanceclient/+bug/2069682 + "${FILESDIR}/${PN}-4.6.0-test.patch" +) + +python_test() { + # functional tests require cloud instance access + eunittest -b glanceclient/tests/unit +} diff --git a/dev-python/python-glanceclient/python-glanceclient-4.12.0.ebuild b/dev-python/python-glanceclient/python-glanceclient-4.12.0.ebuild new file mode 100644 index 000000000000..b87340207dc9 --- /dev/null +++ b/dev-python/python-glanceclient/python-glanceclient-4.12.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit distutils-r1 pypi + +DESCRIPTION="A client for the OpenStack Glance API" +HOMEPAGE=" + https://opendev.org/openstack/python-glanceclient/ + https://github.com/openstack/python-glanceclient/ + https://pypi.org/project/python-glanceclient/ +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" + +RDEPEND=" + >=dev-python/keystoneauth1-3.6.2[${PYTHON_USEDEP}] + >=dev-python/oslo-utils-3.33.0[${PYTHON_USEDEP}] + >=dev-python/oslo-i18n-3.15.3[${PYTHON_USEDEP}] + >=dev-python/pbr-2.1.0[${PYTHON_USEDEP}] + >=dev-python/prettytable-0.7.1[${PYTHON_USEDEP}] + >=dev-python/pyopenssl-17.1.0[${PYTHON_USEDEP}] + >=dev-python/requests-2.14.2[${PYTHON_USEDEP}] + >=dev-python/warlock-1.2.0[${PYTHON_USEDEP}] + >=dev-python/wrapt-1.7.0[${PYTHON_USEDEP}] +" +BDEPEND=" + >=dev-python/pbr-2.1.0[${PYTHON_USEDEP}] + test? ( + dev-python/ddt[${PYTHON_USEDEP}] + dev-python/fixtures[${PYTHON_USEDEP}] + >=dev-python/openstacksdk-0.10.0[${PYTHON_USEDEP}] + dev-python/requests-mock[${PYTHON_USEDEP}] + dev-python/testscenarios[${PYTHON_USEDEP}] + dev-python/testtools[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests unittest + +python_test() { + # functional tests require cloud instance access + eunittest -b glanceclient/tests/unit +} |
