Hello community,
here is the log from the commit of package python-ctypeslib2 for
openSUSE:Factory checked in at 2020-05-28 09:19:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ctypeslib2 (Old)
and /work/SRC/openSUSE:Factory/.python-ctypeslib2.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ctypeslib2"
Thu May 28 09:19:56 2020 rev:2 rq:809614 version:2.2.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-ctypeslib2/python-ctypeslib2.changes
2019-12-04 14:20:09.082426568 +0100
+++
/work/SRC/openSUSE:Factory/.python-ctypeslib2.new.3606/python-ctypeslib2.changes
2020-05-28 09:19:58.913281631 +0200
@@ -1,0 +2,5 @@
+Wed May 27 13:21:25 UTC 2020 - Petr Gajdos <[email protected]>
+
+- %python3_only -> %python_alternative
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ctypeslib2.spec ++++++
--- /var/tmp/diff_new_pack.XGfUDc/_old 2020-05-28 09:19:59.513282730 +0200
+++ /var/tmp/diff_new_pack.XGfUDc/_new 2020-05-28 09:19:59.517282737 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-ctypeslib2
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -13,35 +13,40 @@
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
+#
+
+# No python2-clang
+%define skip_python2 1
+%define oldpython python
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%ifarch %{ix86} x86_64
%bcond_without test
%else
%bcond_with test
%endif
-# No python2-clang
-%define skip_python2 1
-%define oldpython python
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-ctypeslib2
Version: 2.2.2
Release: 0
-License: MIT
Summary: Python FFI toolkit using clang
-Url: https://github.com/trolldbois/ctypeslib
+License: MIT
Group: Development/Languages/Python
+URL: https://github.com/trolldbois/ctypeslib
Source:
https://github.com/trolldbois/ctypeslib/archive/%{version}.tar.gz#/ctypeslib2-%{version}.tar.gz
-BuildRequires: python-rpm-macros
-BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module clang}
-%ifpython2
-# https://github.com/trolldbois/ctypeslib/issues/26
-Conflicts: %oldpython-ctypeslib
-%endif
+BuildRequires: %{python_module pytest}
+BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module testsuite}
BuildRequires: fdupes
+BuildRequires: python-rpm-macros
Requires: python-clang
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
BuildArch: noarch
-
+%ifpython2
+# https://github.com/trolldbois/ctypeslib/issues/26
+Conflicts: %{oldpython}-ctypeslib
+%endif
%python_subpackages
%description
@@ -63,19 +68,33 @@
%install
%python_install
+%python_clone -a %{buildroot}%{_bindir}/clang2py
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
-export PATH=$PATH:%{buildroot}%{_bindir}
export LANG=en_US.UTF-8
-%python_exec setup.py test
+%{python_expand \
+ bin_dir=bin-%{$python_version}
+ mkdir $bin_dir
+ ln -s %{buildroot}%{_bindir}/clang2py-%{$python_version} $bin_dir/clang2py
+ export PATH=$PATH:`pwd`/$bin_dir
+ export PYTHONPATH=:test:./build/lib:%{buildroot}%{$python_sitearch}
+ export PYTHONDONTWRITEBYTECODE=1
+ $python -m unittest discover -s test/ -v
+}
%endif
+%post
+%python_install_alternative clang2py
+
+%postun
+%python_uninstall_alternative clang2py
+
%files %{python_files}
%doc README.md
%license LICENSE.txt
-%python3_only %{_bindir}/clang2py
+%python_alternative %{_bindir}/clang2py
%{python_sitelib}/*
%changelog