forked from pool/python-cymem
Accepting request 1102605 from home:gregfreemyer:Tools-for-forensic-boot-cd
libratom has the ability to extract EML files from a PST. It has a dependency on python-cymem. I hope to get libratom added to security:forensics and factory. OBS-URL: https://build.opensuse.org/request/show/1102605 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cymem?expand=0&rev=1
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
cymem-2.0.7.tar.gz
Normal file
3
cymem-2.0.7.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e6034badb5dd4e10344211c81f16505a55553a7164adc314c75bd80cf07e57a8
|
||||
size 9911
|
||||
4
python-cymem.changes
Normal file
4
python-cymem.changes
Normal file
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 22 21:48:27 UTC 2023 - Greg Freemyer <Greg.Freemyer@gmail.com>
|
||||
|
||||
- initial version v2.0.7
|
||||
82
python-cymem.spec
Normal file
82
python-cymem.spec
Normal file
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# spec file for package python-cymem
|
||||
#
|
||||
# Copyright (c) 2023 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.7
|
||||
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-rpm-macros
|
||||
BuildRequires: %{python_module Cython3}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: fdupes
|
||||
%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 = <int*>mem.alloc(10, sizeof(int))
|
||||
data2 = <float*>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
|
||||
Reference in New Issue
Block a user