Hello community,

here is the log from the commit of package python-pep517 for openSUSE:Factory 
checked in at 2020-03-27 00:21:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pep517 (Old)
 and      /work/SRC/openSUSE:Factory/.python-pep517.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pep517"

Fri Mar 27 00:21:53 2020 rev:4 rq:784284 version:0.8.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pep517/python-pep517.changes      
2019-11-04 17:07:11.728311707 +0100
+++ /work/SRC/openSUSE:Factory/.python-pep517.new.3160/python-pep517.changes    
2020-03-27 00:21:55.492154303 +0100
@@ -1,0 +2,7 @@
+Thu Mar 12 11:13:58 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com>
+
+- Update to version 0.8.1
+  * Update CI to Python 3.8
+  * Add trove classifiers for supported Pythons. 
+
+-------------------------------------------------------------------

Old:
----
  pep517-0.7.0.tar.gz

New:
----
  pep517-0.8.1.tar.gz

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

Other differences:
------------------
++++++ python-pep517.spec ++++++
--- /var/tmp/diff_new_pack.p5TQfw/_old  2020-03-27 00:21:56.652154890 +0100
+++ /var/tmp/diff_new_pack.p5TQfw/_new  2020-03-27 00:21:56.656154893 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pep517
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pep517
-Version:        0.7.0
+Version:        0.8.1
 Release:        0
 Summary:        Wrappers to build Python packages using PEP 517 hooks
 License:        MIT

++++++ pep517-0.7.0.tar.gz -> pep517-0.8.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/.travis.yml new/pep517-0.8.1/.travis.yml
--- old/pep517-0.7.0/.travis.yml        2019-02-01 13:23:08.954486100 +0100
+++ new/pep517-0.8.1/.travis.yml        2019-11-23 13:49:22.413706500 +0100
@@ -3,7 +3,8 @@
 language: python
 
 python:
-- &latest_py3 3.7
+- &latest_py3 3.8
+- 3.7
 - 3.6
 - 3.5
 - 3.4
@@ -20,10 +21,10 @@
     python: *latest_py3
     before_script: skip
     env:
-    - TWINE_USERNAME=jaraco
-    # TWINE_PASSWORD
-    - secure: 
g3w+/zzPCeLzZFdDVUj9+bsThzbRyHfVZpoR9Nh1LR7C9CHun6URtplfRl2dp1XHY3pc8YvhiiIllOKuX/5AQRnVhl3eDsAtTcCs4VaAwxF/6MLqnO5rAAviAS8e3O8aW6a9V+5YjSlbWCahfSU+lImf8BTSqIRfvgJNH5cFhDgzPlJociGq9uDQLmNkXVxNoPwAOu6QhpQg68uHs6WvdMBGxHPIQ4cu8l5bUps+6XG0ZMLDKSOjpHFqDO4qih4V8PB8f518UO5hejaaaxV0oOo5hazRtru+Q0xUMVdvVo1egAuU96CZmF6iusNz+0/RGwcspHLnNuvv/h9MBcc7LYkck4KEZmCvvt3yXUxJch3srHfJNUPcpbfOskdB8AlD+MUVnc8sAsx193b5gvm5+vgGpM1srkOwnsKbvv6viDOCT19nZhBLRf6Q3EsazzWlvmI7LgjniGFbr/fstNGN9MVP1lq4eu2V7n5lrg8liSYFNhukhQAYrZstJJnX2BFkipjM79p0gMJGzLIzXET7T5p1EYYvMJTu7Lh9xFfmNH8UKvNsPOcoMPDVgGTgQEzJAVdCnl6XfuKxg6vIwE4X/US2qZHWmVXmgIH9Xmavub6UqyhGL/LdxvE8pXzM+8Vui3Sd/LqjQh3qEuAFQRIOrSO11xod2UfIXNgQyj2Wp+8=
-    - TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD"
+    - FLIT_USERNAME=__token__
+    # FLIT_PASSWORD
+    - secure: 
"DTuasBqocwWziNCZ9oNdHdThD5b+Kbfv+4Loi2sW6zdZZnanHRantUg9jMQHEWS8SwFgvjsUlIjcjgALGeDV3Ya+ACm0KcsCiGCHYcG7XtYjKmIfXhQ1c6/YTAMi0z/aXjmXttFjwNySGQ6eXSrqMGs3m44zuVV3BSCpW9jLezmGiXltxKfxUCePxMrpFr66CKD3/Js3xQxUYp5MP50qz3FTASURSGivw2cEeuMJy+PtHahhqAjpq13SPMZuMshZGy2t3uP3qf91edMqxZ/sVf803fBbqZL+MEOmT1mTx5ZTZBXdoCUKWydfEbF5jclpvdSc9SNa3rX3sGh0yhcHPQUdyO4BJuERxhyqs7FWs8hJBp40bDkaX/QDXHQiCidO6Ayrm7c75aA+OkxU8suxFDBsF4gRzqkejL3E8wz26Ye7IfEwoKYbUw0S9aHzwwmJZWNgM0QhdP7nDbUVIGYkjPmgNc8HHmkMyPu0WbwiwatDv16pR2Mvk2fjhuP5McUeHmrI57UGyVnxq8JbUjD11G0RW4XqWoqybWSYhHTHFORr2OjodJsprUN+dFzKyVmwPE60yr3Ve0H4roM/W98wh4S7EqRn4rJt1NqC8q8ZRTe2D0bb5ancPYCe+lQcvgO2YDNzDh8kucGON9fEgSFZ9mVG0Fa1UG3EvXJ3K7FjbyA="
+    - TOX_TESTENV_PASSENV="FLIT_USERNAME FLIT_PASSWORD"
     - TOXENV=release
     script: tox
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/PKG-INFO new/pep517-0.8.1/PKG-INFO
--- old/pep517-0.7.0/PKG-INFO   1970-01-01 01:00:00.000000000 +0100
+++ new/pep517-0.8.1/PKG-INFO   1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
 Metadata-Version: 1.1
 Name: pep517
