Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 2ada665aa2 | |||
| ef4e434023 | |||
| 38db750ec5 | |||
| a92aa0cab6 |
@@ -1,9 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 21 02:43:47 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch support-python314.patch:
|
||||
* Do not support now-removed ast.{Num,Str}.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 12 17:30:43 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-cstruct
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2020-2022, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
@@ -22,9 +22,9 @@ Version: 6.1
|
||||
Release: 0
|
||||
Summary: C-style structs for Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/andreax79/python-cstruct
|
||||
Source: https://github.com/andreax79/python-cstruct/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
Patch0: support-python314.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@@ -45,7 +45,7 @@ Python object and the method "pack" for serializing the values into
|
||||
a string.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
Index: python-cstruct-6.1/cstruct/c_expr.py
|
||||
===================================================================
|
||||
--- python-cstruct-6.1.orig/cstruct/c_expr.py
|
||||
+++ python-cstruct-6.1/cstruct/c_expr.py
|
||||
@@ -167,11 +167,9 @@ except AttributeError: # python < 3.8
|
||||
|
||||
OPS: Dict[Type[ast.AST], Callable[[Any], Any]] = {
|
||||
ast.Expr: lambda node: eval_node(node.value),
|
||||
- ast.Num: lambda node: node.n,
|
||||
ast.Name: eval_get,
|
||||
ast.Call: eval_call,
|
||||
Constant: lambda node: node.value,
|
||||
- ast.Str: lambda node: node.s, # python < 3.8
|
||||
# and/or
|
||||
ast.BoolOp: lambda node: OPS[type(node.op)](node), # and/or operator
|
||||
ast.And: lambda node: all(eval_node(x) for x in node.values), # && operator
|
||||
Reference in New Issue
Block a user