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-03-25 21:55:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-scikit-build (Old)
and /work/SRC/openSUSE:Factory/.python-scikit-build.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-scikit-build"
Fri Mar 25 21:55:00 2022 rev:8 rq:964858 version:0.13.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-scikit-build/python-scikit-build.changes
2022-02-05 23:24:36.111342504 +0100
+++
/work/SRC/openSUSE:Factory/.python-scikit-build.new.1900/python-scikit-build.changes
2022-03-25 21:55:21.582317398 +0100
@@ -1,0 +2,7 @@
+Fri Mar 25 13:17:01 UTC 2022 - Ben Greiner <[email protected]>
+
+- Update to 0.13.1
+ * Do not throw an error when printing info and a logger is
+ disconnected. #652
+
+-------------------------------------------------------------------
Old:
----
scikit-build-0.13.0.tar.gz
New:
----
scikit-build-0.13.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-scikit-build.spec ++++++
--- /var/tmp/diff_new_pack.JBb5ny/_old 2022-03-25 21:55:22.094317885 +0100
+++ /var/tmp/diff_new_pack.JBb5ny/_new 2022-03-25 21:55:22.102317893 +0100
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-scikit-build
-Version: 0.13.0
+Version: 0.13.1
Release: 0
Summary: Improved build system generator for Python
C/C++/Fortran/Cython extensions
License: MIT
++++++ scikit-build-0.13.0.tar.gz -> scikit-build-0.13.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/scikit-build-0.13.0/CHANGES.rst
new/scikit-build-0.13.1/CHANGES.rst
--- old/scikit-build-0.13.0/CHANGES.rst 2022-02-02 20:24:25.000000000 +0100
+++ new/scikit-build-0.13.1/CHANGES.rst 2022-02-07 19:51:43.000000000 +0100
@@ -5,6 +5,22 @@
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
+Scikit-build 0.13.1
+===================
+
+This release fixes two bugs affecting Windows. Users should use ``"ninja;
+platform_system!='Windows"``, at least for now, since MSVC ships with Ninja,
+and that Ninja is better at finding the matching MSVC than the Python package
+is. Including it may slow down the search and force the IDE generator instead,
+but will at least no longer discover GCC instead.
+
+Bug fixes
+---------
+
+* On Windows, don't let Ninja find something other than what it's supposed to
+ look for. Ensure the Ninja package is used for the search, just like normal
+ runs, if installed. :pr:`652`.
+* Do not throw an error when printing info and a logger is disconnected.
:pr:`652`
Scikit-build 0.13.0
===================
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/scikit-build-0.13.0/PKG-INFO
new/scikit-build-0.13.1/PKG-INFO
--- old/scikit-build-0.13.0/PKG-INFO 2022-02-02 20:24:35.140333000 +0100
+++ new/scikit-build-0.13.1/PKG-INFO 2022-02-07 19:51:56.193712700 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: scikit-build
-Version: 0.13.0
+Version: 0.13.1
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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/scikit-build-0.13.0/docs/usage.rst
new/scikit-build-0.13.1/docs/usage.rst
--- old/scikit-build-0.13.0/docs/usage.rst 2022-02-02 20:24:25.000000000
+0100
+++ new/scikit-build-0.13.1/docs/usage.rst 2022-02-07 19:51:43.000000000
+0100
@@ -42,9 +42,21 @@
Then, add a ``pyproject.toml`` to list the build system requirements::
[build-system]
- requires = ["setuptools", "wheel", "scikit-build", "cmake", "ninja"]
+ requires = [
+ "setuptools>=42",
+ "wheel",
+ "scikit-build",
+ "cmake",
+ "ninja; platform_system!='Windows'"
+ ]
+ build-backend = "setuptools.build_meta"
+You can add lower limits to ``cmake`` or ``scikit-build`` as needed. Ninja
+should be limited to non-Windows systems, as MSVC 2017+ ships with Ninja
+already, and there are fall-backs if Ninja is missing, and the Python Ninja
+seems to be less likely to find MSVC than the built-in one currently.
+
.. note::
By default, scikit-build looks in the project top-level directory for a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/scikit-build-0.13.0/scikit_build.egg-info/PKG-INFO
new/scikit-build-0.13.1/scikit_build.egg-info/PKG-INFO
--- old/scikit-build-0.13.0/scikit_build.egg-info/PKG-INFO 2022-02-02
20:24:35.000000000 +0100
+++ new/scikit-build-0.13.1/scikit_build.egg-info/PKG-INFO 2022-02-07
19:51:56.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: scikit-build
-Version: 0.13.0
+Version: 0.13.1
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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/scikit-build-0.13.0/skbuild/_version.py
new/scikit-build-0.13.1/skbuild/_version.py
--- old/scikit-build-0.13.0/skbuild/_version.py 2022-02-02 20:24:35.140333000
+0100
+++ new/scikit-build-0.13.1/skbuild/_version.py 2022-02-07 19:51:56.193712700
+0100
@@ -8,11 +8,11 @@
version_json = '''
{
- "date": "2022-02-02T13:16:32-0500",
+ "date": "2022-02-07T13:44:12-0500",
"dirty": false,
"error": null,
- "full-revisionid": "1ebee61903a75b00e7d685cac7e4e9ad9eeecf0b",
- "version": "0.13.0"
+ "full-revisionid": "4d5f087c731675445988ad48364377d10b110b65",
+ "version": "0.13.1"
}
''' # END VERSION_JSON
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/scikit-build-0.13.0/skbuild/platform_specifics/abstract.py
new/scikit-build-0.13.1/skbuild/platform_specifics/abstract.py
--- old/scikit-build-0.13.0/skbuild/platform_specifics/abstract.py
2022-02-02 20:24:25.000000000 +0100
+++ new/scikit-build-0.13.1/skbuild/platform_specifics/abstract.py
2022-02-07 19:51:43.000000000 +0100
@@ -50,6 +50,15 @@
f.write("PROJECT(compiler_test NONE)\n")
for language in languages:
f.write("ENABLE_LANGUAGE({:s})\n".format(language))
+ f.write('if("${_SKBUILD_FORCE_MSVC}")\n'
+ ' math(EXPR FORCE_MAX "${_SKBUILD_FORCE_MSVC}+9")\n'
+ ' math(EXPR FORCE_MIN "${_SKBUILD_FORCE_MSVC}")\n'
+ ' if(NOT MSVC)\n'
+ ' message(FATAL_ERROR "MSVC is required to pass this
check.")\n'
+ " elseif(MSVC_VERSION LESS FORCE_MIN OR MSVC_VERSION
GREATER FORCE_MAX)\n"
+ ' message(FATAL_ERROR "MSVC ${MSVC_VERSION} does pass
this check.")\n'
+ " endif()\n"
+ 'endif()\n')
@staticmethod
def cleanup_test():
@@ -210,6 +219,7 @@
if generator.architecture:
cmd.extend(['-A', generator.architecture])
cmd.extend(cmake_args)
+ cmd.extend(generator.args)
status = subprocess.call(cmd, env=generator.env)
@@ -232,7 +242,7 @@
.. automethod:: __init__
"""
- def __init__(self, name, env=None, toolset=None, arch=None):
+ def __init__(self, name, env=None, toolset=None, arch=None, args=None):
"""Instantiate a generator object with the given ``name``.
By default, ``os.environ`` is associated with the generator. Dictionary
@@ -241,9 +251,10 @@
variable in ``env`` is used.
Some CMake generators support a ``toolset`` specification to tell the
native
- build system how to choose a compiler.
+ build system how to choose a compiler. You can also include CMake
arguments.
"""
self._generator_name = name
+ self.args = args or []
self.env = dict(
list(os.environ.items()) + list(env.items() if env else []))
self._generator_toolset = toolset
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/scikit-build-0.13.0/skbuild/platform_specifics/unix.py
new/scikit-build-0.13.1/skbuild/platform_specifics/unix.py
--- old/scikit-build-0.13.0/skbuild/platform_specifics/unix.py 2022-02-02
20:24:25.000000000 +0100
+++ new/scikit-build-0.13.1/skbuild/platform_specifics/unix.py 2022-02-07
19:51:43.000000000 +0100
@@ -1,5 +1,7 @@
"""This module defines object specific to Unix platform."""
+import os
+
from .abstract import CMakeGenerator
from . import abstract
@@ -11,7 +13,14 @@
def __init__(self):
super(UnixPlatform, self).__init__()
+ try:
+ import ninja
+ ninja_executable_path = os.path.join(ninja.BIN_DIR, "ninja")
+ ninja_args = ['-DCMAKE_MAKE_PROGRAM:FILEPATH=' +
ninja_executable_path]
+ except ImportError:
+ ninja_args = []
+
self.default_generators = [
- CMakeGenerator("Ninja"),
+ CMakeGenerator("Ninja", args=ninja_args),
CMakeGenerator("Unix Makefiles")
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/scikit-build-0.13.0/skbuild/platform_specifics/windows.py
new/scikit-build-0.13.1/skbuild/platform_specifics/windows.py
--- old/scikit-build-0.13.0/skbuild/platform_specifics/windows.py
2022-02-02 20:24:25.000000000 +0100
+++ new/scikit-build-0.13.1/skbuild/platform_specifics/windows.py
2022-02-07 19:51:43.000000000 +0100
@@ -16,12 +16,40 @@
from . import abstract
+VS_YEAR_TO_VERSION = {
+ "2008": 9,
+ "2010": 10,
+ "2012": 11,
+ "2013": 12,
+ "2015": 14,
+ "2017": 15,
+ "2019": 16,
+ "2022": 17,
+}
+"""Describes the version of `Visual Studio` supported by
+:class:`CMakeVisualStudioIDEGenerator` and
+:class:`CMakeVisualStudioCommandLineGenerator`.
+
+The different version are identified by their year.
+"""
+
+VS_YEAR_TO_MSC_VER = {
+ "2008":"1500", # VS 2008
+ "2010":"1600", # VS 2010
+ "2012":"1700", # VS 2012
+ "2013":"1800", # VS 2012
+ "2015":"1900", # VS 2015
+ "2017":"1910", # VS 2017 - can be +9
+ "2019":"1920", # VS 2019 - can be +9
+ "2022":"1930", # VS 2022 - can be +9
+}
+
+
class WindowsPlatform(abstract.CMakePlatform):
"""Windows implementation of :class:`.abstract.CMakePlatform`."""
def __init__(self):
super(WindowsPlatform, self).__init__()
- version = sys.version_info
self._vs_help = ""
vs_help_template = textwrap.dedent(
"""
@@ -33,10 +61,7 @@
).strip().format(pyver="%s.%s" % sys.version_info[:2])
# For Python 2.7 to Python 3.2: VS2008
- if (
- (version.major == 2 and version.minor >= 7) or
- (version.major == 3 and version.minor <= 2)
- ):
+ if (2, 7) <= sys.version_info < (3, 3):
supported_vs_years = [("2008", None)]
self._vs_help = vs_help_template % (
supported_vs_years[0][0],
@@ -45,12 +70,7 @@
)
# For Python 3.3 to Python 3.4: VS2010
- elif (
- version.major == 3 and (
- version.minor >= 3 and
- version.minor <= 4
- )
- ):
+ elif (3, 3) <= sys.version_info < (3, 5):
supported_vs_years = [("2010", None)]
self._vs_help = vs_help_template % (
supported_vs_years[0][0],
@@ -59,7 +79,7 @@
)
# For Python 3.5: VS2019, VS2017, VS2015
- elif version.major == 3 and version.minor == 5:
+ elif (3, 5) <= sys.version_info < (3, 6):
supported_vs_years = [("2019", "v142"), ("2017", "v140"), ("2015",
None)]
self._vs_help = vs_help_template % (
supported_vs_years[0][0],
@@ -75,7 +95,7 @@
).strip()
# For Python 3.6 and above: VS2022, VS2019, VS2017
- elif version.major == 3 and version.minor >= 6:
+ elif (3, 6) <= sys.version_info:
supported_vs_years = [("2022", "v143"), ("2019", "v142"), ("2017",
"v141")]
self._vs_help = vs_help_template % (
supported_vs_years[0][0],
@@ -96,12 +116,23 @@
else:
raise RuntimeError("Only Python >= 2.7 is supported on Windows.")
+ try:
+ import ninja
+ ninja_executable_path = os.path.join(ninja.BIN_DIR, "ninja")
+ ninja_args = ['-DCMAKE_MAKE_PROGRAM:FILEPATH=' +
ninja_executable_path]
+ except ImportError:
+ ninja_args = []
+
+ extra = []
for vs_year, vs_toolset in supported_vs_years:
+ vs_version = VS_YEAR_TO_MSC_VER[vs_year]
+ args = ["-D_SKBUILD_FORCE_MSVC={}".format(vs_version)]
self.default_generators.extend([
- CMakeVisualStudioCommandLineGenerator("Ninja", vs_year,
vs_toolset),
+ CMakeVisualStudioCommandLineGenerator("Ninja", vs_year,
vs_toolset, args=ninja_args + args),
CMakeVisualStudioIDEGenerator(vs_year, vs_toolset),
- CMakeVisualStudioCommandLineGenerator("NMake Makefiles",
vs_year, vs_toolset),
])
+ extra.append(CMakeVisualStudioCommandLineGenerator("NMake
Makefiles", vs_year, vs_toolset, args=args))
+ self.default_generators.extend(extra)
@property
def generator_installation_help(self):
@@ -109,24 +140,6 @@
return self._vs_help
-VS_YEAR_TO_VERSION = {
- "2008": 9,
- "2010": 10,
- "2012": 11,
- "2013": 12,
- "2015": 14,
- "2017": 15,
- "2019": 16,
- "2022": 17,
-}
-"""Describes the version of `Visual Studio` supported by
-:class:`CMakeVisualStudioIDEGenerator` and
-:class:`CMakeVisualStudioCommandLineGenerator`.
-
-The different version are identified by their year.
-"""
-
-
class CMakeVisualStudioIDEGenerator(CMakeGenerator):
"""
Represents a Visual Studio CMake generator.
@@ -359,7 +372,7 @@
.. automethod:: __init__
"""
- def __init__(self, name, year, toolset=None):
+ def __init__(self, name, year, toolset=None, args=None):
"""Instantiate CMake command-line generator.
The generator ``name`` can be values like `Ninja`, `NMake Makefiles`
@@ -375,5 +388,5 @@
"""
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(CMakeVisualStudioCommandLineGenerator, self).__init__(name, env)
+ super(CMakeVisualStudioCommandLineGenerator, self).__init__(name, env,
args=args)
self._description = "{} ({})".format(self.name,
CMakeVisualStudioIDEGenerator(year, toolset).description)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/scikit-build-0.13.0/skbuild/utils/__init__.py
new/scikit-build-0.13.1/skbuild/utils/__init__.py
--- old/scikit-build-0.13.0/skbuild/utils/__init__.py 2022-02-02
20:24:25.000000000 +0100
+++ new/scikit-build-0.13.1/skbuild/utils/__init__.py 2022-02-07
19:51:43.000000000 +0100
@@ -26,6 +26,17 @@
logging_module = False
+def _log_warning(msg, *args):
+ try:
+ if logging_module:
+ distutils_log.warning(msg, *args)
+ else:
+ distutils_log.warn(msg, *args)
+ except ValueError:
+ # Setuptools might disconnect the logger. That shouldn't be an error
for a warning.
+ print(msg % args)
+
+
class ContextDecorator(object):
"""A base class or mixin that enables context managers to work as
decorators."""
@@ -174,12 +185,7 @@
if os.path.exists(updated_module_file):
module_file = updated_module_file
if not os.path.isfile(module_file):
- if logging_module:
- distutils_log.warning(
- "file %s (for module %s) not found", module_file, module)
- else:
- distutils_log.warn(
- "file %s (for module %s) not found", module_file, module)
+ _log_warning("file %s (for module %s) not found", module_file,
module)
return False
return True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/scikit-build-0.13.0/tests/test_skbuild.py
new/scikit-build-0.13.1/tests/test_skbuild.py
--- old/scikit-build-0.13.0/tests/test_skbuild.py 2022-02-02
20:24:25.000000000 +0100
+++ new/scikit-build-0.13.1/tests/test_skbuild.py 2022-02-07
19:51:43.000000000 +0100
@@ -85,31 +85,30 @@
]
])
- generator = None
-
# If environment exists, update the expected generator
if (
has_vs_for_python_vcvars or has_vs_ide_vcvars
) and which("ninja.exe"):
- generator = "Ninja"
+ assert get_best_generator().name == "Ninja"
+
+ elif has_vs_2017:
+ vs_generator = "Visual Studio 15 2017"
+ # Early versions of 2017 may not ship with Ninja (TODO: check)
+ assert get_best_generator().name in {"Ninja", vs_generator}
- elif has_vs_2017 or has_vs_2019 or has_vs_2022:
+ elif has_vs_2019 or has_vs_2022:
# ninja is provided by the CMake extension bundled with Visual
Studio 2017
# C:/Program Files (x86)/Microsoft Visual
Studio/2017/Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe
# noqa: E501
- generator = "Ninja"
+ assert get_best_generator().name == "Ninja"
- elif has_vs_ide_vcvars or has_vs_2017:
- generator = vs_generator
+ elif has_vs_ide_vcvars:
+ assert get_best_generator().name == vs_generator
elif has_vs_for_python_vcvars:
- generator = "NMake Makefiles"
-
- assert (get_best_generator().name == generator)
+ assert get_best_generator().name == "NMake Makefiles"
elif this_platform in ["darwin", "linux"]:
- generator = "Unix Makefiles"
- if which("ninja"):
- generator = "Ninja"
+ generator = "Ninja" if which("ninja") else "Unix Makefiles"
assert get_best_generator().name == generator
@@ -192,10 +191,11 @@
pytest.skip("env. variable %s is not set" % env_var)
valid_path_expected = bool(int(os.environ[env_var]))
+ vs_path = find_visual_studio(VS_YEAR_TO_VERSION[vs_year])
if valid_path_expected:
- assert os.path.exists(find_visual_studio(VS_YEAR_TO_VERSION[vs_year]))
+ assert os.path.exists(vs_path)
else:
- assert find_visual_studio(VS_YEAR_TO_VERSION[vs_year]) == ""
+ assert vs_path == ""
@pytest.mark.skipif(sys.version_info < (3, 5), reason="Python 3.5+ required on
Windows")