Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-tox-wheel for 
openSUSE:Factory checked in at 2022-10-31 13:04:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-tox-wheel (Old)
 and      /work/SRC/openSUSE:Factory/.python-tox-wheel.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-tox-wheel"

Mon Oct 31 13:04:32 2022 rev:6 rq:1032445 version:1.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-tox-wheel/python-tox-wheel.changes        
2022-10-12 18:27:44.574092895 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-tox-wheel.new.2275/python-tox-wheel.changes  
    2022-10-31 13:04:33.869765039 +0100
@@ -1,0 +2,6 @@
+Sat Oct 29 16:17:58 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- Update to version 1.0.0 
+  * Added option to build wheels (and sdists) in an isolated environment using 
build. Contributed by Ben Rowland in #17.
+
+-------------------------------------------------------------------

Old:
----
  tox-wheel-0.7.0.tar.gz

New:
----
  tox-wheel-1.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-tox-wheel.spec ++++++
--- /var/tmp/diff_new_pack.VyH7Ye/_old  2022-10-31 13:04:34.401767750 +0100
+++ /var/tmp/diff_new_pack.VyH7Ye/_new  2022-10-31 13:04:34.409767791 +0100
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-tox-wheel
-Version:        0.7.0
+Version:        1.0.0
 Release:        0
 Summary:        A Tox plugin that builds and installs wheels instead of sdist
 License:        BSD-2-Clause
@@ -29,13 +29,13 @@
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-tox >= 3.9
-Requires:       python-wheel >= 0.31
+Requires:       python-wheel >= 0.33.1
 BuildArch:      noarch
 # SECTION test requirements
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module tox >= 3.9}
 BuildRequires:  %{python_module tox-no-internet}
-BuildRequires:  %{python_module wheel >= 0.31}
+BuildRequires:  %{python_module wheel >= 0.33.1}
 # /SECTION
 %python_subpackages
 

++++++ tox-wheel-0.7.0.tar.gz -> tox-wheel-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/.bumpversion.cfg 
new/tox-wheel-1.0.0/.bumpversion.cfg
--- old/tox-wheel-0.7.0/.bumpversion.cfg        2021-12-29 16:11:33.000000000 
+0100
+++ new/tox-wheel-1.0.0/.bumpversion.cfg        2022-10-01 12:11:45.000000000 
+0200
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 0.7.0
+current_version = 1.0.0
 commit = True
 tag = True
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/.pre-commit-config.yaml 
new/tox-wheel-1.0.0/.pre-commit-config.yaml
--- old/tox-wheel-0.7.0/.pre-commit-config.yaml 2021-12-22 10:51:27.000000000 
+0100
+++ new/tox-wheel-1.0.0/.pre-commit-config.yaml 2022-10-01 11:22:03.000000000 
+0200
@@ -5,16 +5,16 @@
 exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
 repos:
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: master
+    rev: v4.3.0
     hooks:
       - id: trailing-whitespace
       - id: end-of-file-fixer
       - id: debug-statements
   - repo: https://github.com/timothycrosley/isort
-    rev: master
+    rev: 5.10.1
     hooks:
       - id: isort
   - repo: https://gitlab.com/pycqa/flake8
-    rev: master
+    rev: 3.9.2
     hooks:
       - id: flake8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/AUTHORS.rst 
new/tox-wheel-1.0.0/AUTHORS.rst
--- old/tox-wheel-0.7.0/AUTHORS.rst     2021-12-22 10:51:52.000000000 +0100
+++ new/tox-wheel-1.0.0/AUTHORS.rst     2022-09-06 13:12:31.000000000 +0200
@@ -6,3 +6,4 @@
 * Antonio Botelho - https://github.com/botant
 * Thomas Grainger - https://github.com/graingert
 * Michael Rans - https://github.com/mcarans
+* Ben Rowland - https://github.com/bennyrowland
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/CHANGELOG.rst 
new/tox-wheel-1.0.0/CHANGELOG.rst
--- old/tox-wheel-0.7.0/CHANGELOG.rst   2021-12-29 16:11:19.000000000 +0100
+++ new/tox-wheel-1.0.0/CHANGELOG.rst   2022-10-01 12:11:10.000000000 +0200
@@ -2,6 +2,12 @@
 Changelog
 =========
 
+1.0.0 (2022-10-01)
+------------------
+
+* Added option to build wheels (and sdists) in an isolated environment using 
`build <https://github.com/pypa/build>`_.
+  Contributed by Ben Rowland in `#17 
<https://github.com/ionelmc/tox-wheel/pull/17>`_.
+
 0.7.0 (2021-12-29)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/PKG-INFO new/tox-wheel-1.0.0/PKG-INFO
