commit:     e1028e004c4c96b4781cd2ab22a4f2175374dab2
Author:     Mattéo Rossillol‑‑Laruelle <beatussum <AT> protonmail <DOT> com>
AuthorDate: Fri Apr 25 09:29:31 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri Apr 25 09:33:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e1028e00

dev-python/proton-core: new package, add 0.4.0

Signed-off-by: Mattéo Rossillol‑‑Laruelle <beatussum <AT> protonmail.com>

 dev-python/proton-core/Manifest                 |  1 +
 dev-python/proton-core/metadata.xml             | 21 +++++++++
 dev-python/proton-core/proton-core-0.4.0.ebuild | 57 +++++++++++++++++++++++++
 3 files changed, 79 insertions(+)

diff --git a/dev-python/proton-core/Manifest b/dev-python/proton-core/Manifest
new file mode 100644
index 000000000..463e2d0c3
--- /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 000000000..bd7253dd1
--- /dev/null
+++ b/dev-python/proton-core/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>[email protected]</email>
+               <name>Mattéo Rossillol‑‑Laruelle</name>
+       </maintainer>
+
+       <stabilize-allarches/>
+
+       <upstream>
+               <maintainer status="active">
+                       <name>Proton Technologies</name>
+                       <email>[email protected]</email>
+               </maintainer>
+
+               
<bugs-to>https://github.com/ProtonVPN/python-proton-core/issues/</bugs-to>
+               <remote-id 
type="github">ProtonVPN/python-proton-core</remote-id>
+       </upstream>
+</pkgmetadata>

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 000000000..2783e5687
--- /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
+}

Reply via email to