14
0

Accepting request 1146443 from home:avicenzi:protonvpn

Add python-proton-core for Proton VPN

OBS-URL: https://build.opensuse.org/request/show/1146443
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-proton-core?expand=0&rev=1
This commit is contained in:
2024-02-15 08:29:15 +00:00
committed by Git OBS Bridge
commit e38638596f
5 changed files with 107 additions and 0 deletions

76
python-proton-core.spec Normal file
View File

@@ -0,0 +1,76 @@
#
# spec file for package python-proton-core
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python2 1
Name: python-proton-core
Version: 0.1.16
Release: 0
Summary: Proton VPN core library
License: GPL-3.0-or-later
Group: Development/Languages/Python
URL: https://github.com/ProtonVPN/python-proton-core
#Source: https://github.com/ProtonVPN/python-proton-core/archive/refs/tags/v%{version}.tar.gz
Source: https://github.com/ProtonVPN/python-proton-core/archive/refs/heads/master.zip
BuildRequires: %{python_module aiohttp}
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module bcrypt}
BuildRequires: %{python_module gnupg}
BuildRequires: %{python_module pyOpenSSL}
BuildRequires: %{python_module pyotp}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
BuildRequires: fdupes
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: unzip
BuildRequires: pkgconfig(libopenssl)
Requires: python-aiohttp
Requires: python-base >= 3.8
Requires: python-bcrypt
Requires: python-gnupg
Requires: python-pyOpenSSL
Requires: python-requests
Conflicts: python-proton-client
BuildArch: noarch
%python_subpackages
%description
This package contains core logic used by the other Proton components.
%prep
%autosetup -p1 -n python-proton-core-master
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# skip some tests as OBS has no network access
%pytest tests --ignore=tests/test_alternativerouting.py --ignore=tests/test_autotransport.py --ignore=tests/test_protonsso.py --ignore=tests/test_session.py --ignore=tests/test_tlsverification.py
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/proton/
%{python_sitelib}/proton_core-%{version}-*.egg-info
%changelog