--- old/tox-wheel-0.7.0/PKG-INFO        2021-12-29 16:11:37.120311500 +0100
+++ new/tox-wheel-1.0.0/PKG-INFO        2022-10-01 12:28:35.612478700 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tox-wheel
-Version: 0.7.0
+Version: 1.0.0
 Summary: A Tox plugin that builds and installs wheels instead of sdist.
 Home-page: https://github.com/ionelmc/tox-wheel
 Author: Ionel Cristian M??rie??
@@ -141,10 +141,15 @@
     tox
 
 
-
 Changelog
 =========
 
+1.0.0 (2022-10-01)
+------------------
+
+* Added option to build wheels (and sdists) in an isolated environment using 
`build <https://github.com/pypa/build>`_.
+  Contributed by Ben Rowland in `#17 
<https://github.com/ionelmc/tox-wheel/pull/17>`_.
+
 0.7.0 (2021-12-29)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/README.rst 
new/tox-wheel-1.0.0/README.rst
--- old/tox-wheel-0.7.0/README.rst      2021-12-29 16:11:33.000000000 +0100
+++ new/tox-wheel-1.0.0/README.rst      2022-10-01 12:11:45.000000000 +0200
@@ -46,9 +46,9 @@
     :alt: Supported implementations
     :target: https://pypi.org/project/tox-wheel
 
-.. |commits-since| image:: 
https://img.shields.io/github/commits-since/ionelmc/tox-wheel/v0.7.0.svg
+.. |commits-since| image:: 
https://img.shields.io/github/commits-since/ionelmc/tox-wheel/v1.0.0.svg
     :alt: Commits since latest release
-    :target: https://github.com/ionelmc/tox-wheel/compare/v0.7.0...master
+    :target: https://github.com/ionelmc/tox-wheel/compare/v1.0.0...master
 
 
 
