forked from pool/python-cstruct
Compare commits
6 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| d42e743b94 | |||
| c5c4e5cc66 | |||
| e8de34220e | |||
| 2ea1fca470 | |||
| 8ad0fa87b2 | |||
| ac897acdc3 |
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:499f6a4356eeaf33d662fd9b4deee3b90e186a0ff12bdab2775bc657bdfc5c19
|
|
||||||
size 38987
|
|
||||||
3
python-cstruct-6.1.tar.gz
Normal file
3
python-cstruct-6.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3c4f70a8adfaca32542af481bdd58e10b5224d8dc34340e018b940b8b730c060
|
||||||
|
size 41085
|
||||||
@@ -1,3 +1,20 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
||||||
|
|
||||||
|
- update to 6.1:
|
||||||
|
* fix CStruct.pack() padding
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jun 16 06:12:20 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyroject macros.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 8 20:58:43 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
Mon Jan 8 20:58:43 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-cstruct
|
# spec file for package python-cstruct
|
||||||
#
|
#
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
# Copyright (c) 2020-2022, Martin Hauke <mardnh@gmx.de>
|
# Copyright (c) 2020-2022, Martin Hauke <mardnh@gmx.de>
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@@ -18,15 +18,17 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-cstruct
|
Name: python-cstruct
|
||||||
Version: 5.3
|
Version: 6.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: C-style structs for Python
|
Summary: C-style structs for Python
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/andreax79/python-cstruct
|
URL: https://github.com/andreax79/python-cstruct
|
||||||
Source: https://github.com/andreax79/python-cstruct/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
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 pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -43,13 +45,13 @@ Python object and the method "pack" for serializing the values into
|
|||||||
a string.
|
a string.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand find %{buildroot}%{$python_sitelib} -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
|
%python_expand find %{buildroot}%{$python_sitelib} -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
@@ -60,6 +62,6 @@ a string.
|
|||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc changelog.txt README.md
|
%doc changelog.txt README.md
|
||||||
%{python_sitelib}/cstruct
|
%{python_sitelib}/cstruct
|
||||||
%{python_sitelib}/cstruct-%{version}*-info
|
%{python_sitelib}/cstruct-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
16
support-python314.patch
Normal file
16
support-python314.patch
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
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