Accepting request 1156208 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1156208
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pure-protobuf?expand=0&rev=2
This commit is contained in:
Ana Guerrero 2024-03-08 17:09:19 +00:00 committed by Git OBS Bridge
commit 95cebe9bb0
7 changed files with 54 additions and 15 deletions

17
get-tests.sh Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/sh
set -e
if [ -z $1 ]; then
echo "Please input a version for which we should download the tests for"
else
VERSION=$1
curl -LO https://github.com/eigenein/protobuf/archive/refs/tags/$VERSION.tar.gz
mkdir -p tmp
tar xf $VERSION.tar.gz -C tmp
cd tmp/protobuf-$VERSION
tar cf python-pure-protobuf-tests-$VERSION.tar.gz tests
mv python-pure-protobuf-tests-$VERSION.tar.gz ../..
cd ../..
rm -rf tmp $VERSION.tar.gz
fi

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08e497d46876ff7f78e8bf703c42788a7e8521be4a6540f7fe37e5259f6ffea2
size 16481

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64340554ae99cf075d6e2f23b34e5b6ce4a90251c0b03ae29d5d1f24091f5424
size 18228

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a8019df38da4e20bf0d37278d878c2eb502a76cbf0616c8d6aa15bc06e73814b
size 51200

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8dcc2aa8f2501eb1b620d8d2c537fc4291486393fc34358a4995974497ded271
size 71680

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Mar 8 00:46:53 UTC 2024 - Richard Rahl <rrahl0@proton.me>
- add script get-tests.sh to fetch tests
- update to 3.0.1:
* technical update (deps)
- update to 3.0.0:
* = field field declarations replaced with Annotated hinting
* Removed @message decorator in favour of BaseMessage
* Re-written the core
* Typing changes (see also: https://eigenein.github.io/protobuf/migration/)
-------------------------------------------------------------------
Sat Dec 16 07:45:47 UTC 2023 - Richard Rahl <rrahl0@proton.me>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pure-protobuf
#
# Copyright (c) 2023 SUSE LLC
# 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
@ -15,26 +15,36 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-pure-protobuf
Version: 2.3.0
Version: 3.0.1
Release: 0
Summary: Protocol Buffers using Python type annotations
Group: Development/Libraries/Python
License: MIT
Group: Development/Libraries/Python
URL: https://github.com/eigenein/protobuf
Source: https://files.pythonhosted.org/packages/source/p/pure-protobuf/pure_protobuf-%{version}.tar.gz
Source1: pure_protobuf-tests-%{version}.tar.gz
BuildRequires: python-rpm-macros
Source1: %{name}-tests-%{version}.tar.gz
Source99: get-tests.sh
BuildRequires: %{python_module get-annotations}
BuildRequires: %{python_module hatch_vcs}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module hatch_vcs}
BuildRequires: %{python_module poetry-dynamic-versioning}
BuildRequires: %{python_module pydantic}
BuildRequires: %{python_module typing-extensions}
BuildRequires: fdupes
BuildRequires: git-core
BuildRequires: python-rpm-macros
## needed for tests
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest-benchmark}
BuildRequires: %{python_module pytest-cov}
BuildArch: noarch
Requires: python-get-annotations
Requires: python-typing-extensions
%python_subpackages
%description
@ -51,8 +61,7 @@ BuildArch: noarch
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
donttest="serializer"
%pytest -k "not $donttest"
%pytest
%files %{python_files}
%{python_sitelib}/pure_protobuf