@@ -156,4 +156,3 @@
 To run the all tests run::
 
     tox
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/setup.py new/tox-wheel-1.0.0/setup.py
--- old/tox-wheel-0.7.0/setup.py        2021-12-29 16:11:33.000000000 +0100
+++ new/tox-wheel-1.0.0/setup.py        2022-10-01 12:11:45.000000000 +0200
@@ -23,7 +23,7 @@
 
 setup(
     name='tox-wheel',
-    version='0.7.0',
+    version='1.0.0',
     license='BSD-2-Clause',
     description='A Tox plugin that builds and installs wheels instead of 
sdist.',
     long_description='%s\n%s' % (
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/src/tox_wheel/__init__.py 
new/tox-wheel-1.0.0/src/tox_wheel/__init__.py
--- old/tox-wheel-0.7.0/src/tox_wheel/__init__.py       2021-12-29 
16:11:33.000000000 +0100
+++ new/tox-wheel-1.0.0/src/tox_wheel/__init__.py       2022-10-01 
12:11:45.000000000 +0200
@@ -1 +1 @@
-__version__ = '0.7.0'
+__version__ = '1.0.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/src/tox_wheel/plugin.py 
new/tox-wheel-1.0.0/src/tox_wheel/plugin.py
--- old/tox-wheel-0.7.0/src/tox_wheel/plugin.py 2021-12-21 22:48:43.000000000 
+0100
+++ new/tox-wheel-1.0.0/src/tox_wheel/plugin.py 2022-10-01 11:22:06.000000000 
+0200
@@ -1,3 +1,4 @@
+import os.path
 from contextlib import contextmanager
 from functools import partial
 
@@ -5,6 +6,7 @@
 import py
 from tox import package
 from tox import reporter
+from tox.exception import InterpreterNotFound
 from tox.package import get_package
 from tox.util.path import ensure_empty_dir
 
@@ -31,9 +33,12 @@
     )
     parser.add_testenv_attribute(
         name="wheel_pep517",
-        type="bool",
-        default=False,
-        help="Build wheel using PEP 517/518"
+        type="string",
+        default="",
+        help=(
+            "Build wheel using PEP 517/518 (pass true to build with pip or "
+            "build to build with build)"
+        ),
     )
     parser.add_testenv_attribute(
         name="wheel_dirty",
@@ -60,16 +65,29 @@
 
 
 @hookimpl
+def tox_testenv_install_deps(venv, action):
+    if venv.envconfig.wheel_pep517 == "build":
+        venv.run_install_command(["build[virtualenv]>=0.7.0"], action)
+    return None
+
+
+@hookimpl
 def tox_package(session, venv):
-    if hasattr(session, "package"):
-        return session.package
     if session.config.option.wheel or venv.envconfig.wheel:
         build_venv = session.getvenv(venv.envconfig.wheel_build_env)
         if not hasattr(build_venv, "wheel_package"):
-            with patch(package, "build_package", partial(wheel_build_package, 
venv=build_venv)):
-                build_venv.wheel_package, build_venv.wheel_dist = 
get_package(session)
+            try:
+                with patch(package, "build_package", 
partial(wheel_build_package, venv=build_venv)):
+                    build_venv.wheel_package, build_venv.wheel_dist = 
get_package(session)
+            except InterpreterNotFound:
+                if session.config.option.skip_missing_interpreters:
+                    return None
+                raise
         return build_venv.wheel_package
 
+    elif hasattr(session, "package"):
+        return session.package
+
 
 def wheel_build_package(config, session, venv):
     if config.isolated_build or venv.envconfig.wheel_pep517:
@@ -146,16 +164,36 @@
             action.setactivity("wheel-make", "cleaning up build directory ...")
             ensure_empty_dir(config.setupdir.join("build"))
         ensure_empty_dir(config.distdir)
+        if venv.envconfig.wheel_pep517 == "build":
+            commands = [
+                "python",
+                "-Im",
+                "build",
+                "--outdir",
+                config.distdir,
+                config.setupdir,
+            ]
+        else:
+            commands = [
+                "pip",
+                "wheel",
+                config.setupdir,
+                "--no-deps",
+                "--use-pep517",
+                "--wheel-dir",
+                config.distdir,
+            ]
         venv.test(
             name="wheel-make",
-            commands=[["pip", "wheel", config.setupdir, "--no-deps", 
"--use-pep517", "--wheel-dir", config.distdir]],
+            commands=[commands],
             redirect=False,
             ignore_outcome=False,
             ignore_errors=False,
             display_hash_seed=False,
         )
         try:
-            dists = config.distdir.listdir()
+            # we need to filter our list of dists to include only wheels
+            dists = [dist for dist in config.distdir.listdir() if 
os.path.splitext(dist)[1] == ".whl"]
         except py.error.ENOENT:
             reporter.error(
                 "No dist directory found. Please check pyproject.toml, e.g 
with:\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/src/tox_wheel.egg-info/PKG-INFO 
new/tox-wheel-1.0.0/src/tox_wheel.egg-info/PKG-INFO
--- old/tox-wheel-0.7.0/src/tox_wheel.egg-info/PKG-INFO 2021-12-29 
16:11:37.000000000 +0100
+++ new/tox-wheel-1.0.0/src/tox_wheel.egg-info/PKG-INFO 2022-10-01 
12:28:35.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tox-wheel
-Version: 0.7.0
+Version: 1.0.0
 Summary: A Tox plugin that builds and installs wheels instead of sdist.
 Home-page: https://github.com/ionelmc/tox-wheel
 Author: Ionel Cristian M??rie??
@@ -141,10 +141,15 @@
     tox
 
 
-
 Changelog
 =========
 
+1.0.0 (2022-10-01)
+------------------
+
+* Added option to build wheels (and sdists) in an isolated environment using 
`build <https://github.com/pypa/build>`_.
+  Contributed by Ben Rowland in `#17 
<https://github.com/ionelmc/tox-wheel/pull/17>`_.
+
 0.7.0 (2021-12-29)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/tests/test_tox_wheel.py 
new/tox-wheel-1.0.0/tests/test_tox_wheel.py
--- old/tox-wheel-0.7.0/tests/test_tox_wheel.py 2021-12-22 10:51:52.000000000 
+0100
+++ new/tox-wheel-1.0.0/tests/test_tox_wheel.py 2022-10-01 11:22:06.000000000 
+0200
@@ -4,6 +4,13 @@
 
 import tox_wheel.plugin
 
+try:
+    from unittest.mock import MagicMock
+    from unittest.mock import patch
+except ImportError:
+    from mock import MagicMock
+    from mock import patch
+
 pytest_plugins = 'pytester',
 
 
@@ -48,6 +55,32 @@
     return testdir
 
 
[email protected]
+def testdir_pep517_build(testdir):
+    testdir.tmpdir.join('tox.ini').write("""
+[tox]
+envlist = py-{a,b}
+
+[testenv]
+wheel = true
+wheel_pep517 = build
+""")
+    testdir.tmpdir.join('setup.py').write("""
+from setuptools import setup
+
+setup(name='foobar', packages=[])
+""")
+    testdir.tmpdir.join('pyproject.toml').write("""
+[build-system]
+requires = [
+    "setuptools >= 35.0.2"
+]
+build-backend = "setuptools.build_meta"
+""")
+    testdir.tmpdir.join('build').ensure(dir=1)
+    return testdir
+
+
 @pytest.fixture(params=['', '--parallel 1 --parallel-live'], 
ids=['sequential', 'parallel'])
 def options(request):
     return ['-e', 'py-a,py-b'] + request.param.split()
@@ -93,6 +126,16 @@
     assert result.ret == 0
 
 
+def test_enabled_pep517_build(testdir_pep517_build, options):
+    result = testdir_pep517_build.run('tox', *options)
+    result.stdout.fnmatch_lines([
+        'py* wheel-make: *',
+    ])
+    build_string = 'Successfully built foobar-0.0.0.tar.gz and 
foobar-0.0.0-py3-none-any.whl'
+    assert result.stdout.str().count(build_string) == 2
+    assert result.ret == 0
+
+
 def test_build_env_legacy(testdir_legacy, options):
     testdir_legacy.tmpdir.join('setup.cfg').write("""
 [bdist_wheel]
@@ -135,6 +178,25 @@
     assert result.ret == 0
 
 
+def test_build_env_pep517_build(testdir_pep517_build, options):
+    testdir_pep517_build.tmpdir.join('setup.cfg').write("""
+[bdist_wheel]
+universal = 1
+""")
+    testdir_pep517_build.tmpdir.join('tox.ini').write("""
+wheel_build_env = build
+
+[testenv:build]
+""", mode='a')
+    result = testdir_pep517_build.run('tox', *options)
+    result.stdout.fnmatch_lines([
+        'build wheel-make: *',
+    ])
+    build_string = 'Successfully built foobar-0.0.0.tar.gz and 
foobar-0.0.0-py2.py3-none-any.whl'
+    assert result.stdout.str().count(build_string) == 1
+    assert result.ret == 0
+
+
 @pytest.mark.parametrize('wheel_build_env', ['', 'wheel_build_env'])
 def test_skip_usedevelop(testdir_legacy, options, wheel_build_env):
     testdir_legacy.tmpdir.join('tox.ini').write("""
@@ -209,3 +271,52 @@
     ])
     assert 'is not a supported wheel on this platform.' not in 
result.stdout.str()
     assert 'is not a supported wheel on this platform.' not in 
result.stderr.str()
+
+
+def test_skip_missing_interpreters():
+    with patch.object(tox_wheel.plugin, 'get_package') as mock_build:
+        venv = MagicMock()
+        venv.envconfig.wheel = True
+        session = MagicMock()
+        session.config.option.wheel = True
+        session.getvenv.return_value = object()
+        mock_build.side_effect = tox_wheel.plugin.InterpreterNotFound("No 
interpreter")
+
+        with pytest.raises(tox_wheel.plugin.InterpreterNotFound):
+            tox_wheel.plugin.get_package(session)
+
+        session.config.option.skip_missing_interpreters = True
+        assert tox_wheel.plugin.tox_package(session, venv) is None
+
+        session.config.option.skip_missing_interpreters = False
+        with pytest.raises(tox_wheel.plugin.InterpreterNotFound):
+            tox_wheel.plugin.tox_package(session, venv)
+
+
+def test_multiplex_sdist_and_wheel(testdir_legacy, options):
+    testdir_legacy.tmpdir.join('tox.ini').write("""
+[tox]
+envlist =
+    py-{a,b}
+    missing_interpreter
+
+skip_missing_interpreters = True
+
+[testenv:a]
+wheel = false
+
+[testenv:b]
+wheel = true
+
+[testenv:missing_interpreter]
+basepython = python3.nothing
+""")
+    assert 'py-a,py-b' in options
+    options[options.index('py-a,py-b')] = 'py-a,py-b,missing_interpreter'
+
+    result = testdir_legacy.run('tox', '-vv', *options)
+    result.stdout.fnmatch_lines([
+        'GLOB sdist-make: *',
+        '*Building wheels*',
+    ])
+    assert result.ret == 0, result.stdout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tox-wheel-0.7.0/tox.ini new/tox-wheel-1.0.0/tox.ini
--- old/tox-wheel-0.7.0/tox.ini 2021-12-22 10:51:52.000000000 +0100
+++ new/tox-wheel-1.0.0/tox.ini 2022-09-06 11:50:54.000000000 +0200
@@ -39,6 +39,7 @@
     wheel==0.35.1
     {py35,py36,py37,py38,py39,pypy3}: setuptools==50.3.2
     {py27,pypy}: setuptools==44.1.1
+    {py27,py35,pypy}: mock>=3
     tox==3.9.0
     tox-virtualenv-no-download==1.1.0
 

Reply via email to