- Update to 0.18.1

* Support for setuptools 74 in #1116
  * iOS and Android support by @FeodorFitsner in #1101
  * Fix for distutils change in #1103
  * Remove test directives by @s-t-e-v-e-n-k in #1108
- Drop patches
  * support-setuptools-72-distutils.patch
  * support-setuptools-72-test-directives.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-scikit-build?expand=0&rev=50
This commit is contained in:
Benjamin Greiner 2024-08-29 14:16:55 +00:00 committed by Git OBS Bridge
commit b9e59c928f
12 changed files with 782 additions and 0 deletions

23
.gitattributes vendored Normal file
View 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
View File

@ -0,0 +1 @@
.osc

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

456
python-scikit-build.changes Normal file
View File

@ -0,0 +1,456 @@
-------------------------------------------------------------------
Thu Aug 29 13:35:59 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 0.18.1
* Support for setuptools 74 in #1116
* iOS and Android support by @FeodorFitsner in #1101
* Fix for distutils change in #1103
* Remove test directives by @s-t-e-v-e-n-k in #1108
- Drop patches
* support-setuptools-72-distutils.patch
* support-setuptools-72-test-directives.patch
-------------------------------------------------------------------
Wed Jul 31 06:14:00 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-setuptools-72-distutils.patch:
* Don't monkey patch distutils incorrectly.
- Add patch support-setuptools-72-test-directives.patch:
* Remove test{_suite,s_require} directives.
-------------------------------------------------------------------
Thu Jul 11 09:01:25 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Update to 0.18.0
## Bug fixes
* Support MSVC 17.10 in #1081
* CMake 3.5+ requirement in #1095
* Support CPython 3.13 with windows lib finding fix in #1094
* Don't die on PermissionError during chmod by @mweinelt in #1073
* Remove usage of deprecated distutils in cmake files by
@hmaarrfk in #1032
* Use first available option for vswhere output by @ZzEeKkAa in
#1030
## Testing
* Support setuptools 69.3.0 changes in two tests by
@s-t-e-v-e-n-k in #1087
* Use uv in a few places in #1092
## Miscellaneous
* Clean up pylint in #1017
* Fix mypy type ignores for new setuptools types in #1082
* Move to Ruff-format in #1035
* Remove pkg_resources and test command in #1014
* Ruff moved to astral-sh in #1007
* Target-version no longer needed by Black or Ruff in #1008
* Update ruff and fix warnings in #1060
* Use 2x faster black mirror in #1021
* Group dependabot updates in #1054
* macos-latest is changing to macos-14 ARM runners in #1083
* Skip win PyPy PEP 518 in #1091
- Drop support-setuptools-69-3.patch
-------------------------------------------------------------------
Mon Jun 3 06:10:14 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-setuptools-69-3.patch:
* Support changes introduced by setuptools 69.3.0.
-------------------------------------------------------------------
Sat Jul 1 13:49:46 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.17.6
* Support added for SunOS by @mtelka in #983.
* Support added for AIX (with recent CMake) by @bhuntsman in
#988.
* Tests now pass on CPython 3.12.0b1 in #879.
* Tests no longer use pytest-virtualenv in #879.
* isolated marker now includes test_distribution tests in #879.
* Tests avoid incorrect get_map match by @keszybz in #990.
-------------------------------------------------------------------
Tue May 16 19:21:48 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.17.5
* Generator args were missing for actual compile in #975
* Add support for netbsd & pyodide (future) in #977
-------------------------------------------------------------------
Thu May 11 14:26:58 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.17.4
* Make sure include dir is found even if the lib is not present
in #974.
- Release 0.17.3
* A small release related to PYTHON_LIBRARY handling changes in
0.17.2; scikit-build 0.17.3 returns an empty string from
get_python_library if no Python library is present (like on
manylinux), where 0.17.2 returned None, and previous versions
returned a non-existent path. Note that adding REQUIRED to
find_package(PythonLibs will fail, but it is incorrect (you
must not link to libPython.so) and was really just injecting a
non-existent path before.
## Bug fixes
* Keep get_python_library return type string if python lib
non-existing for now in #959.
* Avoid 'not found' warning if libs are not found by
FindPythonExtensions in #960.
* FindNumPy should not call FindPythonLibs in #958.
-------------------------------------------------------------------
Mon May 8 07:47:37 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>
- add sle15_python_module_pythons
-------------------------------------------------------------------
Tue Apr 25 17:07:11 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.17.2
## Bug fixes
* Validate value before returning library path by @dlech in #942.
* Only add Python_LIBRARY on Windows MSVC in #943 and #944.
* Slightly nicer traceback for failed compiler in 947.
## Testing
* Hide a few warnings that are expected in #494.
- Release 0.17.1
* This is a small release fixing a few bugs; the primary one
being a change that was triggering a bug in older FindPython.
The unused variable messages have been deactivated to simplify
output, as well.
* Older (<3.24) CMake breaks when lib specified in #932
* An error output was missing formatting in #931
* Make empty CMAKE_OSX_DEPLOYMENT_TARGET a warning (bug in
conda-forge's clang activation fixed upstream) in #934
* Remove unused variable warnings by in #930
- Release 0.17.0
* A lot of bug fixes are present in this release, focusing on
Windows, PyPy, and cross compiling. We've also improved the
compatibility with default setuptools behaviors a little, and
enabled some things that were previously unavailable, like
overriding the build type via the cmake argument environment
variables. We've expanded our CI matrix to include Windows and
macOS PyPy and some Fortran tests on Linux. This release
requires Python 3.7+.
## Bug fixes
* Match setuptools behavior for include_package_data default by
@vyasr in #873.
* Misc. fixes for F2PY and PythonExtensions modules by @benbovy
in #495.
* Provide more useful error if user provides CMAKE_INSTALL_PREFIX
by @vyasr in #872.
* Stop assuming that .pyx files are in the same directory as
CMakeLists.txt by @vyasr in #871.
* Allow build type overriding in #902.
* Include library for FindPython for better Windows
cross-compiles in #913. Thanks to @maxbachmann for testing.
* Fix logic for default generator when cross-compiling for ARM on
Windows by @dlech in #917.
* Use f2py's get_include if present in #877.
* Fix support for cross-compilation exception using
targetLinkLibrariesWithDynamicLookup by @erykoff in #901.
* Treat empty MACOSX_DEPLOYMENT_TARGET as if it was unset in
#918.
## Testing
* Add hello fortran sample package + tests by @benbovy in #493.
* Add sdist check & fix in #906.
* Fix some setuptools types in #888.
## Miscellaneous
* Drop Python 3.6 in #862.
* Move building backend to hatchling in #870.
* Avoid mutating function input parameters in #899.
* Use _compat/typing name in #869.
-------------------------------------------------------------------
Mon Apr 3 18:09:24 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.16.7
* Added SKBUILD_GNU_SKIP_LOCAL_SYMBOL_EXPORT_OVERRIDE to disable
script in #848, thanks to @aaron-bray and @vyasr.
* Address a new warning from setuptools in our test suite in
#859.
* Move to using Ruff, update to Black 23, and use Flynt to move
more code to f-strings.
-------------------------------------------------------------------
Sat Jan 21 17:22:01 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to 0.16.6
* Fix a discovery regression in 0.16.5 when a cmake folder or
cmake.py was present in #848.
* Correct an issue in the tests where a generator wasn't expanded
into a list in #850.
- Version 0.16.5
* Use cmake module if installed over system installs in #839.
* Support setting of -DCMAKE_SYSTEM_PROCESSOR if passed for
selecting an arch, useful for cross compiling on conda-forge in
#843.
* Fixed a rare encoded error output string on Windows in #842.
* Better granularity in extras in #838.
* Add test markers for nosetuptoolsscm and isolated (helpful for
package distributions building scikit-build itself like conda)
in #837.
-------------------------------------------------------------------
Wed Jan 4 16:30:24 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Remove pyproject.toml tool.pylint entries not relevant for us and
failing old py3.6 pip in 15.X
- Old setuptools_scm in 15.X does not pull in toml automatically
-------------------------------------------------------------------
Wed Dec 21 22:23:44 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 0.16.4
* This releases backports additions for Windows ARM
cross-compiling via cibuildwheel from scikit-build-core 0.1.4.
* Initial experimental support for Windows ARM cross-compile in
#824 and #818
* Replace mailing list with GitHub Discussions board in #823
* Some CI updates in #811 and #812
- Version 0.16.3
* This release fixes logging issues using setuptools 65.6+
affecting our tests. Pytest 7.2+ is now supported. setup.py
<command> and setup_requires are deprecated, and tests are
marked as such.
* Fix typo in usage.rst in #795, thanks to @chohner.
* Support pytest 7.2+ in #801.
* Change warning filtering in #802.
* Handle logging changes in setuptools 65.6+ in #807.
* Add deprecated markers to some tests in #807.
* Allow known warnings to show up in the tests #807.
- Version 0.16.2
* This addresses one more small regression with the FindPython
change from 0.16.0 that was affecting conda. #793
-------------------------------------------------------------------
Sat Oct 29 15:32:48 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 0.16.1
* Patch release that fixes a missing Python requires setting and
some missing files #790, and addresses a warning from
setuptools in the tests.
- Drop skbuild-pr785-ignoredeprecation.patch fixed upstream
-------------------------------------------------------------------
Sat Oct 29 12:54:06 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 0.16.0
* This release adds support for Python 3.11 and removes support
for Python 2.7 and 3.5 (#688). Testing and static checking
improved, including being fully statically typed internally
(though setuptools is not fully typed, so it is of limited
use).
* All deprecated setuptools/distutils features are also
deprecated in scikit-build, like the test command,
easy_install, etc. Editable mode is still unsupported. Python
3.6 support is deprecated. Older versions of CMake (<3.15) are
not recommended; a future version will remove support for older
CMake's (along with providing a better mechanism for ensuring a
proper CMake is available). If you need any of these features,
please open or find an issue explaining what and why you need
something.
* Cython module now supports FindPython mode. #743
* PyPy is discovered without extra settings in FindPython mode
#744
* FindPython mode uses a new path specification, should help make
it usable. #774
* Better flushing and output streams for more consistent output
ordering. #781
- Add skbuild-pr785-ignoredeprecation.patch
* gh#scikit-build/scikit-build#785
-------------------------------------------------------------------
Wed Aug 24 09:44:45 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 0.15.0
* Add support for FindPython (including 2 and 3). Thanks
@hameerabbasi for the contribution. See #712.
* Add support for Cygwin. Thanks @ax3l and @DWesl and @poikilos
for the help! See #485.
* Fixed issue with distutils usage in Python 3.10. Thanks to
@SuperSandro2000 for the contribution in #700.
- Release 0.14.1
* Fix issue with SKBUILD_CONFIGURE_OPTIONS not being read.
* Reverted manifest install changes.
- Release 0.14.0
* Add support for --install-target scikit-build command line
option. And cmake_install_target in setup.py. Allows providing
an install target different than the default install. Thanks
@phcerdan for the contribution. See #477.
* The manifest install location computation was fixed. Thanks
@kratsg for the contribution in #682.
* Byte-compilation was skipped due to a missing return. Thanks
@pekkarr in #678.
* Packages can now be computed from the same shared collections,
before this could confuse Scikit-build. Thanks @vyasr in #675.
* Fixed library detection for PyPy 3.9. Thanks @rkaminsk in #673.
* Scikit-build now uses pyproject.toml and setuptools_scm to
build. If you are packaging scikit-build itself, you might need
to update your requirements. See #634.
* The codebase is now formatted with Black. #665
-------------------------------------------------------------------
Wed Aug 24 09:44:44 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Skip a test failing with setuptools 62+
-------------------------------------------------------------------
Thu Mar 31 20:50:59 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Replace a stray mock import by unittest.mock
-------------------------------------------------------------------
Fri Mar 25 13:17:01 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 0.13.1
* Do not throw an error when printing info and a logger is
disconnected. #652
-------------------------------------------------------------------
Sat Feb 5 17:40:26 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 0.13.0
* If you are using scikit-build via pyproject.toml, please
remember to include setuptools and wheel. A future version of
scikit-build may remove the setuptools install-time hard
requirement.
* CMake module /cmake-modules/Cython now uses Cython default
arguments. This no longer adds --no-docstrings in Release and
MinSizeRel builds, so Cython docstrings are now retained by
default. Additionally, --embed-positions is no longer added to
Debug and RelWithDebInfo builds. Users can enable these and
other Cython arguments via the option CYTHON_FLAGS. See #518
and #519, thanks to @bdice for the improvement.
* Experimental support for ARM64 on Windows. Thanks to
@gaborkertesz-linaro in #612.
* Support for MSVC 2022. Thanks to @tttapa for the contribution
in #627.
* Support the modern form of target_link_libraries, via
SKBUILD_LINK_LIBRARIES_KEYWORD (somewhat experimental). Thanks
to @maxbachmann in #611.
* Update the Ninja path if using the ninja package. This fixes
repeated isolated builds. Further path inspection and updates
for isolated builds may be considered in the future. #631,
thanks to @RUrlus and @segevfiner for help in tracking this
down.
* Allow OpenBSD to pass the platform check (untested). See #586.
* Avoid forcing the min macOS version. Behaviour is now inline
with setuptools. Users should set MACOSX_DEPLOYMENT_TARGET when
building (automatic with cibuildwheel), otherwise you will get
the same value Python was compiled with. Note: This may seem
like a regression for PyPy until the next release (7.3.8),
since it was compiled with 10.7, which is too old to build with
on modern macOS - manually set MACOSX_DEPLOYMENT_TARGET
(including setting it if unset in your setup.py) for PyPy until
7.3.8. #607
* Fix logging issue when using Setuptools 60.2+. #623
* MacOS cross compiling support fix (for conda-forge) for
built-in modules. Thanks to @isuruf for the contribution in
#622.
* Better detection of the library path, fixes some issues with
PyPy. Thanks to @rkaminsk for the contribution in #620 and
#630. PyPy is now part of our testing matrix as of #624. Also
@robtaylor in #632.
* Fixed issue when cross-compiling on conda-forge (probably
upstream bug, but easy to avoid). #646.
-------------------------------------------------------------------
Sun Oct 10 10:24:26 UTC 2021 - Ben Greiner <code@bnavigator.de>
- Update to version 0.12.0
* Fixed a regression that caused setuptools to complain about
unknown setup option (cmake_process_manifest_hook).
* If it applies, ensure generator toolset is used to configure
the project.
* Read CYTHON_FLAGS where needed, instead of once, allowing the
user to define multiple modules with different flags.
* Avoid an IndexError if prefix was empty.
-------------------------------------------------------------------
Thu Dec 3 00:02:25 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Support multiple python3 flavors
gh#openSUSE/python-rpm-macros#66
-------------------------------------------------------------------
Mon Jun 1 17:33:56 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Update to version 0.11.1
* Support using scikit-build with conan where distro<1.2.0 is required.
Thanks @AntoinePrv and @Chrismarsh for reporting issue gh#scikit-build/scikit-build#472
and gh#scikit-build/scikit-build#488.
* Fix link in `Conda: Step-by-step` release guide available in `/make_a_release` section.
- Changelog for version 0.11.0
* Add a hook to process the cmake install manifest building the wheel. The hook
function can be specified as an argument to the `setup()` function. This can be used e.g.
to prevent installing cmake configuration files, headers, or static libraries with the wheel.
Thanks @SylvainCorlay for the contribution. See gh#scikit-build/scikit-build#473.
* Add support for passing :ref:`CMake configure options <usage_cmake_configure_options>` like `-DFOO:STRING:bar`
as global `setuptools` or `pip` options.
* Add support for building project using PyPy or PyPy3. See https://pypy.org
See gh#scikit-build/scikit-build#407.
* Add support for OS/400 (now known as IBM i).
Thanks @jwoehr for the contribution. See gh#scikit-build/scikit-build#444.
* Display CMake command used to configure the project.
Thanks @native-api for the contribution. See gh#scikit-build/scikit-build#443.
* Improve CMake module `/cmake-modules/F2PY` adding `add_f2py_target()` CMake function
allowing to generate `*-f2pywrappers.f` and `*module.c` files from `*.pyf` files.
Thanks @xoviat for the contribution.
* Update CMake module `/cmake-modules/PythonExtensions` adding `add_python_library()`
and `add_python_extension()`.
Thanks @xoviat for the contribution.
* Fix python 2.7 installation ensuring setuptools < 45 is required. See gh#scikit-build/scikit-build#478.
* Fix unclosed file resource in :meth:`skbuild.cmaker.CMaker.check_for_bad_installs`.
Thanks @Nic30 for the suggestion. See gh#scikit-build/scikit-build#429.
* Update CMake module `/cmake-modules/PythonExtensions`:
* Ensure correct suffix is used for compiled python module on windows. See gh#scikit-build/scikit-build#383.
* Fix warning using `EXT_SUFFIX` config variable instead of deprecated `SO` variable. See gh#scikit-build/scikit-build#381.
* Honor the `MACOSX_DEPLOYMENT_TARGET` environment variable if it is defined on
macOS. Thanks @certik for the contribution. See gh#scikit-build/scikit-build#441.
* Fix CMake module `/cmake-modules/F2PY` to ensure the `f2py` executable specific to
the python version being used is found. See gh#scikit-build/scikit-build#449. Thanks @bnavigator for
the contribution.
* Replace `platform.linux_distribution()` which was removed in Python 3.8 by a call to
`distro.id()`. This adds the `distro` package as dependency. See gh#scikit-build/scikit-build#458. Thanks
@bnavigator for the contribution.
* Add `/notes` section to the `For maintainers` top-level category that includes a comparison between
`sysconfig` and `distutils.sysconfig` modules.
* Remove obsolete comment in `cmaker.py`. See gh#scikit-build/scikit-build#439. Thanks @isuruf
* Update `initialize_git_repo_and_commit` to prevent signing message on system with commit signing
enabled globally.
- Remove obsolete patches
* scikit-build-pr450-findf2py.patch gh#scikit-build/scikit-build#450
* python38.patch gh#scikit-build/scikit-build#458
- Skip Python 2 because of unresolvable python2-path.py in Leap
- Remove code coverage dependencies
- make the previously skipped tests pass by installing the test projects
into a temporary directory gh#scikit-build/scikit-build#469
-------------------------------------------------------------------
Tue Apr 7 12:04:36 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- Add scikit-build-pr450-findf2py.patch to find the flavor specific
f2py
-------------------------------------------------------------------
Tue Mar 10 10:33:57 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to build with python3.8:
* python38.patch
-------------------------------------------------------------------
Thu Jun 27 13:14:57 UTC 2019 - Benjamin Greiner <code@bnavigator.de>
- back to sitelib
-------------------------------------------------------------------
Wed Jun 26 13:22:10 UTC 2019 - Benjamin Greiner <code@bnavigator.de>
- force installation to %python_sitearch
- use %pytest_arch macro
- add docs dir
- cleaned up spec using spec-cleaner
-------------------------------------------------------------------
Wed Jun 19 11:26:36 UTC 2019 - Benjamin Greiner <code@bnavigator.de>
- update to version 0.10.0

118
python-scikit-build.spec Normal file
View File

@ -0,0 +1,118 @@
#
# spec file for package python-scikit-build
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%bcond_without test
%define psuffix -test
%else
%bcond_with test
%define psuffix %{nil}
%endif
%{?sle15_python_module_pythons}
Name: python-scikit-build%{psuffix}
Version: 0.18.1
Release: 0
Summary: Improved build system generator for Python C/C++/Fortran/Cython extensions
License: MIT
URL: https://github.com/scikit-build/scikit-build
Source: https://files.pythonhosted.org/packages/source/s/scikit-build/scikit_build-%{version}.tar.gz
Source99: sample-setup.cfg
BuildRequires: %{python_module devel >= 3.8}
BuildRequires: %{python_module hatch-fancy-pypi-readme}
BuildRequires: %{python_module hatch-vcs}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 42.0.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: cmake >= 3.5
Requires: python-distro
Requires: python-packaging
Requires: python-setuptools >= 42.0.0
Requires: python-wheel >= 0.32.0
%if %{python_version_nodots} < 38
Requires: python-typing-extensions >= 3.7
%endif
%if %{python_version_nodots} < 311
Requires: python-tomli
%endif
%if %{with test}
# Note: When tests fail try `osc build ---clean` in order to get rid of remnant numpy typing stubs in $HOME
BuildRequires: %{python_module Cython >= 0.25.1}
BuildRequires: %{python_module build >= 0.7}
BuildRequires: %{python_module importlib-metadata if %python-base < 3.8}
BuildRequires: %{python_module numpy-devel >= 1.21}
BuildRequires: %{python_module pytest >= 6.0.0}
BuildRequires: %{python_module pytest-mock >= 1.10.4}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module scikit-build = %{version}}
BuildRequires: %{python_module virtualenv}
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: git-core
BuildRequires: ninja
%endif
BuildArch: noarch
%python_subpackages
%description
Improved build system generator for Python C/C++/Fortran/Cython extensions
%prep
%autosetup -p1 -n scikit_build-%{version}
%if %{with test}
# some tests call setup.py develop|install|test, which by default write to /usr
# This is not allowed in OBS
# gh#scikit-build/scikit-build#469
%python_expand mkdir -p /tmp/fakepythonroot%{$python_sitelib}
cp %{S:99} tests/samples/hello-cpp/setup.cfg
cp %{S:99} tests/samples/cython-flags/setup.cfg
cp %{S:99} tests/samples/issue-274-support-default-package-dir/setup.cfg
cp %{S:99} tests/samples/issue-274-support-one-package-without-package-dir/setup.cfg
cp %{S:99} tests/samples/issue-334-configure-cmakelist-non-cp1252-encoding/setup.cfg
%endif
%if !%{with test}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
# these tests need a wheelhouse with downloaded wheels including platform dependent cmake
donttestmarker="isolated"
# setuptools_scm is a dependency of hatch_vcs
donttestmarker+=" or nosetuptoolsscm"
%pytest -m "not ($donttestmarker)"
%endif
%if !%{with test}
%files %{python_files}
%doc AUTHORS.rst README.rst CONTRIBUTING.rst docs/
%license LICENSE
%{python_sitelib}/skbuild
%{python_sitelib}/scikit_build-%{version}.dist-info
%endif
%changelog

5
sample-setup.cfg Normal file
View File

@ -0,0 +1,5 @@
[develop]
prefix=/tmp/fakepythonroot/usr/
[install]
prefix=/tmp/fakepythonroot/usr/

BIN
scikit_build-0.17.6.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
scikit_build-0.18.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

BIN
scikit_build-0.18.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,84 @@
From d0655bdcb9f27b9d64c582b947a7b56732f76c82 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Mon, 3 Jun 2024 15:53:10 +1000
Subject: [PATCH] Support setuptools 69.3.0 changes in two tests
setuptools 69.3.0 now canonicalizes package names in filenames, which
means all dashes are now converted to underscores, leading to test
failures due to FileNotFoundErrors. Handle both cases to support older
and newer setuptools.
---
tests/test_hello_cython.py | 23 ++++++++++++++---------
tests/test_hello_pure.py | 15 ++++++++++-----
2 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/tests/test_hello_cython.py b/tests/test_hello_cython.py
index dc95f697..1d9e944d 100644
--- a/tests/test_hello_cython.py
+++ b/tests/test_hello_cython.py
@@ -29,20 +29,25 @@ def test_hello_cython_sdist():
sdists_zip = glob.glob("dist/*.zip")
assert sdists_tar or sdists_zip
+ dirname = "hello-cython-1.2.3"
+ # setuptools 69.3.0 and above now canonicalize the filename as well.
+ if any("hello_cython" in x for x in sdists_zip + sdists_tar):
+ dirname = "hello_cython-1.2.3"
+
expected_content = [
- "hello-cython-1.2.3/CMakeLists.txt",
- "hello-cython-1.2.3/hello/_hello.pyx",
- "hello-cython-1.2.3/hello/CMakeLists.txt",
- "hello-cython-1.2.3/hello/__init__.py",
- "hello-cython-1.2.3/hello/__main__.py",
- "hello-cython-1.2.3/setup.py",
+ f"{dirname}/CMakeLists.txt",
+ f"{dirname}/hello/_hello.pyx",
+ f"{dirname}/hello/CMakeLists.txt",
+ f"{dirname}/hello/__init__.py",
+ f"{dirname}/hello/__main__.py",
+ f"{dirname}/setup.py",
]
- sdist_archive = "dist/hello-cython-1.2.3.zip"
+ sdist_archive = f"dist/{dirname}.zip"
if sdists_tar:
- sdist_archive = "dist/hello-cython-1.2.3.tar.gz"
+ sdist_archive = f"dist/{dirname}.tar.gz"
- check_sdist_content(sdist_archive, "hello-cython-1.2.3", expected_content, package_dir="hello")
+ check_sdist_content(sdist_archive, dirname, expected_content, package_dir="hello")
@project_setup_py_test("hello-cython", ["bdist_wheel"])
diff --git a/tests/test_hello_pure.py b/tests/test_hello_pure.py
index 21b0840b..cc176854 100644
--- a/tests/test_hello_pure.py
+++ b/tests/test_hello_pure.py
@@ -27,16 +27,21 @@ def test_hello_pure_sdist():
sdists_zip = glob.glob("dist/*.zip")
assert sdists_tar or sdists_zip
+ dirname = "hello-pure-1.2.3"
+ # setuptools 69.3.0 and above now canonicalize the filename as well.
+ if any("hello_pure" in x for x in sdists_zip + sdists_tar):
+ dirname = "hello_pure-1.2.3"
+
expected_content = [
- "hello-pure-1.2.3/hello/__init__.py",
- "hello-pure-1.2.3/setup.py",
+ f"{dirname}/hello/__init__.py",
+ f"{dirname}/setup.py",
]
- sdist_archive = "dist/hello-pure-1.2.3.zip"
+ sdist_archive = f"dist/{dirname}.zip"
if sdists_tar:
- sdist_archive = "dist/hello-pure-1.2.3.tar.gz"
+ sdist_archive = f"dist/{dirname}.tar.gz"
- check_sdist_content(sdist_archive, "hello-pure-1.2.3", expected_content)
+ check_sdist_content(sdist_archive, dirname, expected_content)
@project_setup_py_test("hello-pure", ["bdist_wheel"], disable_languages_test=True)

View File

@ -0,0 +1,23 @@
From 56ad12fe568675957e87c88a7b9f318b52b07fc4 Mon Sep 17 00:00:00 2001
From: Henry Schreiner <henryschreineriii@gmail.com>
Date: Tue, 2 Jul 2024 08:23:03 -0400
Subject: [PATCH] tests: fix for distutils change
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
---
tests/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/__init__.py b/tests/__init__.py
index 00d27289..4f3c9543 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -215,7 +215,7 @@ def execute_setup_py(project_dir, setup_args, disable_languages_test=False):
"""
# See https://stackoverflow.com/questions/9160227/dir-util-copy-tree-fails-after-shutil-rmtree
- distutils.dir_util._path_created = {} # type: ignore[attr-defined]
+ distutils.dir_util._path_created.clear() # type: ignore[attr-defined]
# Clear _PYTHON_HOST_PLATFORM to ensure value sets in skbuild.setuptools_wrap.setup() does not
# influence other tests.

View File

@ -0,0 +1,60 @@
From ed6387e8110cd78e4097dbbcf698660738ab05a4 Mon Sep 17 00:00:00 2001
From: Steve Kowalik <steven@wedontsleep.org>
Date: Wed, 31 Jul 2024 16:01:32 +1000
Subject: [PATCH] test: remove test directives
setuptools 72 and above now raise warnings for test_suite and
tests_require directives in setup.py as support for setup.py test is
preparing to be removed. These directives have been deprecated for quite
some time, so just remove them from the sample setup.py files.
---
tests/samples/issue-274-support-default-package-dir/setup.py | 1 -
.../issue-274-support-one-package-without-package-dir/setup.py | 1 -
.../issue-335-support-cmake-source-dir/wrapping/python/setup.py | 1 -
tests/samples/test-filter-manifest/wrapping/python/setup.py | 1 -
4 files changed, 4 deletions(-)
diff --git a/tests/samples/issue-274-support-default-package-dir/setup.py b/tests/samples/issue-274-support-default-package-dir/setup.py
index 99f4c361..b880122f 100644
--- a/tests/samples/issue-274-support-default-package-dir/setup.py
+++ b/tests/samples/issue-274-support-default-package-dir/setup.py
@@ -10,5 +10,4 @@
license="MIT",
packages=["hello"],
package_dir={"": "src"},
- test_suite="hello_tests",
)
diff --git a/tests/samples/issue-274-support-one-package-without-package-dir/setup.py b/tests/samples/issue-274-support-one-package-without-package-dir/setup.py
index 59864c15..5946573d 100644
--- a/tests/samples/issue-274-support-one-package-without-package-dir/setup.py
+++ b/tests/samples/issue-274-support-one-package-without-package-dir/setup.py
@@ -9,5 +9,4 @@
author="The scikit-build team",
license="MIT",
packages=["hello"],
- test_suite="hello_tests",
)
diff --git a/tests/samples/issue-335-support-cmake-source-dir/wrapping/python/setup.py b/tests/samples/issue-335-support-cmake-source-dir/wrapping/python/setup.py
index cb5b9d19..09b23405 100644
--- a/tests/samples/issue-335-support-cmake-source-dir/wrapping/python/setup.py
+++ b/tests/samples/issue-335-support-cmake-source-dir/wrapping/python/setup.py
@@ -9,7 +9,6 @@
author="The scikit-build team",
license="MIT",
packages=["hello"],
- tests_require=[],
setup_requires=[],
cmake_source_dir="../../",
)
diff --git a/tests/samples/test-filter-manifest/wrapping/python/setup.py b/tests/samples/test-filter-manifest/wrapping/python/setup.py
index 642620f8..e1bbb440 100644
--- a/tests/samples/test-filter-manifest/wrapping/python/setup.py
+++ b/tests/samples/test-filter-manifest/wrapping/python/setup.py
@@ -14,7 +14,6 @@ def exclude_dev_files(cmake_manifest):
author="The scikit-build team",
license="MIT",
packages=["hello"],
- tests_require=[],
setup_requires=[],
cmake_source_dir="../../",
cmake_process_manifest_hook=exclude_dev_files,