From 4a80d1693fe2792627192683120b3e6f1dedbf7d790ac5affc81289e04cc939b Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 22 Jan 2025 02:59:36 +0000 Subject: [PATCH 1/2] - Update to 2.0.11 * Github put up the Linux ARM runners for public repos now, so we can have Linux ARM wheels again OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cymem?expand=0&rev=8 --- .gitattributes | 23 +++++++++++++ .gitignore | 1 + cymem-2.0.10.tar.gz | 3 ++ cymem-2.0.11.tar.gz | 3 ++ cymem-2.0.8.tar.gz | 3 ++ python-cymem.changes | 29 ++++++++++++++++ python-cymem.spec | 82 ++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 144 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cymem-2.0.10.tar.gz create mode 100644 cymem-2.0.11.tar.gz create mode 100644 cymem-2.0.8.tar.gz create mode 100644 python-cymem.changes create mode 100644 python-cymem.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cymem-2.0.10.tar.gz b/cymem-2.0.10.tar.gz new file mode 100644 index 0000000..880f354 --- /dev/null +++ b/cymem-2.0.10.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f51700acfa1209b4a221dc892cca8030f4bc10d4c153dec098042f484c7f07a4 +size 10239 diff --git a/cymem-2.0.11.tar.gz b/cymem-2.0.11.tar.gz new file mode 100644 index 0000000..eb6cabb --- /dev/null +++ b/cymem-2.0.11.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efe49a349d4a518be6b6c6b255d4a80f740a341544bde1a807707c058b88d0bd +size 10346 diff --git a/cymem-2.0.8.tar.gz b/cymem-2.0.8.tar.gz new file mode 100644 index 0000000..2f635bb --- /dev/null +++ b/cymem-2.0.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fb09d222e21dcf1c7e907dc85cf74501d4cea6c4ed4ac6c9e016f98fb59cbbf +size 9836 diff --git a/python-cymem.changes b/python-cymem.changes new file mode 100644 index 0000000..bee97ca --- /dev/null +++ b/python-cymem.changes @@ -0,0 +1,29 @@ +------------------------------------------------------------------- +Tue Jan 21 09:53:26 UTC 2025 - John Paul Adrian Glaubitz + +- Update to 2.0.11 + * Github put up the Linux ARM runners for public repos now, + so we can have Linux ARM wheels again + +------------------------------------------------------------------- +Thu Dec 5 14:54:52 UTC 2024 - Dirk Müller + +- update to 2.0.10: + * Update to more recent cibuildwheel, to build wheels for + Python v3.13 + +------------------------------------------------------------------- +Mon Sep 18 09:22:35 UTC 2023 - Dirk Müller + +- update to 2.0.8: + * Python 3.12 support + +------------------------------------------------------------------- +Mon Aug 7 15:01:47 UTC 2023 - Matej Cepl + +- Clean up the SPEC file + +------------------------------------------------------------------- +Mon May 22 21:48:27 UTC 2023 - Greg Freemyer + +- initial version v2.0.7 diff --git a/python-cymem.spec b/python-cymem.spec new file mode 100644 index 0000000..90d2347 --- /dev/null +++ b/python-cymem.spec @@ -0,0 +1,82 @@ +# +# spec file for package python-cymem +# +# Copyright (c) 2025 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/ +# + + +%{?sle15_python_module_pythons} +Name: python-cymem +Version: 2.0.11 +Release: 0 +Summary: Manage calls to calloc/free through Cython +License: MIT +URL: https://github.com/explosion/cymem +Source: https://files.pythonhosted.org/packages/source/c/cymem/cymem-%{version}.tar.gz +BuildRequires: %{python_module Cython3} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: python-rpm-macros +%python_subpackages + +%description +# cymem: A Cython Memory Helper + +cymem provides two small memory-management helpers for Cython. They make it +easy to tie memory to a Python object's life-cycle, so that the memory is freed +when the object is garbage collected. + +## Overview + +The most useful is `cymem.Pool`, which acts as a thin wrapper around the calloc +function: + +```python +from cymem.cymem cimport Pool +cdef Pool mem = Pool() +data1 = mem.alloc(10, sizeof(int)) +data2 = mem.alloc(12, sizeof(float)) +``` + +The `Pool` object saves the memory addresses internally, and frees them when the +object is garbage collected. Typically you'll attach the `Pool` to some cdef'd +class. This is particularly handy for deeply nested structs, which have +complicated initialization functions. Just pass the `Pool` object into the +initializer, and you don't have to worry about freeing your struct at all — +all of the calls to `Pool.alloc` will be automatically freed when the `Pool` +expires. + +%prep +%autosetup -p1 -n cymem-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitearch}/cymem +%{python_sitearch}/cymem-%{version}.dist-info + +%changelog From f6250d3e313d03317b0182f8976abd1f0ca283f2952606213876bd369acd0483 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 22 Jan 2025 03:08:41 +0000 Subject: [PATCH 2/2] - Fix fdupes macro, files are installed to sitearch. - Actually run the test suite. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cymem?expand=0&rev=9 --- python-cymem.changes | 6 ++++++ python-cymem.spec | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/python-cymem.changes b/python-cymem.changes index bee97ca..47d13db 100644 --- a/python-cymem.changes +++ b/python-cymem.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 22 03:07:56 UTC 2025 - Steve Kowalik + +- Fix fdupes macro, files are installed to sitearch. +- Actually run the test suite. + ------------------------------------------------------------------- Tue Jan 21 09:53:26 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-cymem.spec b/python-cymem.spec index 90d2347..774a37d 100644 --- a/python-cymem.spec +++ b/python-cymem.spec @@ -69,9 +69,16 @@ expires. %install %pyproject_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{$python_sitearch} %check +# Avoid the topdir, which means we can't import cymem.cymem +tmpdir=$(mktemp -d) +cp cymem/tests/* $tmpdir +pushd $tmpdir +%pytest_arch +popd +rm -r $tmpdir %files %{python_files} %doc README.md