Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-scikit-build for openSUSE:Factory checked in at 2022-12-22 16:22:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-scikit-build (Old) and /work/SRC/openSUSE:Factory/.python-scikit-build.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-scikit-build" Thu Dec 22 16:22:58 2022 rev:12 rq:1044136 version:0.16.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-scikit-build/python-scikit-build.changes 2022-10-29 20:19:02.870831187 +0200 +++ /work/SRC/openSUSE:Factory/.python-scikit-build.new.1835/python-scikit-build.changes 2022-12-22 16:23:09.430058070 +0100 @@ -1,0 +2,25 @@ +Wed Dec 21 22:23:44 UTC 2022 - Ben Greiner <c...@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 + +------------------------------------------------------------------- Old: ---- scikit-build-0.16.1.tar.gz New: ---- scikit-build-0.16.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-scikit-build.spec ++++++ --- /var/tmp/diff_new_pack.AGTIAs/_old 2022-12-22 16:23:10.094061889 +0100 +++ /var/tmp/diff_new_pack.AGTIAs/_new 2022-12-22 16:23:10.102061935 +0100 @@ -27,7 +27,7 @@ %define skip_python2 1 Name: python-scikit-build%{psuffix} -Version: 0.16.1 +Version: 0.16.4 Release: 0 Summary: Improved build system generator for Python C/C++/Fortran/Cython extensions License: MIT @@ -53,11 +53,10 @@ Requires: python-typing-extensions >= 3.7 %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 flake8 >= 3.0.4} -BuildRequires: %{python_module path.py >= 11.5.0} -BuildRequires: %{python_module pytest >= 6.0.0 with %python-pytest < 7.2} +BuildRequires: %{python_module pytest >= 6.0.0} BuildRequires: %{python_module pytest-mock >= 1.10.4} BuildRequires: %{python_module pytest-virtualenv >= 1.2.5} BuildRequires: %{python_module requests} @@ -101,8 +100,6 @@ %check # test_pep518 needs a wheelhouse with downloaded wheels including platform dependent cmake donttest="test_pep518" -# https://github.com/scikit-build/scikit-build/issues/784 -donttest="$donttest or (test_hide_listing and True and bdist_wheel)" %pytest -k "not ($donttest)" %endif ++++++ scikit-build-0.16.1.tar.gz -> scikit-build-0.16.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/.flake8 new/scikit-build-0.16.4/.flake8 --- old/scikit-build-0.16.1/.flake8 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/.flake8 2022-12-16 22:59:22.000000000 +0100 @@ -2,5 +2,5 @@ max-line-length = 120 max-complexity = 18 show-source = True -extend-ignore = E203, E501, B950 -extend-select = B9 +extend-ignore = E203, E501 +extend-select = B902, B903, B904 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/.github/actions/setup-nox/action.yml new/scikit-build-0.16.4/.github/actions/setup-nox/action.yml --- old/scikit-build-0.16.1/.github/actions/setup-nox/action.yml 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/.github/actions/setup-nox/action.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,36 +0,0 @@ -name: Setup Nox -description: 'Prepares all python versions for nox' - -runs: - using: composite - steps: - - uses: actions/setup-python@v4 - with: - python-version: "pypy-3.7" - - uses: actions/setup-python@v4 - with: - python-version: "pypy-3.8" - - uses: actions/setup-python@v4 - with: - python-version: "pypy-3.9" - - uses: actions/setup-python@v4 - with: - python-version: "3.6" - - uses: actions/setup-python@v4 - with: - python-version: "3.7" - - uses: actions/setup-python@v4 - with: - python-version: "3.8" - - uses: actions/setup-python@v4 - with: - python-version: "3.9" - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - name: "Install nox" - run: pipx install nox - shell: bash diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/.github/workflows/cd.yml new/scikit-build-0.16.4/.github/workflows/cd.yml --- old/scikit-build-0.16.1/.github/workflows/cd.yml 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/.github/workflows/cd.yml 2022-12-16 22:59:22.000000000 +0100 @@ -36,6 +36,6 @@ name: artifact path: dist - - uses: pypa/gh-action-pypi-publish@v1.5.1 + - uses: pypa/gh-action-pypi-publish@v1.6.4 with: password: ${{ secrets.pypi_password }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/.github/workflows/ci.yml new/scikit-build-0.16.4/.github/workflows/ci.yml --- old/scikit-build-0.16.1/.github/workflows/ci.yml 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/.github/workflows/ci.yml 2022-12-16 22:59:22.000000000 +0100 @@ -29,7 +29,7 @@ strategy: fail-fast: false matrix: - runs-on: [ubuntu-latest, macos-latest, windows-2019, windows-2022] + runs-on: [ubuntu-20.04, macos-latest, windows-2019, windows-2022] name: Tests on ${{ matrix.runs-on }} steps: @@ -54,7 +54,9 @@ echo "SKBUILD_TEST_FIND_VS2022_INSTALLATION_EXPECTED=1" >> $GITHUB_ENV - name: Setup nox - uses: ./.github/actions/setup-nox + uses: wntrblm/nox@2022.11.21 + with: + python-versions: "3.6,3.7,3.8,3.9,3.10,3.11" # We check all Python's on Linux, because it's fast. # We check minimum Python and maximum Python on all OS's. @@ -85,7 +87,7 @@ with: fetch-depth: 0 - - uses: cygwin/cygwin-install-action@v2 + - uses: cygwin/cygwin-install-action@v3 with: platform: x86_64 packages: cmake ninja git make gcc-g++ gcc-fortran python39 python39-devel python39-pip @@ -97,7 +99,6 @@ env: TMP: /tmp TEMP: /tmp - SETUPTOOLS_SCM_PRETEND_VERSION: "0.15" run: python3.9 -m nox -s tests-3.9 @@ -117,7 +118,7 @@ fetch-depth: 0 - name: Setup nox - uses: ./.github/actions/setup-nox + uses: wntrblm/nox@2022.11.21 - uses: actions/setup-python@v4 with: @@ -144,3 +145,14 @@ - name: Check metadata run: pipx run twine check dist/* + + + pass: + if: always() + needs: [tests, tests-pypy, dist] + runs-on: ubuntu-latest + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@release/v1 + with: + jobs: ${{ toJSON(needs) }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/.gitignore new/scikit-build-0.16.4/.gitignore --- old/scikit-build-0.16.1/.gitignore 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/.gitignore 2022-12-16 22:59:22.000000000 +0100 @@ -57,3 +57,5 @@ .coverage* skbuild/_version.py + +/*env*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/.pre-commit-config.yaml new/scikit-build-0.16.4/.pre-commit-config.yaml --- old/scikit-build-0.16.1/.pre-commit-config.yaml 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/.pre-commit-config.yaml 2022-12-16 22:59:22.000000000 +0100 @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.3.0" + rev: "v4.4.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -22,18 +22,18 @@ - id: fix-smartquotes - repo: https://github.com/PyCQA/isort - rev: "5.10.1" + rev: "5.11.1" hooks: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: "v3.1.0" + rev: "v3.3.1" hooks: - id: pyupgrade args: [--py36-plus] - repo: https://github.com/psf/black - rev: "22.10.0" # Keep in sync with blacken-docs + rev: "22.12.0" # Keep in sync with blacken-docs hooks: - id: black exclude: ^docs/conf\.py$ @@ -46,7 +46,7 @@ - black==22.8.0 # keep in sync with black hook - repo: https://github.com/PyCQA/flake8 - rev: "5.0.4" + rev: "6.0.0" hooks: - id: flake8 exclude: "^docs/conf.py$" @@ -73,14 +73,14 @@ - id: rst-inline-touching-normal - repo: https://github.com/mgedmin/check-manifest - rev: "0.48" + rev: "0.49" hooks: - id: check-manifest stages: [manual] additional_dependencies: ["setuptools_scm[toml]"] - repo: https://github.com/pre-commit/mirrors-mypy - rev: "v0.982" + rev: "v0.991" hooks: - id: mypy files: ^skbuild diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/CHANGES.rst new/scikit-build-0.16.4/CHANGES.rst --- old/scikit-build-0.16.1/CHANGES.rst 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/CHANGES.rst 2022-12-16 22:59:22.000000000 +0100 @@ -3,13 +3,56 @@ ============= This is the list of changes to scikit-build between each release. For full -details, see the commit logs at http://github.com/scikit-build/scikit-build +details, see the commit logs at https://github.com/scikit-build/scikit-build Next Release ============ -We are hard at work on the next generation of scikit-build. We are also -continuing to fix bugs, make improvements, and backport changes here. +We are hard at work on the next generation of scikit-build +`scikit-build-core <https://github.com/scikit-build/scikit-build-core>`_, which +has had it's first non-development release. We are also continuing to fix bugs, +make improvements, and backport changes here. + +Documentation +------------- + +* scikit-build mailing list transitioned to the `scikit-build GitHub Discussions board <https://github.com/orgs/scikit-build/discussions>`_. See :issue:`800`. + * Transitioning away from the mailing list and adopting the GitHub Discussions will provide a more integrated platform enabling us to more effectively engage with the community. + * After sending a `last message <https://groups.google.com/g/scikit-build/c/jU7-EvvMPb8>`_ describing the transition, the mailing list was updated to be read-only and the welcome message was updated to redirect visitor toward the Discussions board. + + +Scikit-build 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 :pr:`824` and :pr:`818` +* Replace mailing list with GitHub Discussions board in :pr:`823` +* Some CI updates in :pr:`811` and :pr:`812` + + +Scikit-build 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 :pr:`795`, thanks to :user:`chohner`. +* Support pytest 7.2+ in :pr:`801`. +* Change warning filtering in :pr:`802`. +* Handle logging changes in setuptools 65.6+ in :pr:`807`. +* Add deprecated markers to some tests in :pr:`807`. +* Allow known warnings to show up in the tests :pr:`807`. + + +Scikit-build 0.16.2 +=================== + +This addresses one more small regression with the FindPython change from +0.16.0 that was affecting conda. :pr:`793`. Scikit-build 0.16.1 =================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/PKG-INFO new/scikit-build-0.16.4/PKG-INFO --- old/scikit-build-0.16.1/PKG-INFO 2022-10-29 17:35:33.958998200 +0200 +++ new/scikit-build-0.16.4/PKG-INFO 2022-12-16 22:59:30.974336900 +0100 @@ -1,15 +1,14 @@ Metadata-Version: 2.1 Name: scikit-build -Version: 0.16.1 +Version: 0.16.4 Summary: Improved build system generator for Python C/C++/Fortran/Cython extensions Home-page: https://github.com/scikit-build/scikit-build Author: The scikit-build team -Author-email: scikit-bu...@googlegroups.com License: MIT Project-URL: Documentation, https://scikit-build.readthedocs.io/ Project-URL: Bug Tracker, https://github.com/scikit-build/scikit-build/issues Project-URL: Changelog, https://scikit-build.readthedocs.io/en/latest/changes.html -Project-URL: Mailing List, https://groups.google.com/forum/#!forum/scikit-build +Project-URL: Discussions, https://github.com/orgs/scikit-build/discussions Project-URL: Examples, https://github.com/scikit-build/scikit-build-sample-projects Keywords: scikit-build Classifier: Development Status :: 2 - Pre-Alpha @@ -45,6 +44,10 @@ :target: https://codecov.io/gh/scikit-build/scikit-build :alt: Code coverage status +.. image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github + :target: https://github.com/orgs/scikit-build/discussions + :alt: GitHub Discussion + Improved build system generator for CPython C/C++/Fortran/Cython extensions. Better support is available for additional compilers, build systems, cross @@ -109,7 +112,7 @@ * Free software: MIT license * Documentation: http://scikit-build.readthedocs.org * Source code: https://github.com/scikit-build/scikit-build -* Mailing list: https://groups.google.com/forum/#!forum/scikit-build +* Discussions: https://github.com/orgs/scikit-build/discussions Support for this work was provided by NSF cooperative agreement `OAC-2209877 <https://www.nsf.gov/awardsearch/showAward?AWD_ID=2209877>`_. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/README.rst new/scikit-build-0.16.4/README.rst --- old/scikit-build-0.16.1/README.rst 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/README.rst 2022-12-16 22:59:22.000000000 +0100 @@ -12,6 +12,10 @@ :target: https://codecov.io/gh/scikit-build/scikit-build :alt: Code coverage status +.. image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github + :target: https://github.com/orgs/scikit-build/discussions + :alt: GitHub Discussion + Improved build system generator for CPython C/C++/Fortran/Cython extensions. Better support is available for additional compilers, build systems, cross @@ -76,7 +80,7 @@ * Free software: MIT license * Documentation: http://scikit-build.readthedocs.org * Source code: https://github.com/scikit-build/scikit-build -* Mailing list: https://groups.google.com/forum/#!forum/scikit-build +* Discussions: https://github.com/orgs/scikit-build/discussions Support for this work was provided by NSF cooperative agreement `OAC-2209877 <https://www.nsf.gov/awardsearch/showAward?AWD_ID=2209877>`_. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/docs/index.rst new/scikit-build-0.16.4/docs/index.rst --- old/scikit-build-0.16.1/docs/index.rst 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/docs/index.rst 2022-12-16 22:59:22.000000000 +0100 @@ -52,4 +52,4 @@ * Free software: MIT license * Documentation: http://scikit-build.readthedocs.io/en/latest/ * Source code: https://github.com/scikit-build/scikit-build -* Mailing list: https://groups.google.com/forum/#!forum/scikit-build +* Discussions: https://github.com/orgs/scikit-build/discussions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/docs/make_a_release.rst new/scikit-build-0.16.4/docs/make_a_release.rst --- old/scikit-build-0.16.1/docs/make_a_release.rst 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/docs/make_a_release.rst 2022-12-16 22:59:22.000000000 +0100 @@ -148,21 +148,11 @@ -10. Send an email to the `scikit-build mailing list`_ based on the following template: - - :: - - On behalf of the scikit-build team, I am pleased to announce that the version X.Y.Z is available for download: - - pip install --upgrade scikit-build <--- This line should be formatted using fixed size font - - Thank you to everyone who contributed their time to test, write issue reports and contribute patches! - - <copy here content of the changelog for release X.Y.X including the release name> +10. Add an entry to the ``Announcements`` category of the `scikit-build discussions board`_. .. note:: - For examples of announcements, see https://groups.google.com/g/scikit-build/search?q=announce%20subject%3Ascikit-build + For examples of announcements, see https://github.com/orgs/scikit-build/discussions/categories/announcements .. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/ @@ -175,7 +165,7 @@ .. _PyPI: https://pypi.org/project/scikit-build .. _TestPyPI: https://test.pypi.org/project/scikit-build -.. _scikit-build mailing list: https://groups.google.com/g/scikit-build +.. _scikit-build discussions board: https://github.com/orgs/scikit-build/discussions/categories/announcements ----------------------- `Conda`_: Step-by-step diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/docs/usage.rst new/scikit-build-0.16.4/docs/usage.rst --- old/scikit-build-0.16.1/docs/usage.rst 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/docs/usage.rst 2022-12-16 22:59:22.000000000 +0100 @@ -155,7 +155,7 @@ - ``cmake_source_dir``: Relative directory containing the project ``CMakeLists.txt``. By default, it is set to the top-level directory where ``setup.py`` is found. -- ``cmake_process_manifest_hook``: Python function consumming the list of files to be +- ``cmake_process_manifest_hook``: Python function consuming the list of files to be installed produced by cmake. For example, ``cmake_process_manifest_hook`` can be used to exclude static libraries from the built wheel. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/noxfile.py new/scikit-build-0.16.4/noxfile.py --- old/scikit-build-0.16.1/noxfile.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/noxfile.py 2022-12-16 22:59:22.000000000 +0100 @@ -38,6 +38,8 @@ contained = "1" if version in known_MSVC else "0" env[f"SKBUILD_TEST_FIND_VS{version}_INSTALLATION_EXPECTED"] = contained + # Latest versions may break things, so grab them for testing! + session.install("-U", "setuptools", "wheel") session.install("-e", ".[test]") session.run("pytest", *posargs, env=env) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/pyproject.toml new/scikit-build-0.16.4/pyproject.toml --- old/scikit-build-0.16.1/pyproject.toml 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/pyproject.toml 2022-12-16 22:59:22.000000000 +0100 @@ -79,16 +79,18 @@ norecursedirs = ["_skbuild"] xfail_strict = true filterwarnings = [ - "error", - "ignore:setup.py install is deprecated:Warning", - "ignore:easy_install command is deprecated:Warning", - "ignore:.*ends with a trailing slash, which is not supported by setuptools:FutureWarning", + 'error', + 'default:setup.py install is deprecated:Warning', + 'default:easy_install command is deprecated:Warning', + 'ignore:.*ends with a trailing slash, which is not supported by setuptools:FutureWarning', "ignore:Config variable 'Py_DEBUG' is unset:RuntimeWarning", "ignore:Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect:RuntimeWarning", - 'ignore:\s*Installing .* as data is deprecated:Warning', - "ignore:shell/Perl-style subs.* are deprecated:DeprecationWarning", + 'default:\s*Installing .* as data is deprecated:Warning', + 'default:shell/Perl-style subs.* are deprecated:DeprecationWarning', + 'default:subprocess .* is still running:ResourceWarning', ] log_cli_level = "info" markers = [ - "fortran: fortran testing", + "fortran: Fortran testing", + "deprecated: These tests deprecated setuptools features", ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/requirements-dev.txt new/scikit-build-0.16.4/requirements-dev.txt --- old/scikit-build-0.16.1/requirements-dev.txt 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/requirements-dev.txt 2022-12-16 22:59:22.000000000 +0100 @@ -3,8 +3,8 @@ coverage>=4.2 cython>=0.25.1 flake8>=3.0.4 -path.py>=11.5.0 -pytest>=6.0.0,<7.2.0 +importlib-metadata;python_version<"3.8" +pytest>=6.0.0 pytest-cov>=2.7.1 pytest-mock>=1.10.4 pytest-runner>=5.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/scikit_build.egg-info/PKG-INFO new/scikit-build-0.16.4/scikit_build.egg-info/PKG-INFO --- old/scikit-build-0.16.1/scikit_build.egg-info/PKG-INFO 2022-10-29 17:35:33.000000000 +0200 +++ new/scikit-build-0.16.4/scikit_build.egg-info/PKG-INFO 2022-12-16 22:59:30.000000000 +0100 @@ -1,15 +1,14 @@ Metadata-Version: 2.1 Name: scikit-build -Version: 0.16.1 +Version: 0.16.4 Summary: Improved build system generator for Python C/C++/Fortran/Cython extensions Home-page: https://github.com/scikit-build/scikit-build Author: The scikit-build team -Author-email: scikit-bu...@googlegroups.com License: MIT Project-URL: Documentation, https://scikit-build.readthedocs.io/ Project-URL: Bug Tracker, https://github.com/scikit-build/scikit-build/issues Project-URL: Changelog, https://scikit-build.readthedocs.io/en/latest/changes.html -Project-URL: Mailing List, https://groups.google.com/forum/#!forum/scikit-build +Project-URL: Discussions, https://github.com/orgs/scikit-build/discussions Project-URL: Examples, https://github.com/scikit-build/scikit-build-sample-projects Keywords: scikit-build Classifier: Development Status :: 2 - Pre-Alpha @@ -45,6 +44,10 @@ :target: https://codecov.io/gh/scikit-build/scikit-build :alt: Code coverage status +.. image:: https://img.shields.io/static/v1?label=Discussions&message=Ask&color=blue&logo=github + :target: https://github.com/orgs/scikit-build/discussions + :alt: GitHub Discussion + Improved build system generator for CPython C/C++/Fortran/Cython extensions. Better support is available for additional compilers, build systems, cross @@ -109,7 +112,7 @@ * Free software: MIT license * Documentation: http://scikit-build.readthedocs.org * Source code: https://github.com/scikit-build/scikit-build -* Mailing list: https://groups.google.com/forum/#!forum/scikit-build +* Discussions: https://github.com/orgs/scikit-build/discussions Support for this work was provided by NSF cooperative agreement `OAC-2209877 <https://www.nsf.gov/awardsearch/showAward?AWD_ID=2209877>`_. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/scikit_build.egg-info/SOURCES.txt new/scikit-build-0.16.4/scikit_build.egg-info/SOURCES.txt --- old/scikit-build-0.16.1/scikit_build.egg-info/SOURCES.txt 2022-10-29 17:35:33.000000000 +0200 +++ new/scikit-build-0.16.4/scikit_build.egg-info/SOURCES.txt 2022-12-16 22:59:30.000000000 +0100 @@ -21,7 +21,6 @@ requirements.txt setup.py .github/dependabot.yml -.github/actions/setup-nox/action.yml .github/workflows/cd.yml .github/workflows/ci.yml docs/Makefile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/scikit_build.egg-info/requires.txt new/scikit-build-0.16.4/scikit_build.egg-info/requires.txt --- old/scikit-build-0.16.1/scikit_build.egg-info/requires.txt 2022-10-29 17:35:33.000000000 +0200 +++ new/scikit-build-0.16.4/scikit_build.egg-info/requires.txt 2022-12-16 22:59:30.000000000 +0100 @@ -19,8 +19,7 @@ coverage>=4.2 cython>=0.25.1 flake8>=3.0.4 -path.py>=11.5.0 -pytest<7.2.0,>=6.0.0 +pytest>=6.0.0 pytest-cov>=2.7.1 pytest-mock>=1.10.4 pytest-runner>=5.1 @@ -29,3 +28,6 @@ ubelt>=0.8.2 virtualenv xdoctest>=0.10.0 + +[test:python_version < "3.8"] +importlib-metadata diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/setup.py new/scikit-build-0.16.4/setup.py --- old/scikit-build-0.16.1/setup.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/setup.py 2022-12-16 22:59:22.000000000 +0100 @@ -26,14 +26,13 @@ long_description_content_type="text/x-rst; charset=UTF-8", long_description=readme + "\n\n" + history, author="The scikit-build team", - author_email="scikit-bu...@googlegroups.com", url="https://github.com/scikit-build/scikit-build", packages=setuptools.find_packages(include=["skbuild*"]), project_urls={ "Documentation": "https://scikit-build.readthedocs.io/", "Bug Tracker": "https://github.com/scikit-build/scikit-build/issues", "Changelog": "https://scikit-build.readthedocs.io/en/latest/changes.html", - "Mailing List": "https://groups.google.com/forum/#!forum/scikit-build", + "Discussions": "https://github.com/orgs/scikit-build/discussions", "Examples": "https://github.com/scikit-build/scikit-build-sample-projects", }, package_data={"skbuild": ["resources/cmake/*.cmake", "py.typed", "*.pyi"]}, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/_version.py new/scikit-build-0.16.4/skbuild/_version.py --- old/scikit-build-0.16.1/skbuild/_version.py 2022-10-29 17:35:33.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/_version.py 2022-12-16 22:59:30.000000000 +0100 @@ -1,5 +1,5 @@ # coding: utf-8 # file generated by setuptools_scm # don't change, don't track in version control -__version__ = version = '0.16.1' -__version_tuple__ = version_tuple = (0, 16, 1) +__version__ = version = '0.16.4' +__version_tuple__ = version_tuple = (0, 16, 4) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/cmaker.py new/scikit-build-0.16.4/skbuild/cmaker.py --- old/scikit-build-0.16.1/skbuild/cmaker.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/cmaker.py 2022-12-16 22:59:22.000000000 +0100 @@ -4,6 +4,7 @@ import argparse +import configparser import contextlib import glob import itertools @@ -289,6 +290,7 @@ [ f"{prefix}_EXECUTABLE:PATH={sys.executable}", f"{prefix}_ROOT_DIR:PATH={sys.prefix}", + f"{prefix}_INCLUDE_DIR:PATH={python_include_dir}", f"{prefix}_FIND_REGISTRY:STRING=NEVER", ] ) @@ -302,7 +304,7 @@ if generator.toolset: cmd.extend(["-T", generator.toolset]) - if generator.architecture: + if generator.architecture and "Visual Studio" in generator.name: cmd.extend(["-A", generator.architecture]) if ninja_executable_path is not None: cmd.append(f"-DCMAKE_MAKE_PROGRAM:FILEPATH={ninja_executable_path}") @@ -367,6 +369,8 @@ if not python_version: python_version = ".".join(map(str, sys.version_info[:2])) + assert isinstance(python_version, str) + return python_version # NOTE(opadron): The try-excepts raise the cyclomatic complexity, but we @@ -476,12 +480,23 @@ >>> print('python_library = {!r}'.format(python_library)) python_library = '.../conda/envs/py37/include/python3.7m' """ + # On Windows, support cross-compiling in the same way as setuptools + # When cross-compiling, check DIST_EXTRA_CONFIG first + config_file = os.environ.get("DIST_EXTRA_CONFIG", None) + if config_file and Path(config_file).is_file(): + cp = configparser.ConfigParser() + cp.read(config_file) + result = cp.get("build_ext", "library_dirs", fallback="") + if result: + minor = sys.version_info[1] + return str(Path(result) / f"python3{minor}.lib") + # This seems to be the simplest way to detect the library path with # modern python versions that avoids the complicated construct below. # It avoids guessing the library name. Tested with cpython 3.8 and # pypy 3.8 on Ubuntu. - libdir = sysconfig.get_config_var("LIBDIR") - ldlibrary = sysconfig.get_config_var("LDLIBRARY") + libdir: Optional[str] = sysconfig.get_config_var("LIBDIR") + ldlibrary: Optional[str] = sysconfig.get_config_var("LDLIBRARY") if libdir and ldlibrary and os.path.exists(libdir): if sysconfig.get_config_var("MULTIARCH"): masd = sysconfig.get_config_var("multiarchsubdir") @@ -492,7 +507,7 @@ if os.path.exists(libdir_masd): libdir = libdir_masd libpath = os.path.join(libdir, ldlibrary) - if os.path.exists(libpath): + if libpath and os.path.exists(libpath): return libpath return CMaker._guess_python_library(python_version) @@ -500,7 +515,7 @@ @staticmethod def _guess_python_library(python_version: str) -> Optional[str]: # determine direct path to libpython - python_library = sysconfig.get_config_var("LIBRARY") + python_library: Optional[str] = sysconfig.get_config_var("LIBRARY") # if static (or nonexistent), try to find a suitable dynamic libpython if not python_library or os.path.splitext(python_library)[1][-2:] == ".a": diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/command/build_py.py new/scikit-build-0.16.4/skbuild/command/build_py.py --- old/scikit-build-0.16.1/skbuild/command/build_py.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/command/build_py.py 2022-12-16 22:59:22.000000000 +0100 @@ -7,7 +7,7 @@ from setuptools.command.build_py import build_py as _build_py from ..constants import CMAKE_INSTALL_DIR -from ..utils import distribution_hide_listing, distutils_log +from ..utils import distribution_hide_listing, logger from . import set_build_base_mixin @@ -38,7 +38,7 @@ """ with distribution_hide_listing(self.distribution): super().run(*args, **kwargs) - distutils_log.info("copied %d files", self.outfiles_count) + logger.info("copied %d files", self.outfiles_count) def find_modules(self) -> List[Tuple[str, str, str]]: """Finds individually-specified Python modules, ie. those listed by diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/command/clean.py new/scikit-build-0.16.4/skbuild/command/clean.py --- old/scikit-build-0.16.1/skbuild/command/clean.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/command/clean.py 2022-12-16 22:59:22.000000000 +0100 @@ -7,7 +7,7 @@ from distutils.command.clean import clean as _clean from ..constants import CMAKE_BUILD_DIR, CMAKE_INSTALL_DIR, SKBUILD_DIR -from ..utils import distutils_log +from ..utils import logger from . import set_build_base_mixin @@ -20,7 +20,7 @@ super().run() for dir_ in (CMAKE_INSTALL_DIR(), CMAKE_BUILD_DIR(), SKBUILD_DIR()): if os.path.exists(dir_): - distutils_log.info("removing '%s'", dir_) + logger.info("removing '%s'", dir_) # This seems to be there but isn't typed in the stubs TODO if not self.dry_run and os.path.exists(dir_): # type: ignore[attr-defined] rmtree(dir_) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/command/install_lib.py new/scikit-build-0.16.4/skbuild/command/install_lib.py --- old/scikit-build-0.16.1/skbuild/command/install_lib.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/command/install_lib.py 2022-12-16 22:59:22.000000000 +0100 @@ -5,7 +5,7 @@ from setuptools.command.install_lib import install_lib as _install_lib -from ..utils import distribution_hide_listing, distutils_log +from ..utils import distribution_hide_listing, logger from . import CommandMixinProtocol, set_build_base_mixin @@ -17,5 +17,5 @@ with distribution_hide_listing(self.distribution): outfiles: List[str] = super().install() # type: ignore[misc] if outfiles is not None: - distutils_log.info("copied %d files", len(outfiles)) + logger.info("copied %d files", len(outfiles)) return outfiles diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/command/install_scripts.py new/scikit-build-0.16.4/skbuild/command/install_scripts.py --- old/scikit-build-0.16.1/skbuild/command/install_scripts.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/command/install_scripts.py 2022-12-16 22:59:22.000000000 +0100 @@ -5,7 +5,7 @@ from setuptools.command.install_scripts import install_scripts as _install_scripts -from ..utils import distribution_hide_listing, distutils_log +from ..utils import distribution_hide_listing, logger from . import CommandMixinProtocol, set_build_base_mixin @@ -16,4 +16,4 @@ """Handle --hide-listing option.""" with distribution_hide_listing(self.distribution): super().run(*args, **kwargs) # type: ignore[misc] - distutils_log.info("copied %d files", len(self.outfiles)) + logger.info("copied %d files", len(self.outfiles)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/command/sdist.py new/scikit-build-0.16.4/skbuild/command/sdist.py --- old/scikit-build-0.16.1/skbuild/command/sdist.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/command/sdist.py 2022-12-16 22:59:22.000000000 +0100 @@ -4,7 +4,7 @@ from setuptools.command.sdist import sdist as _sdist -from ..utils import distribution_hide_listing, distutils_log +from ..utils import distribution_hide_listing, logger from . import CommandMixinProtocol, set_build_base_mixin @@ -15,7 +15,7 @@ """Handle --hide-listing option.""" with distribution_hide_listing(self.distribution): super().make_release_tree(base_dir, files) # type: ignore[misc] - distutils_log.info("copied %d files", len(files)) + logger.info("copied %d files", len(files)) def make_archive( self, @@ -27,7 +27,7 @@ group: Optional[str] = None, ) -> str: """Handle --hide-listing option.""" - distutils_log.info("creating '%s' %s archive and adding '%s' to it", base_name, _format, base_dir) + logger.info("creating '%s' %s archive and adding '%s' to it", base_name, _format, base_dir) with distribution_hide_listing(self.distribution): # type: ignore[attr-defined] return super().make_archive(base_name, _format, root_dir, base_dir, owner, group) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/platform_specifics/abstract.py new/scikit-build-0.16.4/skbuild/platform_specifics/abstract.py --- old/scikit-build-0.16.1/skbuild/platform_specifics/abstract.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/platform_specifics/abstract.py 2022-12-16 22:59:22.000000000 +0100 @@ -230,7 +230,7 @@ cmd = [cmake_exe_path, "../", "-G", generator.name] if generator.toolset: cmd.extend(["-T", generator.toolset]) - if generator.architecture: + if generator.architecture and "Visual Studio" in generator.name: cmd.extend(["-A", generator.architecture]) cmd.extend(cmake_args) cmd.extend(generator.args) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/platform_specifics/windows.py new/scikit-build-0.16.4/skbuild/platform_specifics/windows.py --- old/scikit-build-0.16.1/skbuild/platform_specifics/windows.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/platform_specifics/windows.py 2022-12-16 22:59:22.000000000 +0100 @@ -33,6 +33,12 @@ "2022": "1930", # VS 2022 - can be +9 } +ARCH_TO_MSVC_ARCH = { + "Win32": "x86", + "ARM64": "x86_arm64", + "x64": "x86_amd64", +} + class CachedEnv(TypedDict): PATH: str @@ -108,6 +114,15 @@ return self._vs_help +def _compute_arch() -> str: + """Currently only supports Intel -> ARM cross-compilation.""" + if platform.machine() == "ARM64" or "arm64" in os.environ.get("SETUPTOOLS_EXT_SUFFIX", "").lower(): + return "ARM64" + if platform.architecture()[0] == "64bit": + return "x64" + return "Win32" + + class CMakeVisualStudioIDEGenerator(CMakeGenerator): """ Represents a Visual Studio CMake generator. @@ -184,7 +199,7 @@ .. note:: - - For VS 2017 and newer, returns `path` based on the result of invoking ``vswhere.exe``. + - Returns `path` based on the result of invoking ``vswhere.exe``. """ return _find_visual_studio_2017_or_newer(vs_version) @@ -200,24 +215,17 @@ Return a dictionary of environment variables corresponding to ``vs_version`` that can be used with :class:`CMakeVisualStudioCommandLineGenerator`. - The ``vs_toolset`` is used only for Visual Studio 2017 or newer (``vs_version >= 14``). + The ``vs_toolset`` is used only for Visual Studio 2017 or newer (``vs_version >= 15``). If specified, ``vs_toolset`` is used to set the `-vcvars_ver=XX.Y` argument passed to ``vcvarsall.bat`` script. """ # Set architecture - arch = "x86" - if platform.machine() == "ARM64": - arch = "x86_arm64" - elif platform.architecture()[0] == "64bit": - if vs_version < 14: - arch = "amd64" - else: - arch = "x86_amd64" + vc_arch = ARCH_TO_MSVC_ARCH[_compute_arch()] # If any, return cached version - cache_key = ",".join([str(vs_version), arch, str(vs_toolset)]) + cache_key = ",".join([str(vs_version), vc_arch, str(vs_toolset)]) if cache_key in __get_msvc_compiler_env_cache: return __get_msvc_compiler_env_cache[cache_key] @@ -230,7 +238,7 @@ # Set vcvars_ver argument based on toolset vcvars_ver = "" - if vs_toolset is not None and vs_version >= 15: + if vs_toolset is not None: match = re.findall(r"^v(\d\d)(\d+)$", vs_toolset)[0] if match: match_str = ".".join(match) @@ -238,7 +246,7 @@ try: out_bytes = subprocess.check_output( - f'cmd /u /c "{vcvarsall}" {arch} {vcvars_ver} && set', + f'cmd /u /c "{vcvarsall}" {vc_arch} {vcvars_ver} && set', stderr=subprocess.STDOUT, shell=sys.platform.startswith("cygwin"), ) @@ -280,10 +288,10 @@ If set, the ``toolset`` defines the `Visual Studio Toolset` to select. - The platform (32-bit or 64-bit) is automatically selected based - on the value of ``platform.architecture()[0]``. + The platform (32-bit or 64-bit or ARM) is automatically selected. """ + arch = _compute_arch() vc_env = _get_msvc_compiler_env(VS_YEAR_TO_VERSION[year], toolset) env = {str(key.upper()): str(value) for key, value in vc_env.items()} - super().__init__(name, env, args=args) + super().__init__(name, env, arch=arch, args=args) self._description = f"{self.name} ({CMakeVisualStudioIDEGenerator(year, toolset).description})" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/setuptools_wrap.py new/scikit-build-0.16.4/skbuild/setuptools_wrap.py --- old/scikit-build-0.16.1/skbuild/setuptools_wrap.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/setuptools_wrap.py 2022-12-16 22:59:22.000000000 +0100 @@ -451,7 +451,7 @@ print("Traceback (most recent call last):", file=sys.stderr) traceback.print_tb(sys.exc_info()[2]) print(file=sys.stderr, flush=True) - sys.exit(ex) + sys.exit(ex) # type: ignore[arg-type] # Convert source dir to a path relative to the root # of the project @@ -639,14 +639,14 @@ _save_cmake_spec(cmake_spec) cmkr.make(make_args, install_target=cmake_install_target, env=env) except SKBuildGeneratorNotFoundError as ex: - sys.exit(ex) + sys.exit(ex) # type: ignore[arg-type] except SKBuildError as ex: import traceback # pylint: disable=import-outside-toplevel print("Traceback (most recent call last):", file=sys.stderr) traceback.print_tb(sys.exc_info()[2]) print(file=sys.stderr, flush=True) - sys.exit(ex) + sys.exit(ex) # type: ignore[arg-type] # If needed, set reasonable defaults for package_dir for package in packages: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/skbuild/utils/__init__.py new/scikit-build-0.16.4/skbuild/utils/__init__.py --- old/scikit-build-0.16.1/skbuild/utils/__init__.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/skbuild/utils/__init__.py 2022-12-16 22:59:22.000000000 +0100 @@ -3,6 +3,7 @@ import contextlib import logging import os +import sys from contextlib import contextmanager from typing import ( Any, @@ -23,18 +24,31 @@ from distutils.filelist import FileList from distutils.text_file import TextFile -distutils_log: logging.Logger +if sys.version_info >= (3, 8): + from typing import Protocol +else: + from typing_extensions import Protocol + + +class CommonLog(Protocol): + def info(self, __msg: str, *args: object) -> None: + ... + + +logger: CommonLog try: import setuptools.logging # noqa: F401 - distutils_log = logging.getLogger("skbuild") - distutils_log.setLevel(logging.INFO) + skb_log = logging.getLogger("skbuild") + skb_log.setLevel(logging.INFO) logging_module = True + logger = skb_log except ImportError: - from distutils import log as distutils_log # type: ignore[misc] + from distutils import log as distutils_log + logger = distutils_log logging_module = False @@ -45,7 +59,7 @@ def _log_warning(msg: str, *args: object) -> None: try: if logging_module: - distutils_log.warning(msg, *args) + skb_log.warning(msg, *args) else: distutils_log.warn(msg, *args) # pylint: disable=deprecated-method except ValueError: @@ -195,14 +209,16 @@ """ hide_listing = hasattr(distribution, "hide_listing") and distribution.hide_listing # type: ignore[attr-defined] - + wheel_log = logging.getLogger("wheel") + root_log = logging.getLogger() # setuptools 65.6+ needs this hidden too if logging_module: # Setuptools 60.2+, will always be on Python 3.6+ - old_level = distutils_log.getEffectiveLevel() - if hide_listing: - distutils_log.setLevel(logging.WARNING) + old_wheel_level = wheel_log.getEffectiveLevel() + old_root_level = root_log.getEffectiveLevel() try: if hide_listing: + wheel_log.setLevel(logging.WARNING) + root_log.setLevel(logging.WARNING) # The classic logger doesn't respond to set_threshold anymore, # but it does log info and above to stdout, so let's hide that with open(os.devnull, "w", encoding="utf-8") as f, contextlib.redirect_stdout(f): @@ -210,16 +226,18 @@ else: yield hide_listing finally: - distutils_log.setLevel(old_level) + if hide_listing: + wheel_log.setLevel(old_wheel_level) + root_log.setLevel(old_root_level) else: old_threshold = distutils_log._global_log.threshold # type: ignore[attr-defined] if hide_listing: - distutils_log.set_threshold(distutils_log.WARN) # type: ignore[attr-defined] + distutils_log.set_threshold(distutils_log.WARN) try: yield hide_listing finally: - distutils_log.set_threshold(old_threshold) # type: ignore[attr-defined] + distutils_log.set_threshold(old_threshold) def parse_manifestin(template: str) -> List[str]: @@ -250,8 +268,8 @@ # malformed lines, or a ValueError from the lower-level # convert_path function except (DistutilsTemplateError, ValueError) as msg: - filename = template_file.filename if hasattr(template_file, "filename") else "Unknown" # type: ignore[attr-defined] - current_line = template_file.current_line if hasattr(template_file, "current_line") else "Unknown" # type: ignore[attr-defined] + filename = template_file.filename if hasattr(template_file, "filename") else "Unknown" + current_line = template_file.current_line if hasattr(template_file, "current_line") else "Unknown" print(f"{filename}, line {current_line}: {msg}", flush=True) return file_list.files finally: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/__init__.py new/scikit-build-0.16.4/tests/__init__.py --- old/scikit-build-0.16.1/tests/__init__.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/__init__.py 2022-12-16 22:59:22.000000000 +0100 @@ -247,7 +247,7 @@ yield -def project_setup_py_test(project, setup_args, tmp_dir=None, verbose_git=True, disable_languages_test=False): +def project_setup_py_test(project, setup_args, tmp_dir=None, verbose_git=True, disable_languages_test=False, ret=False): def dec(fun): @functools.wraps(fun) def wrapped(*iargs, **ikwargs): @@ -260,7 +260,9 @@ with execute_setup_py(wrapped.tmp_dir, wrapped.setup_args, disable_languages_test=disable_languages_test): result2 = fun(*iargs, **ikwargs) - return wrapped.tmp_dir, result2 + if ret: + return wrapped.tmp_dir, result2 + return None wrapped.project = project wrapped.setup_args = setup_args diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/conftest.py new/scikit-build-0.16.4/tests/conftest.py --- old/scikit-build-0.16.1/tests/conftest.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/conftest.py 2022-12-16 22:59:22.000000000 +0100 @@ -4,6 +4,12 @@ import pytest +if sys.version_info < (3, 8): + import importlib_metadata as metadata +else: + from importlib import metadata + + DIR = os.path.dirname(os.path.abspath(__file__)) BASE = os.path.dirname(DIR) @@ -43,3 +49,26 @@ monkeypatch.setenv("PIP_FIND_LINKS", pep518_wheelhouse) monkeypatch.setenv("PIP_NO_INDEX", "true") return pep518_wheelhouse + + +def pytest_report_header() -> str: + interesting_packages = { + "build", + "distro", + "packaging", + "pip", + "setuptools", + "virtualenv", + "wheel", + } + valid = [] + for package in interesting_packages: + try: + version = metadata.version(package) # type: ignore[no-untyped-call] + except ModuleNotFoundError: + continue + valid.append(f"{package}=={version}") + reqs = " ".join(sorted(valid)) + pkg_line = f"installed packages of interest: {reqs}" + + return "\n".join([pkg_line]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_cmaker.py new/scikit-build-0.16.4/tests/test_cmaker.py --- old/scikit-build-0.16.1/tests/test_cmaker.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_cmaker.py 2022-12-16 22:59:22.000000000 +0100 @@ -204,6 +204,7 @@ [ f"{prefix}_EXECUTABLE", f"{prefix}_ROOT_DIR", + f"{prefix}_INCLUDE_DIR", f"{prefix}_FIND_IMPLEMENTATIONS", f"{prefix}_FIND_REGISTRY", ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_distribution.py new/scikit-build-0.16.4/tests/test_distribution.py --- old/scikit-build-0.16.1/tests/test_distribution.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_distribution.py 2022-12-16 22:59:22.000000000 +0100 @@ -1,11 +1,11 @@ -import os +from pathlib import Path import pytest -from path import Path from . import initialize_git_repo_and_commit, prepare_project -DIST_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "../dist")) +DIR = Path(__file__).parent.resolve() +DIST_DIR = DIR.parent / "dist" # Test if package can be imported to allow testing on # conda-forge where ``pytest-virtualenv`` is not available. @@ -13,7 +13,7 @@ def test_source_distribution(virtualenv): - sdists = Path(DIST_DIR).files(match="*.tar.gz") if Path(DIST_DIR).exists() else [] + sdists = DIST_DIR.glob("*.tar.gz") if DIST_DIR.exists() else [] if not sdists: pytest.skip("no source distribution available") assert len(sdists) == 1 @@ -28,7 +28,7 @@ def test_wheel(virtualenv): - wheels = Path(DIST_DIR).files(match="*.whl") if Path(DIST_DIR).exists() else [] + wheels = DIST_DIR.glob("*.whl") if DIST_DIR.exists() else [] if not wheels: pytest.skip("no wheel available") assert len(wheels) == 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_hello_cpp.py new/scikit-build-0.16.4/tests/test_hello_cpp.py --- old/scikit-build-0.16.1/tests/test_hello_cpp.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_hello_cpp.py 2022-12-16 22:59:22.000000000 +0100 @@ -11,7 +11,7 @@ import pytest -from skbuild.constants import CMAKE_BUILD_DIR, CMAKE_INSTALL_DIR, SKBUILD_DIR +from skbuild.constants import CMAKE_BUILD_DIR, SKBUILD_DIR from skbuild.utils import push_dir from . import SAMPLES_DIR, _copy_dir, _tmpdir, get_ext_suffix, project_setup_py_test @@ -21,7 +21,7 @@ def test_hello_builds(): with push_dir(): - @project_setup_py_test("hello-cpp", ["build"]) + @project_setup_py_test("hello-cpp", ["build"], ret=True) def run(): pass @@ -84,7 +84,7 @@ expected_distribution_name = "hello-1.2.3" - @project_setup_py_test("hello-cpp", ["bdist_wheel"]) + @project_setup_py_test("hello-cpp", ["bdist_wheel"], ret=True) def build_wheel(): whls = glob.glob("dist/*.whl") assert len(whls) == 1 @@ -113,7 +113,7 @@ dry_run = dry_run == "with-dry-run" - @project_setup_py_test("hello-cpp", ["build"]) + @project_setup_py_test("hello-cpp", ["build"], ret=True) def run_build(): pass @@ -163,25 +163,22 @@ # Check that a project can be cleaned twice in a row run_build() - print("<<-->>") - run_clean() - print("<<-->>") - run_clean() + capfd.readouterr() + caplog.clear() - _, clean1_out, clean2_out = capfd.readouterr()[0].split("<<-->>") - - clean1_out = clean1_out.strip() - clean2_out = clean2_out.strip() - - assert "running clean" == clean1_out.splitlines()[0] - if caplog.text.count("removing") != 3: - assert f"removing '{CMAKE_INSTALL_DIR()}'" == clean1_out.splitlines()[1] - assert f"removing '{CMAKE_BUILD_DIR()}'" == clean1_out.splitlines()[2] - assert f"removing '{SKBUILD_DIR()}'" == clean1_out.splitlines()[3] + run_clean() + txt1 = caplog.text + msg = capfd.readouterr().out + txt1 + assert "running clean" in msg + caplog.clear() - assert "running clean" == clean2_out + run_clean() + txt2 = caplog.text + msg = capfd.readouterr().out + txt2 + assert "running clean" in msg +@pytest.mark.deprecated @project_setup_py_test("hello-cpp", ["develop"]) def test_hello_develop(): for expected_file in [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_hello_pure.py new/scikit-build-0.16.4/tests/test_hello_pure.py --- old/scikit-build-0.16.1/tests/test_hello_pure.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_hello_pure.py 2022-12-16 22:59:22.000000000 +0100 @@ -58,7 +58,7 @@ def test_hello_clean(capfd): with push_dir(): - @project_setup_py_test("hello-pure", ["build"], disable_languages_test=True) + @project_setup_py_test("hello-pure", ["build"], disable_languages_test=True, ret=True) def run_build(): pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_issue274_support_default_package_dir.py new/scikit-build-0.16.4/tests/test_issue274_support_default_package_dir.py --- old/scikit-build-0.16.1/tests/test_issue274_support_default_package_dir.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_issue274_support_default_package_dir.py 2022-12-16 22:59:22.000000000 +0100 @@ -1,3 +1,5 @@ +import pytest + from . import ( _tmpdir, execute_setup_py, @@ -8,11 +10,13 @@ ) +@pytest.mark.deprecated @project_setup_py_test("issue-274-support-default-package-dir", ["install"], disable_languages_test=True) def test_install_command(): pass +@pytest.mark.deprecated def test_test_command(): with push_dir(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_issue274_support_one_package_without_package_dir.py new/scikit-build-0.16.4/tests/test_issue274_support_one_package_without_package_dir.py --- old/scikit-build-0.16.1/tests/test_issue274_support_one_package_without_package_dir.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_issue274_support_one_package_without_package_dir.py 2022-12-16 22:59:22.000000000 +0100 @@ -1,3 +1,5 @@ +import pytest + from . import ( _tmpdir, execute_setup_py, @@ -8,11 +10,13 @@ ) +@pytest.mark.deprecated @project_setup_py_test("issue-274-support-one-package-without-package-dir", ["install"], disable_languages_test=True) def test_install_command(): pass +@pytest.mark.deprecated def test_test_command(): with push_dir(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py new/scikit-build-0.16.4/tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py --- old/scikit-build-0.16.1/tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_issue334_configure_cmakelists_non_cp1252_encoding.py 2022-12-16 22:59:22.000000000 +0100 @@ -1,6 +1,9 @@ +import pytest + from . import project_setup_py_test +@pytest.mark.deprecated @project_setup_py_test("issue-334-configure-cmakelist-non-cp1252-encoding", ["install"], disable_languages_test=True) def test_install_command(): pass diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_logging.py new/scikit-build-0.16.4/tests/test_logging.py --- old/scikit-build-0.16.1/tests/test_logging.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_logging.py 2022-12-16 22:59:22.000000000 +0100 @@ -1,8 +1,9 @@ +import logging from types import SimpleNamespace import pytest -from skbuild.utils import distribution_hide_listing, distutils_log +from skbuild.utils import distribution_hide_listing setuptools_logging = pytest.importorskip("setuptools.logging") @@ -14,7 +15,7 @@ distribution.hide_listing = True with distribution_hide_listing(distribution): - distutils_log.info("This is hidden") + logging.getLogger("wheel").info("This is hidden") assert "This is hidden" not in caplog.text @@ -26,6 +27,6 @@ distribution.hide_listing = False with distribution_hide_listing(distribution): - distutils_log.info("This is not hidden") + logging.getLogger("wheel").info("This is not hidden") assert "This is not hidden" in caplog.text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_setup.py new/scikit-build-0.16.4/tests/test_setup.py --- old/scikit-build-0.16.1/tests/test_setup.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_setup.py 2022-12-16 22:59:22.000000000 +0100 @@ -146,7 +146,7 @@ ("banana", False, str), ), ) -def test_cmake_install_dir_keyword(cmake_install_dir, expected_failed, error_code_type, capsys): +def test_cmake_install_dir_keyword(cmake_install_dir, expected_failed, error_code_type, capsys, caplog): # ------------------------------------------------------------------------- # "SOURCE" tree layout: @@ -220,6 +220,7 @@ message = str(e) out, _ = capsys.readouterr() + out += caplog.text assert failed == expected_failed if failed: @@ -320,6 +321,7 @@ assert "CMake version 99.98.97 or higher is required." in message +@pytest.mark.deprecated @pytest.mark.filterwarnings("ignore:setuptools.installer is deprecated:Warning") @pytest.mark.skipif( os.environ.get("CONDA_BUILD", "0") == "1", @@ -379,7 +381,7 @@ @pytest.mark.parametrize("distribution_type", ("pure", "skbuild")) -def test_script_keyword(distribution_type, capsys): +def test_script_keyword(distribution_type, capsys, caplog): # ------------------------------------------------------------------------- # @@ -458,12 +460,13 @@ pass out, _ = capsys.readouterr() + out += caplog.text for message in messages: assert to_platform_path(message) in out @pytest.mark.parametrize("distribution_type", ("pure", "skbuild")) -def test_py_modules_keyword(distribution_type, capsys): +def test_py_modules_keyword(distribution_type, capsys, caplog): # ------------------------------------------------------------------------- # @@ -539,6 +542,7 @@ pass out, _ = capsys.readouterr() + out += caplog.text for message in messages: assert to_platform_path(message) in out @@ -943,7 +947,7 @@ @pytest.mark.parametrize("with_cmake_source_dir", [0, 1]) -def test_cmake_install_into_pure_package(with_cmake_source_dir, capsys): +def test_cmake_install_into_pure_package(with_cmake_source_dir, capsys, caplog): # ------------------------------------------------------------------------- # "SOURCE" tree layout: @@ -1056,6 +1060,7 @@ ] out, _ = capsys.readouterr() + out += caplog.text for message in messages: assert to_platform_path(message) in out diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scikit-build-0.16.1/tests/test_skbuild.py new/scikit-build-0.16.4/tests/test_skbuild.py --- old/scikit-build-0.16.1/tests/test_skbuild.py 2022-10-29 17:35:21.000000000 +0200 +++ new/scikit-build-0.16.4/tests/test_skbuild.py 2022-12-16 22:59:22.000000000 +0100 @@ -82,9 +82,9 @@ this_platform = platform.system().lower() if this_platform not in generator_platform[generator]: - pytest.skip(f"{generator} generator is available only on {this_platform.title()}") + pytest.skip(f"{generator} generator is not available on {this_platform.title()}") - @project_setup_py_test("hello-cpp", ["build"]) + @project_setup_py_test("hello-cpp", ["build"], ret=True) def run_build(): pass @@ -127,8 +127,8 @@ @pytest.mark.skipif(sys.platform != "win32", reason="Requires Windows") -@pytest.mark.parametrize("vs_year", ["2015", "2017", "2019", "2022"]) -def test_platform_windows_find_visual_studio(vs_year): +@pytest.mark.parametrize("vs_year", ["2017", "2019", "2022"]) +def test_platform_windows_find_visual_studio(vs_year, capsys): """If the environment variable ``SKBUILD_TEST_FIND_VS<vs_year>_INSTALLATION_EXPECTED`` is set, this test asserts the value returned by :func:`skbuild.platforms.windows.find_visual_studio()`. It skips the test otherwise. @@ -143,6 +143,8 @@ valid_path_expected = bool(int(os.environ[env_var])) vs_path = find_visual_studio(VS_YEAR_TO_VERSION[vs_year]) if valid_path_expected: + with capsys.disabled(): + print(f"\nFound VS {vs_year} @ {vs_path}") assert os.path.exists(vs_path) else: assert vs_path == "" @@ -160,7 +162,7 @@ if arch == "64bit": vs_generator += " Win64" - @project_setup_py_test("hello-cpp", ["build", "-G", vs_generator]) + @project_setup_py_test("hello-cpp", ["build", "-G", vs_generator], ret=True) def run_build(): pass