From e1028e004c4c96b4781cd2ab22a4f2175374dab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Rossillol=E2=80=91=E2=80=91Laruelle?= Date: Fri, 25 Apr 2025 11:29:31 +0200 Subject: [PATCH] dev-python/proton-core: new package, add 0.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattéo Rossillol‑‑Laruelle --- dev-python/proton-core/Manifest | 1 + dev-python/proton-core/metadata.xml | 21 +++++++ .../proton-core/proton-core-0.4.0.ebuild | 57 +++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 dev-python/proton-core/Manifest create mode 100644 dev-python/proton-core/metadata.xml create mode 100644 dev-python/proton-core/proton-core-0.4.0.ebuild diff --git a/dev-python/proton-core/Manifest b/dev-python/proton-core/Manifest new file mode 100644 index 0000000000..463e2d0c34 --- /dev/null +++ b/dev-python/proton-core/Manifest @@ -0,0 +1 @@ +DIST proton-core-0.4.0.tar.gz 76129 BLAKE2B 8c91394b8f21978db7d24b5672a50ce14ddc0fe8497ba25a93b581968a67099614067907b00f1fb3ee8416404f3a828530097bb0c47fa146f93ece5bf64db1a1 SHA512 92ea46838b6494cef868d395cbaa94e65fd27dd4bf649c8a208a2942ccf10f5c8cd21ef0e3c2f416c6ea04e68d304c7d6a16666aeeab8de5be727a0c730cfed1 diff --git a/dev-python/proton-core/metadata.xml b/dev-python/proton-core/metadata.xml new file mode 100644 index 0000000000..bd7253dd10 --- /dev/null +++ b/dev-python/proton-core/metadata.xml @@ -0,0 +1,21 @@ + + + + + + beatussum@protonmail.com + Mattéo Rossillol‑‑Laruelle + + + + + + + Proton Technologies + contact@protonmail.com + + + https://github.com/ProtonVPN/python-proton-core/issues/ + ProtonVPN/python-proton-core + + diff --git a/dev-python/proton-core/proton-core-0.4.0.ebuild b/dev-python/proton-core/proton-core-0.4.0.ebuild new file mode 100644 index 0000000000..2783e5687e --- /dev/null +++ b/dev-python/proton-core/proton-core-0.4.0.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{11..13} ) + +inherit distutils-r1 + +DESCRIPTION="Proton Technologies API wrapper" +HOMEPAGE="https://github.com/ProtonVPN/python-proton-core/" +SRC_URI="https://github.com/ProtonVPN/python-proton-core/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/python-${P}" +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND="test? ( dev-python/pyotp[${PYTHON_USEDEP}] )" + +RDEPEND=" + dev-python/aiohttp[${PYTHON_USEDEP}] + dev-python/bcrypt[${PYTHON_USEDEP}] + dev-python/pyopenssl[${PYTHON_USEDEP}] + dev-python/python-gnupg[${PYTHON_USEDEP}] + dev-python/requests[${PYTHON_USEDEP}] +" + +distutils_enable_sphinx docs +distutils_enable_tests pytest + +src_prepare() { + distutils-r1_src_prepare + + sed -i "/--cov/d" setup.cfg || die +} + +python_test() { + # The following tests need network + + EPYTEST_DESELECT=( + "tests/test_alternativerouting.py::TestAlternativeRouting::test_alternative_routing_works_on_prod" + "tests/test_autotransport.py::TestAuto::test_auto_works_on_prod" + "tests/test_protonsso.py::TestProtonSSO::test_broken_data" + "tests/test_protonsso.py::TestProtonSSO::test_broken_index" + "tests/test_protonsso.py::TestProtonSSO::test_sessions" + "tests/test_session.py::TestSession::test_ping" + "tests/test_tlsverification.py::TestTLSValidation::test_bad_pinning_fingerprint_changed" + "tests/test_tlsverification.py::TestTLSValidation::test_bad_pinning_url_changed" + "tests/test_tlsverification.py::TestTLSValidation::test_successful" + "tests/test_tlsverification.py::TestTLSValidation::test_without_pinning" + ) + + XDG_RUNTIME_DIR="${T}/python_test" epytest +}