Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pybind11 for openSUSE:Factory checked in at 2022-09-17 20:08:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pybind11 (Old) and /work/SRC/openSUSE:Factory/.python-pybind11.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pybind11" Sat Sep 17 20:08:23 2022 rev:18 rq:1003975 version:2.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pybind11/python-pybind11.changes 2022-04-12 00:13:55.653302614 +0200 +++ /work/SRC/openSUSE:Factory/.python-pybind11.new.2083/python-pybind11.changes 2022-09-17 20:08:31.128841654 +0200 @@ -1,0 +2,138 @@ +Thu Sep 15 20:25:44 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- %pretrans must be lua +- requires python-rpm-macros >= 20220912 because of parameter in + scriptlet +- Fix subdirectory links + +------------------------------------------------------------------- +Wed Sep 14 21:02:16 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Work around long standing rpm-directory-to-symlink-bug + * https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/ + * rh#447156 + * use shell instead of lua for pretrans scriptlet + +------------------------------------------------------------------- +Sun Sep 11 00:15:11 UTC 2022 - Ben Greiner <c...@bnavigator.de> + +- Update to 2.10.0 + * Removed support for Python 2.7, Python 3.5, and MSVC 2015. + Support for MSVC 2017 is limited due to availability of CI + runners; we highly recommend MSVC 2019 or 2022 be used. + Initial support added for Python 3.11. + * New features: + + py::anyset & py::frozenset were added, with copying (cast) + to std::set (similar to set). #3901 + + Support bytearray casting to string. #3707 + + type_caster<std::monostate> was added. std::monostate is a + tag type that allows std::variant to act as an optional, or + allows default construction of a std::variant holding a + non-default constructible type. #3818 + + pybind11::capsule::set_name added to mutate the name of the + capsule instance. #3866 + + NumPy: dtype constructor from type number added, accessors + corresponding to Python API dtype.num, dtype.byteorder, + dtype.flags and dtype.alignment added. #3868 + * Changes: + + Python 3.6 is now the minimum supported version. #3688 #3719 + + The minimum version for MSVC is now 2017. #3722 + + Fix issues with CPython 3.11 betas and add to supported test + matrix. #3923 + + error_already_set is now safer and more performant, + especially for exceptions with long tracebacks, by delaying + computation. #1895 + + Improve exception handling in python str bindings. #3826 + + The bindings for capsules now have more consistent exception + handling. #3825 + + PYBIND11_OBJECT_CVT and PYBIND11_OBJECT_CVT_DEFAULT macro + can now be used to define classes in namespaces other than + pybind11. #3797 + + Error printing code now uses + PYBIND11_DETAILED_ERROR_MESSAGES instead of requiring + NDEBUG, allowing use with release builds if desired. #3913 + + Implicit conversion of the literal 0 to pybind11::handle is + now disabled. #4008 + * Bug fixes: + + Fix exception handling when pybind11::weakref() fails. #3739 + + module_::def_submodule was missing proper error handling. + This is fixed now. #3973 + + The behavior or error_already_set was made safer and the + highly opaque "Unknown internal error occurred" message was + replaced with a more helpful message. #3982 + + error_already_set::what() now handles non-normalized + exceptions correctly. #3971 + + Support older C++ compilers where filesystem is not yet part + of the standard library and is instead included in + std::experimental::filesystem. #3840 + + Fix -Wfree-nonheap-object warnings produced by GCC by + avoiding returning pointers to static objects with + return_value_policy::take_ownership. #3946 + + Fix cast from pytype rvalue to another pytype. #3949 + + Ensure proper behavior when garbage collecting classes with + dynamic attributes in Python >=3.9. #4051 + + A couple long-standing PYBIND11_NAMESPACE + __attribute__((visibility("hidden"))) inconsistencies are + now fixed (affects only unusual environments). #4043 + + pybind11::detail::get_internals() is now resilient to + in-flight Python exceptions. #3981 + + Arrays with a dimension of size 0 are now properly converted + to dynamic Eigen matrices (more common in NumPy 1.23). #4038 + + Avoid catching unrelated errors when importing NumPy. #3974 + * Performance and style: + + Added an accessor overload of (object &&key) to reference + steal the object when using python types as keys. This + prevents unnecessary reference count overhead for attr, + dictionary, tuple, and sequence look ups. Added additional + regression tests. Fixed a performance bug the caused + accessor assignments to potentially perform unnecessary + copies. #3970 + + Perfect forward all args of make_iterator. #3980 + + Avoid potential bug in pycapsule destructor by adding an + error_guard to one of the dtors. #3958 + + Optimize dictionary access in strip_padding for numpy. #3994 + + stl_bind.h bindings now take slice args as a const-ref. + #3852 + + Made slice constructor more consistent, and improve + performance of some casters by allowing reference stealing. + #3845 + + Change numpy dtype from_args method to use const ref. #3878 + + Follow rule of three to ensure PyErr_Restore is called only + once. #3872 + + Added missing perfect forwarding for make_iterator + functions. #3860 + + Optimize c++ to python function casting by using the rvalue + caster. #3966 + + Optimize Eigen sparse matrix casting by removing unnecessary + temporary. #4064 + + Avoid potential implicit copy/assignment constructors + causing double free in strdup_gaurd. #3905 + + Enable clang-tidy checks misc-definitions-in-headers, + modernize-loop-convert, and modernize-use-nullptr. #3881 + #3988 + * Build system improvements: + + CMake: Fix file extension on Windows with cp36 and cp37 + using FindPython. #3919 + + CMake: Support multiple Python targets (such as on vcpkg). + #3948 + + CMake: Fix issue with NVCC on Windows. #3947 + + CMake: Drop the bitness check on cross compiles (like + targeting WebAssembly via Emscripten). #3959 + + Add MSVC builds in debug mode to CI. #3784 + + MSVC 2022 C++20 coverage was added to GitHub Actions, + including Eigen. #3732, #3741 + * Backend and tidying up: + + New theme for the documentation. #3109 + + Remove idioms in code comments. Use more inclusive language. + #3809 + + #include <iostream> was removed from the pybind11/stl.h + header. Your project may break if it has a transitive + dependency on this include. The fix is to "Include What You + Use". #3928 + + Avoid setup.py <command> usage in internal tests. #3734 +- Fix header deduplication: pybind11.get_include still reports + the headers to be in the sitelib (SciPy meson build fail) +- Test in multibuild as some tests expect the system-wide + %_includedir/pybind11/pybind11.h + +------------------------------------------------------------------- Old: ---- pybind11-2.9.2.tar.gz New: ---- _multibuild pybind11-2.10.0.tar.gz python-pybind11-rpmlintrc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pybind11.spec ++++++ --- /var/tmp/diff_new_pack.K98FwB/_old 2022-09-17 20:08:31.632843108 +0200 +++ /var/tmp/diff_new_pack.K98FwB/_new 2022-09-17 20:08:31.636843120 +0200 @@ -16,28 +16,36 @@ # +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%bcond_without test +%else +%bcond_with test +%endif + %if 0%{?suse_version} > 1500 %bcond_without libalternatives %else %bcond_with libalternatives %endif -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!python_module:%define python_module() python3-%{**}} +%define skip_python2 1 +%define plainpython python Name: python-pybind11 -Version: 2.9.2 +Version: 2.10.0 Release: 0 Summary: Module for operability between C++11 and Python License: BSD-3-Clause URL: https://github.com/pybind/pybind11 Source: https://github.com/pybind/pybind11/archive/v%{version}.tar.gz#/pybind11-%{version}.tar.gz -BuildRequires: %{python_module devel} -BuildRequires: %{python_module pytest} +Source99: python-pybind11-rpmlintrc +BuildRequires: %{python_module devel >= 3.6} BuildRequires: %{python_module setuptools} BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: python-rpm-macros >= 20210929 -BuildRequires: %{python_module numpy if (%python-base without python36-base)} +BuildRequires: python-rpm-macros >= 20220912 %if %{with libalternatives} Requires: alts BuildRequires: alts @@ -45,6 +53,12 @@ Requires(post): update-alternatives Requires(postun):update-alternatives %endif +%if %{with test} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pybind11-devel = %{version}} +BuildRequires: %{python_module pytest-timeout} +BuildRequires: %{python_module pytest} +%endif BuildArch: noarch %python_subpackages @@ -66,6 +80,7 @@ Requires: %{name}-common-devel = %{version} Requires: python-devel Requires: python-pybind11 = %{version} +Requires: %{plainpython}(abi) = %{python_version} %description devel This package contains files for developing applications using pybind11. @@ -74,33 +89,77 @@ %setup -q -n pybind11-%{version} %build +%if !%{with test} %python_build # calling cmake to install header to right location and # generate cmake include files %{python_expand pushd . %cmake \ -DPYBIND11_INSTALL=ON \ + -DPYBIND11_TEST=OFF \ + -DPYTHON_EXECUTABLE:FILEPATH=%{_bindir}/$python +%cmake_build +popd +} +%else +%{python_expand pushd . +%cmake \ + -DPYBIND11_INSTALL=OFF \ -DPYBIND11_TEST=ON \ - -DPYTHON_EXECUTABLE:FILEPATH=%{_bindir}/$python \ - + -DPYTHON_EXECUTABLE:FILEPATH=%{_bindir}/$python %cmake_build popd } +%endif %install +%if !%{with test} %python_install %python_clone -a %{buildroot}%{_bindir}/pybind11-config -%python_expand %cmake_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} -# removing duplicated header files -rm -rfv %{buildroot}%{_includedir}/python2.*/pybind11/ -rm -rfv %{buildroot}%{_includedir}/python3.*/pybind11 +%{python_expand # +%cmake_install +# remove duplicated header files from sitelibs but link to common dirs as some +# packages expect them to be in the sitelib where pybind11.get_include() reports them. +rm -r %{buildroot}%{$python_sitelib}/pybind11/include/pybind11 +ln -s %{_includedir}/pybind11 %{buildroot}%{$python_sitelib}/pybind11/include/pybind11 +# same for cmake files: pybind11.get_cmake_dir() +rm -r %{buildroot}%{$python_sitelib}/pybind11/share/cmake/pybind11 +ln -s %{_datadir}/cmake/pybind11 %{buildroot}%{$python_sitelib}/pybind11/share/cmake/pybind11 +# note: next release will also include pkg-config files here: https://github.com/pybind/pybind11/pull/4077 +%fdupes %{buildroot}%{$python_sitelib} +} +%endif +%if %{with test} %check -# test fails as python3-widget is not in distribuion -rm -v tests/test_embed/test_interpreter.py tests/test_embed/test_trampoline.py export PYTHONPATH=${PWD}/build/tests/ -%pytest -k 'not (tests_build_wheel or tests_build_global_wheel)' +# tests fail as python3-widget is not in distribuion +ignore_tests="--ignore tests/test_embed/test_interpreter.py --ignore tests/test_embed/test_trampoline.py" +# no isolated build env with builddep wheels available +ignore_tests="$ignore_tests --ignore tests/extra_python_package/test_files.py" +%pytest $ignore_tests +%endif + +%pretrans devel -p <lua> +-- https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/ +-- rh#447156 +-- Define the paths to directory being replaced in the below. +-- DO NOT add a trailing slash at the end. +paths = {"%{python_sitelib}/pybind11/share/cmake/pybind11", "%{python_sitelib}/pybind11/include/pybind11"} +for i, path in ipairs(paths) do + st = posix.stat(path) + if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end + end +end %pre # If libalternatives is used: Removing old update-alternatives entries. @@ -112,19 +171,27 @@ %postun %python_uninstall_alternative pybind11-config +%if !%{with test} %files %{python_files} %doc README.rst docs/changelog.rst %license LICENSE %python_alternative %{_bindir}/pybind11-config -%{python_sitelib}/pybind11* +%{python_sitelib}/pybind11 +%exclude %{python_sitelib}/pybind11/share/cmake %exclude %{python_sitelib}/pybind11/include +%{python_sitelib}/pybind11-%{version}*-info %files -n %{name}-common-devel -%{_includedir}/pybind11 %license LICENSE +%{_includedir}/pybind11 %{_datadir}/cmake/pybind11 %files %{python_files devel} %license LICENSE +%{python_sitelib}/pybind11/share/cmake +%ghost %{python_sitelib}/pybind11/share/cmake/pybind11.rpmmoved +%{python_sitelib}/pybind11/include +%ghost %{python_sitelib}/pybind11/include/pybind11.rpmmoved +%endif %changelog ++++++ _multibuild ++++++ <multibuild> <package>test</package> </multibuild> ++++++ pybind11-2.9.2.tar.gz -> pybind11-2.10.0.tar.gz ++++++ ++++ 11084 lines of diff (skipped) ++++++ python-pybind11-rpmlintrc ++++++ # The ghost comes from pretrans addFilter("ghost-files-without-postin")