commit dcfc3ce65bba7c35a5f558e9aedb577b6acdd2e185c1d4299bdd85ad66afb920 Author: Dirk Mueller Date: Sun Jan 21 17:28:29 2024 +0000 Accepting request 1139697 from home:badshah400:branches:science Python wrapper generator for ctypes, needed for obs://science/framel update. This was previously in Factory, but was dropped on account of upstream being dormant between 2019 and 2022 when it started to fail against python 3.6+. Upstream is back making tagged releases again, so let us get this back in Factory as well. OBS-URL: https://build.opensuse.org/request/show/1139697 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ctypesgen?expand=0&rev=1 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/ctypesgen-1.1.1.tar.gz b/ctypesgen-1.1.1.tar.gz new file mode 100644 index 0000000..932506e --- /dev/null +++ b/ctypesgen-1.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:deaa2d64a95d90196a2e8a689cf9b952be6f3366f81e835245354bf9dbac92f6 +size 143415 diff --git a/python-ctypesgen.changes b/python-ctypesgen.changes new file mode 100644 index 0000000..1af8922 --- /dev/null +++ b/python-ctypesgen.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Thu Jan 18 06:43:54 UTC 2024 - Atri Bhattacharya + +- Initial package. diff --git a/python-ctypesgen.spec b/python-ctypesgen.spec new file mode 100644 index 0000000..78b5c3a --- /dev/null +++ b/python-ctypesgen.spec @@ -0,0 +1,70 @@ +# +# spec file for package python-ctypesgen +# +# Copyright (c) 2024 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/ +# + + +Name: python-ctypesgen +Version: 1.1.1 +Release: 0 +Summary: Python wrapper generator for ctypes +License: BSD-2-Clause +URL: https://github.com/ctypesgen/ctypesgen +Source: https://files.pythonhosted.org/packages/source/c/ctypesgen/ctypesgen-%{version}.tar.gz +BuildRequires: python-rpm-macros +BuildRequires: %{pythons} >= 3.7 +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 44} +BuildRequires: %{python_module setuptools_scm >= 3.4.3} +BuildRequires: %{python_module toml} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildArch: noarch +%python_subpackages + +%description +ctypesgen is a pure-python ctypes wrapper generator. It parses C header files +and creates a wrapper for libraries based on what it finds. + +%prep +%autosetup -p1 -n ctypesgen-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/ctypesgen +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# Create a dir in PWD and set TMPDIR to avoid writing to /tmp +export TMPDIR=`mktemp -d -p ${PWD}` +%pyunittest -v + +%post +%python_install_alternative ctypesgen + +%postun +%python_uninstall_alternative ctypesgen + +%files %{python_files} +%doc CHANGELOG.md README.md +%license LICENSE +%python_alternative %{_bindir}/ctypesgen +%{python_sitelib}/ctypesgen/ +%{python_sitelib}/ctypesgen-%{version}*-info/ + +%changelog