diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ce5da10f..90d584ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,8 +14,8 @@ repos: - id: end-of-file-fixer - id: mixed-line-ending args: ["--fix=lf"] - - id: requirements-txt-fixer - id: trailing-whitespace + exclude: "tests/cli/test_convert.py" - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.9 diff --git a/pyproject.toml b/pyproject.toml index 461de8bd..d9a59d43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "flit_core.buildapi" name = "wheel" description = "A built-package format for Python" readme = "README.rst" +license = {file = "LICENSE.txt"} classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/tests/cli/test_convert.py b/tests/cli/test_convert.py index 69784fb3..e8da2adb 100644 --- a/tests/cli/test_convert.py +++ b/tests/cli/test_convert.py @@ -13,48 +13,56 @@ from wheel.cli.convert import convert, egg_filename_re from wheel.wheelfile import WHEEL_INFO_RE, WheelFile -PKG_INFO = dedent( - """\ - Metadata-Version: 2.1 - Name: Sampledist - Version: 1.0.0 - Author: Alex Grönholm - Author-email: alex.gronholm@example.com - Home-page: https://example.com - Download-URL: https://example.com/sampledist - Description: Sample Distribution - =================== - Test description - """ -).encode("utf-8") -REQUIRES_TXT = dedent( - """\ - somepackage>=1.5 - otherpackage>=1.7 - - [:python_version < '3'] - six - """ -).encode("utf-8") -EXPECTED_METADATA = dedent( - """\ - Metadata-Version: 2.4 - Name: Sampledist - Version: 1.0.0 - Author: Alex Grönholm - Author-email: alex.gronholm@example.com - Project-URL: Homepage, https://example.com - Project-URL: Download, https://example.com/sampledist - Requires-Dist: somepackage>=1.5 - Requires-Dist: otherpackage>=1.7 - Requires-Dist: six; python_version < "3" - - Sample Distribution +PKG_INFO = """\ +Metadata-Version: 2.1 +Name: Sampledist +Version: 1.0.0 +Author: Alex Grönholm +Author-email: alex.gronholm@example.com +Home-page: https://example.com +Download-URL: https://example.com/sampledist +License: Sample license text + second row + third row + + fourth row +Description: Sample Distribution =================== - Test description - - """ -).encode("utf-8") + + Test description +""".encode() # noqa: W293 + +REQUIRES_TXT = b"""\ +somepackage>=1.5 +otherpackage>=1.7 + +[:python_version < '3'] +six +""" + +EXPECTED_METADATA = """\ +Metadata-Version: 2.4 +Name: Sampledist +Version: 1.0.0 +Author: Alex Grönholm +Author-email: alex.gronholm@example.com +Project-URL: Homepage, https://example.com +Project-URL: Download, https://example.com/sampledist +License: Sample license text + second row + third row + + fourth row +Requires-Dist: somepackage>=1.5 +Requires-Dist: otherpackage>=1.7 +Requires-Dist: six; python_version < "3" + +Sample Distribution +=================== + +Test description + +""".encode() # noqa: W293 @pytest.fixture(