Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pyproject-api for
openSUSE:Factory checked in at 2023-11-09 21:35:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyproject-api (Old)
and /work/SRC/openSUSE:Factory/.python-pyproject-api.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pyproject-api"
Thu Nov 9 21:35:59 2023 rev:3 rq:1124420 version:1.6.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pyproject-api/python-pyproject-api.changes
2023-08-30 10:23:22.354335689 +0200
+++
/work/SRC/openSUSE:Factory/.python-pyproject-api.new.17445/python-pyproject-api.changes
2023-11-09 21:36:14.982772161 +0100
@@ -1,0 +2,10 @@
+Thu Nov 9 08:57:34 UTC 2023 - ecsos <[email protected]>
+
+- Update to 1.6.1:
+ - Fix metadata_from_built only extracts one of the dist info files
+ in #100
+- Update to 1.6.0:
+ - Extrat build_<wheel|editable> from
+ prepare_metadata_for_build_<wheel|editable> in #99
+
+-------------------------------------------------------------------
Old:
----
pyproject_api-1.5.4.tar.gz
New:
----
pyproject_api-1.6.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pyproject-api.spec ++++++
--- /var/tmp/diff_new_pack.x0iirb/_old 2023-11-09 21:36:16.442826068 +0100
+++ /var/tmp/diff_new_pack.x0iirb/_new 2023-11-09 21:36:16.442826068 +0100
@@ -18,21 +18,23 @@
%{?sle15_python_module_pythons}
Name: python-pyproject-api
-Version: 1.5.4
+Version: 1.6.1
Release: 0
Summary: API to interact with the python pyproject.toml based projects
License: MIT
URL: https://github.com/tox-dev/pyproject-api
Source:
https://files.pythonhosted.org/packages/source/p/pyproject_api/pyproject_api-%{version}.tar.gz
+BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module hatch >= 0.3}
BuildRequires: %{python_module hatch-vcs >= 0.3}
-BuildRequires: %{python_module hatchling >= 1.12.2}
+BuildRequires: %{python_module hatchling >= 1.18}
BuildRequires: %{python_module importlib-metadata >= 6 if %python-base < 3.8}
BuildRequires: %{python_module packaging >= 23.1}
BuildRequires: %{python_module pip}
+BuildRequires: %{python_module setuptools >= 68.1.2}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module tomli >= 2.0.1 if %python-base < 3.11}
-BuildRequires: %{python_module wheel >= 0.40.0}
+BuildRequires: %{python_module wheel >= 0.41.2}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: unzip
@@ -45,6 +47,7 @@
# (except for pytest-cov and -randomly)
BuildRequires: %{python_module covdefaults >= 2.3}
BuildRequires: %{python_module pytest >= 7.4}
+BuildRequires: %{python_module pytest-cov >= 4.1}
BuildRequires: %{python_module pytest-mock >= 3.11.1}
BuildRequires: %{python_module virtualenv >= 20.17.1}
# /SECTION
++++++ pyproject_api-1.5.4.tar.gz -> pyproject_api-1.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/.pre-commit-config.yaml
new/pyproject_api-1.6.1/.pre-commit-config.yaml
--- old/pyproject_api-1.5.4/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/.pre-commit-config.yaml 2020-02-02
01:00:00.000000000 +0100
@@ -5,7 +5,7 @@
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: "v0.0.284"
+ rev: "v0.0.286"
hooks:
- id: ruff
exclude: src/pyproject_api/_backend.py
@@ -20,17 +20,17 @@
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
- rev: "0.13.1"
+ rev: "1.1.0"
hooks:
- id: pyproject-fmt
- additional_dependencies: ["tox>=4.6.4"]
+ additional_dependencies: ["tox>=4.10"]
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: "v3.0.1"
+ rev: "v3.0.2"
hooks:
- id: prettier
args: ["--print-width=120", "--prose-wrap=always"]
- repo: https://github.com/asottile/blacken-docs
- rev: 1.15.0
+ rev: 1.16.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.7]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/PKG-INFO
new/pyproject_api-1.6.1/PKG-INFO
--- old/pyproject_api-1.5.4/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/PKG-INFO 2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pyproject-api
-Version: 1.5.4
+Version: 1.6.1
Summary: API to interact with the python pyproject.toml based projects
Project-URL: Homepage, http://pyproject_api.readthedocs.org
Project-URL: Source, https://github.com/tox-dev/pyproject-api
@@ -30,7 +30,7 @@
Requires-Dist: packaging>=23.1
Requires-Dist: tomli>=2.0.1; python_version < '3.11'
Provides-Extra: docs
-Requires-Dist: furo>=2023.7.26; extra == 'docs'
+Requires-Dist: furo>=2023.8.19; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints>=1.24; extra == 'docs'
Requires-Dist: sphinx<7.2; extra == 'docs'
Provides-Extra: testing
@@ -38,8 +38,8 @@
Requires-Dist: pytest-cov>=4.1; extra == 'testing'
Requires-Dist: pytest-mock>=3.11.1; extra == 'testing'
Requires-Dist: pytest>=7.4; extra == 'testing'
-Requires-Dist: setuptools>=68; extra == 'testing'
-Requires-Dist: wheel>=0.41.1; extra == 'testing'
+Requires-Dist: setuptools>=68.1.2; extra == 'testing'
+Requires-Dist: wheel>=0.41.2; extra == 'testing'
Description-Content-Type: text/markdown
# [`pyproject-api`](https://pyproject-api.readthedocs.io/en/latest/)
@@ -47,7 +47,7 @@
[](https://pypi.org/project/pyproject-api/)
[](https://pypi.org/project/pyproject-api/)
-[](https://pepy.tech/project/pyproject-api/month)
+[](https://pepy.tech/project/pyproject-api)
[](https://github.com/tox-dev/pyproject-api/actions/workflows/check.yml)
[](https://github.com/psf/black)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/README.md
new/pyproject_api-1.6.1/README.md
--- old/pyproject_api-1.5.4/README.md 2020-02-02 01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/README.md 2020-02-02 01:00:00.000000000 +0100
@@ -3,7 +3,7 @@
[](https://pypi.org/project/pyproject-api/)
[](https://pypi.org/project/pyproject-api/)
-[](https://pepy.tech/project/pyproject-api/month)
+[](https://pepy.tech/project/pyproject-api)
[](https://github.com/tox-dev/pyproject-api/actions/workflows/check.yml)
[](https://github.com/psf/black)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/docs/changelog.rst
new/pyproject_api-1.6.1/docs/changelog.rst
--- old/pyproject_api-1.5.4/docs/changelog.rst 2020-02-02 01:00:00.000000000
+0100
+++ new/pyproject_api-1.6.1/docs/changelog.rst 2020-02-02 01:00:00.000000000
+0100
@@ -1,6 +1,33 @@
Release History
===============
+v1.6.1 - (2023-08-29)
+---------------------
+- Fix :meth:`pyproject_api.Frontend.metadata_from_built` only extracts one of
the dist info files.
+
+v1.6.0 - (2023-08-29)
+---------------------
+- Remove ``build_<wheel|editable>`` from
``prepare_metadata_for_build_<wheel|editable>`` to allow separate config
+ parametrization and instead add
:meth:`pyproject_api.Frontend.metadata_from_built` the user can call when the
prepare
+ fails. Pass ``None`` for ``metadata_directory`` for such temporary wheel
builds.
+
+v1.5.4 - (2023-08-17)
+---------------------
+- Make sure that the order of Requires-Dist does not matter
+
+v1.5.3 - (2023-07-06)
+---------------------
+- Fix ``read_line`` to raise ``EOFError`` if nothing was read
+
+v1.5.2 - (2023-06-14)
+---------------------
+- Use ruff for linting.
+- Drop 2.7 test run.
+
+v1.5.1 - (2023-03-12)
+---------------------
+- docs: set html_last_updated_fmt to format string
+
v1.5.0 - (2023-01-17)
---------------------
- When getting metadata from a built wheel, do not pass ``metadata_directory``
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/pyproject.toml
new/pyproject_api-1.6.1/pyproject.toml
--- old/pyproject_api-1.5.4/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
+++ new/pyproject_api-1.6.1/pyproject.toml 2020-02-02 01:00:00.000000000
+0100
@@ -46,7 +46,7 @@
'tomli>=2.0.1; python_version < "3.11"',
]
optional-dependencies.docs = [
- "furo>=2023.7.26",
+ "furo>=2023.8.19",
"sphinx<7.2",
"sphinx-autodoc-typehints>=1.24",
]
@@ -55,8 +55,8 @@
"pytest>=7.4",
"pytest-cov>=4.1",
"pytest-mock>=3.11.1",
- "setuptools>=68",
- "wheel>=0.41.1",
+ "setuptools>=68.1.2",
+ "wheel>=0.41.2",
]
urls.Homepage = "http://pyproject_api.readthedocs.org"
urls.Source = "https://github.com/tox-dev/pyproject-api"
@@ -104,7 +104,6 @@
"*/src",
"*\\src",
]
-report.fail_under = 98
report.omit = []
run.parallel = true
run.plugins = ["covdefaults"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/src/pyproject_api/_backend.py
new/pyproject_api-1.6.1/src/pyproject_api/_backend.py
--- old/pyproject_api-1.5.4/src/pyproject_api/_backend.py 2020-02-02
01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/src/pyproject_api/_backend.py 2020-02-02
01:00:00.000000000 +0100
@@ -120,7 +120,7 @@
if not char:
if not content:
raise EOFError("EOF without reading anything") # we didn't
get a line at all, let the caller know
- break
+ break # pragma: no cover
if char == b"\n":
break
if char != b"\r":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/src/pyproject_api/_frontend.py
new/pyproject_api-1.6.1/src/pyproject_api/_frontend.py
--- old/pyproject_api-1.5.4/src/pyproject_api/_frontend.py 2020-02-02
01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/src/pyproject_api/_frontend.py 2020-02-02
01:00:00.000000000 +0100
@@ -8,7 +8,7 @@
from pathlib import Path
from tempfile import NamedTemporaryFile, TemporaryDirectory
from time import sleep
-from typing import Any, Dict, Iterator, List, NamedTuple, NoReturn, Optional,
TypedDict, cast
+from typing import Any, Dict, Iterator, List, Literal, NamedTuple, NoReturn,
Optional, TypedDict, cast
from zipfile import ZipFile
from packaging.requirements import Requirement
@@ -314,7 +314,7 @@
self,
metadata_directory: Path,
config_settings: ConfigSettings | None = None,
- ) -> MetadataForBuildWheelResult:
+ ) -> MetadataForBuildWheelResult | None:
"""
Build wheel metadata (per PEP-517).
@@ -331,12 +331,10 @@
config_settings=config_settings,
)
if basename is None:
- # if backend does not provide it acquire it from the wheel
- basename, err, out =
self._metadata_from_built_wheel(config_settings, metadata_directory,
"build_wheel")
+ return None
if not isinstance(basename, str):
self._unexpected_response("prepare_metadata_for_build_wheel",
basename, str, out, err)
- result = metadata_directory / basename
- return MetadataForBuildWheelResult(result, out, err)
+ return MetadataForBuildWheelResult(metadata_directory / basename, out,
err)
def _check_metadata_dir(self, metadata_directory: Path) -> None:
if metadata_directory == self._root:
@@ -350,7 +348,7 @@
self,
metadata_directory: Path,
config_settings: ConfigSettings | None = None,
- ) -> MetadataForBuildEditableResult:
+ ) -> MetadataForBuildEditableResult | None:
"""
Build editable wheel metadata (per PEP-660).
@@ -359,7 +357,7 @@
:return: metadata generation result
"""
self._check_metadata_dir(metadata_directory)
- basename = None
+ basename: str | None = None
if self.optional_hooks["prepare_metadata_for_build_editable"]:
basename, out, err = self._send(
cmd="prepare_metadata_for_build_editable",
@@ -367,8 +365,7 @@
config_settings=config_settings,
)
if basename is None:
- # if backend does not provide it acquire it from the wheel
- basename, err, out =
self._metadata_from_built_wheel(config_settings, metadata_directory,
"build_editable")
+ return None
if not isinstance(basename, str):
self._unexpected_response("prepare_metadata_for_build_wheel",
basename, str, out, err)
result = metadata_directory / basename
@@ -453,35 +450,40 @@
msg = f"{cmd!r} on {self.backend!r} returned {got!r} but expected type
{expected_type!r}"
raise BackendFailed({"code": None, "exc_type": TypeError.__name__,
"exc_msg": msg}, out, err)
- def _metadata_from_built_wheel(
+ def metadata_from_built(
self,
- config_settings: ConfigSettings | None,
- metadata_directory: Path | None,
- cmd: str,
- ) -> tuple[str, str, str]:
+ metadata_directory: Path,
+ target: Literal["wheel", "editable"],
+ config_settings: ConfigSettings | None = None,
+ ) -> tuple[Path, str, str]:
+ """
+ Create metadata from building the wheel (use when the prepare
endpoints are not present or don't work).
+
+ :param metadata_directory: directory where to put the metadata
+ :param target: the type of wheel metadata to build
+ :param config_settings: config settings to pass in to the build
endpoint
+ :return:
+ """
+ hook = getattr(self, f"build_{target}")
with self._wheel_directory() as wheel_directory:
- wheel_result = getattr(self, cmd)(
- wheel_directory=wheel_directory,
- config_settings=config_settings,
- metadata_directory=None, # let the backend populate the
metadata
- )
- wheel = wheel_result.wheel
+ result: EditableResult | WheelResult = hook(wheel_directory,
config_settings)
+ wheel = result.wheel
if not wheel.exists():
msg = f"missing wheel file return by backed {wheel!r}"
raise RuntimeError(msg)
- out, err = wheel_result.out, wheel_result.err
+ out, err = result.out, result.err
extract_to = str(metadata_directory)
basename = None
with ZipFile(str(wheel), "r") as zip_file:
for name in zip_file.namelist(): # pragma: no branch
- path = Path(name)
- if path.parts[0].endswith(".dist-info"):
- basename = path.parts[0]
+ root = Path(name).parts[0]
+ if root.endswith(".dist-info"):
+ basename = root
zip_file.extract(name, extract_to)
- if basename is None: # pragma: no branch
- msg = f"no .dist-info found inside generated wheel {wheel}"
- raise RuntimeError(msg)
- return basename, err, out
+ if basename is None: # pragma: no branch
+ msg = f"no .dist-info found inside generated wheel {wheel}"
+ raise RuntimeError(msg)
+ return metadata_directory / basename, out, err
@contextmanager
def _wheel_directory(self) -> Iterator[Path]:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/src/pyproject_api/_version.py
new/pyproject_api-1.6.1/src/pyproject_api/_version.py
--- old/pyproject_api-1.5.4/src/pyproject_api/_version.py 2020-02-02
01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/src/pyproject_api/_version.py 2020-02-02
01:00:00.000000000 +0100
@@ -1,4 +1,4 @@
# file generated by setuptools_scm
# don't change, don't track in version control
-__version__ = version = '1.5.4'
-__version_tuple__ = version_tuple = (1, 5, 4)
+__version__ = version = '1.6.1'
+__version_tuple__ = version_tuple = (1, 6, 1)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/tests/demo_pkg_inline/build.py
new/pyproject_api-1.6.1/tests/demo_pkg_inline/build.py
--- old/pyproject_api-1.5.4/tests/demo_pkg_inline/build.py 2020-02-02
01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/tests/demo_pkg_inline/build.py 2020-02-02
01:00:00.000000000 +0100
@@ -62,7 +62,7 @@
base_name = f"{name}-{version}-py{sys.version_info[0]}-none-any.whl"
path = Path(wheel_directory) / base_name
with ZipFile(str(path), "w") as zip_file_handler:
- for arc_name, data in content.items(): # pragma: no branch
+ for arc_name, data in content.items():
zip_file_handler.writestr(arc_name, dedent(data).strip())
if metadata_directory is not None:
for sub_directory, _, filenames in os.walk(metadata_directory):
@@ -72,7 +72,7 @@
str(Path(sub_directory) / filename),
)
else:
- for arc_name, data in metadata.items(): # pragma: no branch
+ for arc_name, data in metadata.items():
zip_file_handler.writestr(arc_name, dedent(data).strip())
print(f"created wheel {path}") # noqa: T201
return base_name
@@ -109,9 +109,8 @@
) -> str:
dest = Path(metadata_directory) / dist_info
dest.mkdir(parents=True)
- for arc_name, data in content.items():
- if arc_name.startswith(dist_info):
- (dest.parent / arc_name).write_text(dedent(data).strip())
+ for arc_name, data in metadata.items():
+ (dest.parent / arc_name).write_text(dedent(data).strip())
print(f"created metadata {dest}") # noqa: T201
if "PREPARE_EDITABLE_BAD" in os.environ:
return 1 # type: ignore[return-value] # checking bad type on
purpose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/tests/test_frontend.py
new/pyproject_api-1.6.1/tests/test_frontend.py
--- old/pyproject_api-1.5.4/tests/test_frontend.py 2020-02-02
01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/tests/test_frontend.py 2020-02-02
01:00:00.000000000 +0100
@@ -2,7 +2,7 @@
from pathlib import Path
from textwrap import dedent
-from typing import Callable
+from typing import Callable, Literal
import pytest
from packaging.requirements import Requirement
@@ -68,7 +68,7 @@
def test_backend_no_prepare_wheel(tmp_path: Path, demo_pkg_inline: Path) ->
None:
frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(demo_pkg_inline)[:-1])
result = frontend.prepare_metadata_for_build_wheel(tmp_path)
- assert result.metadata.name == "demo_pkg_inline-1.0.0.dist-info"
+ assert result is None
def test_backend_build_sdist_demo_pkg_inline(tmp_path: Path, demo_pkg_inline:
Path) -> None:
@@ -178,10 +178,26 @@
frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(tmp_path)[:-1])
with pytest.raises(RuntimeError, match="missing wheel file return by
backed *"):
- frontend.prepare_metadata_for_build_wheel(tmp_path / "meta")
+ frontend.metadata_from_built(tmp_path, "wheel")
+
+
[email protected]("target", ["wheel", "editable"])
+def test_metadata_from_built_wheel(
+ demo_pkg_inline: Path,
+ tmp_path: Path,
+ target: Literal["wheel", "editable"],
+ monkeypatch: pytest.MonkeyPatch,
+) -> None:
+ frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(demo_pkg_inline)[:-1])
+ monkeypatch.chdir(tmp_path)
+ path, out, err = frontend.metadata_from_built(tmp_path, target)
+ assert path == tmp_path / "demo_pkg_inline-1.0.0.dist-info"
+ assert {p.name for p in path.iterdir()} == {"top_level.txt", "WHEEL",
"RECORD", "METADATA"}
+ assert f" build_{target}" in out
+ assert not err
-def test_bad_wheel_prepare_metadata_for_build_wheel(local_builder:
Callable[[str], Path]) -> None:
+def test_bad_wheel_metadata_from_built_wheel(local_builder: Callable[[str],
Path]) -> None:
txt = """
import sys
from pathlib import Path
@@ -198,7 +214,7 @@
frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(tmp_path)[:-1])
with pytest.raises(RuntimeError, match="no .dist-info found inside
generated wheel*"):
- frontend.prepare_metadata_for_build_wheel(tmp_path / "meta")
+ frontend.metadata_from_built(tmp_path, "wheel")
def test_create_no_pyproject(tmp_path: Path) -> None:
@@ -253,6 +269,7 @@
monkeypatch.delenv("PREPARE_EDITABLE_BAD", raising=False)
frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(demo_pkg_inline)[:-1])
result = frontend.prepare_metadata_for_build_editable(tmp_path)
+ assert result is not None
assert result.metadata.name == "demo_pkg_inline-1.0.0.dist-info"
assert " prepare_metadata_for_build_editable " in result.out
assert " build_editable " not in result.out
@@ -264,10 +281,7 @@
monkeypatch.delenv("BUILD_EDITABLE_BAD", raising=False)
frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(demo_pkg_inline)[:-1])
result = frontend.prepare_metadata_for_build_editable(tmp_path)
- assert result.metadata.name == "demo_pkg_inline-1.0.0.dist-info"
- assert " prepare_metadata_for_build_editable " not in result.out
- assert " build_editable " in result.out
- assert not result.err
+ assert result is None
def test_backend_prepare_editable_bad(tmp_path: Path, demo_pkg_inline: Path,
monkeypatch: pytest.MonkeyPatch) -> None:
@@ -287,13 +301,28 @@
def test_backend_build_editable(tmp_path: Path, demo_pkg_inline: Path,
monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.delenv("BUILD_EDITABLE_BAD", raising=False)
+ monkeypatch.setenv("HAS_PREPARE_EDITABLE", "1")
frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(demo_pkg_inline)[:-1])
- result = frontend.build_editable(tmp_path)
+ meta = tmp_path / "meta"
+ res = frontend.prepare_metadata_for_build_editable(meta)
+ assert res is not None
+ metadata = res.metadata
+ assert metadata is not None
+ assert metadata.name == "demo_pkg_inline-1.0.0.dist-info"
+ result = frontend.build_editable(tmp_path, metadata_directory=meta)
assert result.wheel.name == "demo_pkg_inline-1.0.0-py3-none-any.whl"
assert " build_editable " in result.out
assert not result.err
+def test_backend_build_wheel(tmp_path: Path, demo_pkg_inline: Path) -> None:
+ frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(demo_pkg_inline)[:-1])
+ result = frontend.build_wheel(tmp_path)
+ assert result.wheel.name == "demo_pkg_inline-1.0.0-py3-none-any.whl"
+ assert " build_wheel " in result.out
+ assert not result.err
+
+
def test_backend_build_editable_bad(tmp_path: Path, demo_pkg_inline: Path,
monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("BUILD_EDITABLE_BAD", "1")
frontend =
SubprocessFrontend(*SubprocessFrontend.create_args_from_folder(demo_pkg_inline)[:-1])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pyproject_api-1.5.4/tests/test_frontend_setuptools.py
new/pyproject_api-1.6.1/tests/test_frontend_setuptools.py
--- old/pyproject_api-1.5.4/tests/test_frontend_setuptools.py 2020-02-02
01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/tests/test_frontend_setuptools.py 2020-02-02
01:00:00.000000000 +0100
@@ -69,6 +69,7 @@
def test_setuptools_prepare_metadata_for_build_wheel(frontend_setuptools:
SubprocessFrontend, tmp_path: Path) -> None:
meta = tmp_path / "meta"
result =
frontend_setuptools.prepare_metadata_for_build_wheel(metadata_directory=meta)
+ assert result is not None
dist = Distribution.at(str(result.metadata))
assert list(dist.entry_points) == [EntryPoint(name="demo_exe",
value="demo:a", group="console_scripts")]
assert dist.version == "1.0"
@@ -82,6 +83,7 @@
# call it again regenerates it because frontend always deletes earlier
content
before = result.metadata.stat().st_mtime
result =
frontend_setuptools.prepare_metadata_for_build_wheel(metadata_directory=meta)
+ assert result is not None
after = result.metadata.stat().st_mtime
assert after > before
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pyproject_api-1.5.4/tox.ini
new/pyproject_api-1.6.1/tox.ini
--- old/pyproject_api-1.5.4/tox.ini 2020-02-02 01:00:00.000000000 +0100
+++ new/pyproject_api-1.6.1/tox.ini 2020-02-02 01:00:00.000000000 +0100
@@ -47,7 +47,7 @@
[testenv:type]
description = run type check on code base
deps =
- mypy==1.4.1
+ mypy==1.5.1
set_env =
{tty:MYPY_FORCE_COLOR = 1}
commands =