-Version: 0.7.0
+Version: 0.8.1
 Summary: Wrappers to build Python packages using PEP 517 hooks
-Home-page: https://github.com/takluyver/pep517
+Home-page: https://github.com/pypa/pep517
 Author: Thomas Kluyver
 Author-email: tho...@kluyver.me.uk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/README.rst new/pep517-0.8.1/README.rst
--- old/pep517-0.7.0/README.rst 2019-09-27 13:13:51.062879800 +0200
+++ new/pep517-0.8.1/README.rst 2019-11-23 13:49:22.413706500 +0100
@@ -11,7 +11,7 @@
 - Higher-level functions which install the build dependencies into a
   temporary environment and build a wheel/sdist using them.
 
-Run the tests with ``py.test``.
+Run the tests with ``pytest`` or `tox <https://pypi.org/project/tox>`_.
 
 High level usage, with build requirements handled:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/dev-requirements.txt 
new/pep517-0.8.1/dev-requirements.txt
--- old/pep517-0.7.0/dev-requirements.txt       2019-09-27 13:13:51.062879800 
+0200
+++ new/pep517-0.8.1/dev-requirements.txt       2019-11-23 13:49:22.417708400 
+0100
@@ -4,5 +4,5 @@
 testpath
 toml
 setuptools>=30
-importlib_metadata
-zipp
+importlib_metadata ; python_version<'3.8'
+zipp ; python_version<'3.8'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/install-pip-master.py 
new/pep517-0.8.1/install-pip-master.py
--- old/pep517-0.7.0/install-pip-master.py      2019-02-01 13:23:08.955486000 
+0100
+++ new/pep517-0.8.1/install-pip-master.py      1970-01-01 01:00:00.000000000 
+0100
@@ -1,21 +0,0 @@
-"""
-In order to support installation of pep517 from source,
-pip from master must be installed.
-"""
-
-import subprocess
-import sys
-
-
-def main():
-    cmd = [
-        sys.executable,
-        '-m', 'pip', 'install',
-        'git+https://github.com/pypa/pip',
-    ]
-    subprocess.run(cmd)
-    cmd[-1:] = sys.argv[1:]
-    subprocess.run(cmd)
-
-
-__name__ == '__main__' and main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/pep517/__init__.py 
new/pep517-0.8.1/pep517/__init__.py
--- old/pep517-0.7.0/pep517/__init__.py 2019-09-27 13:14:30.881992300 +0200
+++ new/pep517-0.8.1/pep517/__init__.py 2019-11-23 13:49:22.417708400 +0100
@@ -1,4 +1,4 @@
 """Wrappers to build Python packages using PEP 517 hooks
 """
 
