- Switch to pyroject macros.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cstruct?expand=0&rev=16
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
python-cstruct-5.3.tar.gz
Normal file
3
python-cstruct-5.3.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:499f6a4356eeaf33d662fd9b4deee3b90e186a0ff12bdab2775bc657bdfc5c19
|
||||
size 38987
|
||||
78
python-cstruct.changes
Normal file
78
python-cstruct.changes
Normal file
@@ -0,0 +1,78 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
- update to 5.3:
|
||||
* fix struct in struct array parsing
|
||||
* Python 3.12 support
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 6 01:00:29 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
- Update to version 5.2
|
||||
Fix
|
||||
- nested struct unpack fix
|
||||
- nested anonymous union offset fix
|
||||
- inspect offset for nested struct/union fix
|
||||
|
||||
- Update to version 5.1
|
||||
Improved
|
||||
* Support unpack from ctype pointers
|
||||
Added
|
||||
* Add support for char constants
|
||||
* Add native type test
|
||||
* dir.py example
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 12 11:16:08 UTC 2022 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 5.0
|
||||
* Add support for enums
|
||||
* Add support for multiple definition to cstruct.parse
|
||||
* Add inspect method
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 4 19:12:43 UTC 2022 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 4.0
|
||||
* Add enum support to cstruct.parse
|
||||
* Add typedef parsing
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 24 15:29:46 UTC 2022 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 3.3
|
||||
* Fix tests on 32bit architecture
|
||||
- Update to version 3.2
|
||||
* Add more tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 14 13:45:17 UTC 2022 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 3.1
|
||||
* Make CStruct/MemCStruct Pickle Friendly
|
||||
- Update to version 3.0
|
||||
* Flexible array support
|
||||
- Update to version 2.3
|
||||
* Fix compare with None
|
||||
- Update to version 2.2
|
||||
Fixes
|
||||
* Fix empty MemCStruct size
|
||||
Improvements
|
||||
* Python 3.10 support
|
||||
* pytest
|
||||
* black code style
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 13 07:17:06 UTC 2022 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- use https for urls
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 13 20:29:38 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Initial package, version 1.8
|
||||
67
python-cstruct.spec
Normal file
67
python-cstruct.spec
Normal file
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# spec file for package python-cstruct
|
||||
#
|
||||
# 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
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
Name: python-cstruct
|
||||
Version: 5.3
|
||||
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
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Convert C struct definitions into Python classes with methods for
|
||||
serializing/deserializing. The usage is very simple: create a class
|
||||
subclassing cstruct.CStruct and add a C struct definition as a
|
||||
string in the struct field. The C struct definition is parsed at
|
||||
runtime and the struct format string is generated. The class offers
|
||||
the method "unpack" for deserializing a string of bytes into a
|
||||
Python object and the method "pack" for serializing the values into
|
||||
a string.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand find %{buildroot}%{$python_sitelib} -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc changelog.txt README.md
|
||||
%{python_sitelib}/cstruct
|
||||
%{python_sitelib}/cstruct-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user