-__version__ = '0.7.0'
+__version__ = '0.8.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/pep517/wrappers.py 
new/pep517-0.8.1/pep517/wrappers.py
--- old/pep517-0.7.0/pep517/wrappers.py 2019-09-27 13:13:51.064879700 +0200
+++ new/pep517-0.8.1/pep517/wrappers.py 2019-11-23 13:49:22.417708400 +0100
@@ -9,7 +9,16 @@
 
 from . import compat
 
-_in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py')
+
+try:
+    import importlib.resources as resources
+
+    def _in_proc_script_path():
+        return resources.path(__package__, '_in_process.py')
+except ImportError:
+    @contextmanager
+    def _in_proc_script_path():
+        yield pjoin(dirname(abspath(__file__)), '_in_process.py')
 
 
 @contextmanager
@@ -126,8 +135,6 @@
         self.backend_path = backend_path
         self._subprocess_runner = runner
 
-    # TODO: Is this over-engineered? Maybe frontends only need to
-    #       set this when creating the wrapper, not on every call.
     @contextmanager
     def subprocess_runner(self, runner):
         """A context manager for temporarily overriding the default subprocess
@@ -135,8 +142,10 @@
         """
         prev = self._subprocess_runner
         self._subprocess_runner = runner
-        yield
-        self._subprocess_runner = prev
+        try:
+            yield
+        finally:
+            self._subprocess_runner = prev
 
     def get_requires_for_build_wheel(self, config_settings=None):
         """Identify packages required for building a wheel
@@ -242,11 +251,12 @@
                               indent=2)
 
             # Run the hook in a subprocess
-            self._subprocess_runner(
-                [sys.executable, _in_proc_script, hook_name, td],
-                cwd=self.source_dir,
-                extra_environ=extra_environ
-            )
+            with _in_proc_script_path() as script:
+                self._subprocess_runner(
+                    [sys.executable, str(script), hook_name, td],
+                    cwd=self.source_dir,
+                    extra_environ=extra_environ
+                )
 
             data = compat.read_json(pjoin(td, 'output.json'))
             if data.get('unsupported'):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/pyproject.toml 
new/pep517-0.8.1/pyproject.toml
--- old/pep517-0.7.0/pyproject.toml     2019-09-27 13:13:51.064879700 +0200
+++ new/pep517-0.8.1/pyproject.toml     2019-11-23 13:49:22.417708400 +0100
@@ -1,17 +1,21 @@
 [build-system]
-requires = ["flit"]
-build-backend = "flit.buildapi"
+requires = ["flit_core >=2,<3"]
+build-backend = "flit_core.buildapi"
 
 [tool.flit.metadata]
 module = "pep517"
 author = "Thomas Kluyver"
 author-email = "tho...@kluyver.me.uk"
-home-page = "https://github.com/takluyver/pep517";
+home-page = "https://github.com/pypa/pep517";
 description-file = "README.rst"
 requires = [
     "toml",
-    "importlib_metadata",
-    "zipp",
+    "importlib_metadata;python_version<'3.8'",
+    "zipp;python_version<'3.8'",
+]
+classifiers = [
+    "License :: OSI Approved :: MIT License",
+    "Programming Language :: Python :: 2.7",
+    "Programming Language :: Python :: 3",
 ]
-classifiers = ["License :: OSI Approved :: MIT License"]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/setup.py new/pep517-0.8.1/setup.py
--- old/pep517-0.7.0/setup.py   1970-01-01 01:00:00.000000000 +0100
+++ new/pep517-0.8.1/setup.py   1970-01-01 01:00:00.000000000 +0100
@@ -10,15 +10,19 @@
 {'': ['*']}
 
 install_requires = \
-['toml', 'importlib_metadata', 'zipp']
+['toml']
+
+extras_require = \
+{":python_version<'3.8'": ['importlib_metadata', 'zipp']}
 
 setup(name='pep517',
-      version='0.7.0',
+      version='0.8.1',
       description='Wrappers to build Python packages using PEP 517 hooks',
       author='Thomas Kluyver',
       author_email='tho...@kluyver.me.uk',
-      url='https://github.com/takluyver/pep517',
+      url='https://github.com/pypa/pep517',
       packages=packages,
       package_data=package_data,
       install_requires=install_requires,
+      extras_require=extras_require,
      )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/tests/test_call_hooks.py 
new/pep517-0.8.1/tests/test_call_hooks.py
--- old/pep517-0.7.0/tests/test_call_hooks.py   2019-09-27 13:13:51.064879700 
+0200
+++ new/pep517-0.8.1/tests/test_call_hooks.py   2019-11-23 13:49:22.421710500 
+0100
@@ -7,18 +7,22 @@
 import toml
 import zipfile
 
-from pep517.wrappers import Pep517HookCaller
+from mock import Mock
+
+from pep517.wrappers import Pep517HookCaller, default_subprocess_runner
 from pep517.wrappers import UnsupportedOperation, BackendUnavailable
 
 SAMPLES_DIR = pjoin(dirname(abspath(__file__)), 'samples')
 BUILDSYS_PKGS = pjoin(SAMPLES_DIR, 'buildsys_pkgs')
 
 
-def get_hooks(pkg):
+def get_hooks(pkg, **kwargs):
     source_dir = pjoin(SAMPLES_DIR, pkg)
     with open(pjoin(source_dir, 'pyproject.toml')) as f:
         data = toml.load(f)
-    return Pep517HookCaller(source_dir, data['build-system']['build-backend'])
+    return Pep517HookCaller(
+        source_dir, data['build-system']['build-backend'], **kwargs
+    )
 
 
 def test_missing_backend_gives_exception():
@@ -103,3 +107,27 @@
         with modified_env({'PYTHONPATH': BUILDSYS_PKGS}):
             with pytest.raises(UnsupportedOperation):
                 hooks.build_sdist(sdistdir, {'test_unsupported': True})
+
+
+def test_runner_replaced_on_exception(monkeypatch):
+    monkeypatch.setenv('PYTHONPATH', BUILDSYS_PKGS)
+
+    runner = Mock(wraps=default_subprocess_runner)
+    hooks = get_hooks('pkg1', runner=runner)
+
+    hooks.get_requires_for_build_wheel()
+    runner.assert_called_once()
+    runner.reset_mock()
+
+    runner2 = Mock(wraps=default_subprocess_runner)
+    try:
+        with hooks.subprocess_runner(runner2):
+            hooks.get_requires_for_build_wheel()
+            runner2.assert_called_once()
+            runner2.reset_mock()
+            raise RuntimeError()
+    except RuntimeError:
+        pass
+
+    hooks.get_requires_for_build_wheel()
+    runner.assert_called_once()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pep517-0.7.0/tox.ini new/pep517-0.8.1/tox.ini
--- old/pep517-0.7.0/tox.ini    2019-02-01 13:23:08.968486500 +0100
+++ new/pep517-0.8.1/tox.ini    2019-11-23 13:49:22.421710500 +0100
@@ -8,15 +8,9 @@
 
 [testenv:release]
 skip_install = True
-# workaround for pep517 build support
-install_command = python install-pip-master.py {opts} {packages}
 deps =
-       # pull from feature branch for feature
-       git+https://github.com/pypa/pep517@feature/build-command
-       # workaround for https://github.com/pypa/twine/issues/423
-       git+https://github.com/pypa/twine
-       path.py
+       flit
+       # pygments is needed for flit to validate the rst description
+       pygments
 commands =
-       python -c "import path; path.Path('dist').rmtree_p()"
-       python -m pep517.build .
-       python -m twine upload dist/*
+       python -m flit publish


Reply via email to