[Bug 266944] devel/py-black cannot configure, project.license is in invalid format OFFENDING RULE: 'oneOf'

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 10 Oct 2022 16:10:46 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266944

            Bug ID: 266944
           Summary: devel/py-black cannot configure, project.license is in
                    invalid format OFFENDING RULE: 'oneOf'
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: alt2600@icloud.com
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)
          Assignee: sunpoet@FreeBSD.org

trying to update this, and it is throwing this error about the license being
not in the right format. I tried reinstalling my py-setuptools, py-toml, and
py-tomli packages just to make sure they somehow were out of date. amd64 13.1p2

===>  Cleaning for py39-black-22.10.0
===>  License MIT accepted by the user
===>   py39-black-22.10.0 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by py39-black-22.10.0 for building
===>  Extracting for py39-black-22.10.0
=> SHA256 Checksum OK for black-22.10.0.tar.gz.
===>  Patching for py39-black-22.10.0
===>   py39-black-22.10.0 depends on package: py39-setuptools_scm>=6.3.1 -
found
===>   py39-black-22.10.0 depends on package: py39-setuptools>=63.1.0 - found
===>   py39-black-22.10.0 depends on file: /usr/local/bin/python3.9 - found
===>  Configuring for py39-black-22.10.0
configuration error: `project.license` must be valid exactly by one definition
(2 matches found):

    - keys:
        'file': {type: string}
      required: ['file']
    - keys:
        'text': {type: string}
      required: ['text']

DESCRIPTION:
    `Project license <https://www.python.org/dev/peps/pep-0621/#license>`_.

GIVEN VALUE:
    "MIT"

OFFENDING RULE: 'oneOf'

DEFINITION:
    {
        "oneOf": [
            {
                "properties": {
                    "file": {
                        "type": "string",
                        "$$description": [
                            "Relative path to the file (UTF-8) which contains
the license for the",
                            "project."
                        ]
                    }
                },
                "required": [
                    "file"
                ]
            },
            {
                "properties": {
                    "text": {
                        "type": "string",
                        "$$description": [
                            "The license of the project whose meaning is that
of the",
                            "`License field from the core metadata",
                           
"<https://packaging.python.org/specifications/core-metadata/#license>`_."
                        ]
                    }
                },
                "required": [
                    "text"
                ]
            }
        ]
    }
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 4, in <module>
    setup(
  File "/usr/local/lib/python3.9/site-packages/setuptools/__init__.py", line
87, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.9/site-packages/setuptools/_distutils/core.py",
line 151, in setup
    dist.parse_config_files()
  File "/usr/local/lib/python3.9/site-packages/setuptools/dist.py", line 868,
in parse_config_files
    pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
  File
"/usr/local/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py",
line 58, in apply_configuration
    config = read_configuration(filepath, True, ignore_option_errors, dist)
  File
"/usr/local/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py",
line 122, in read_configuration
    validate(subset, filepath)
  File
"/usr/local/lib/python3.9/site-packages/setuptools/config/pyprojecttoml.py",
line 47, in validate
    raise error from None
ValueError: invalid pyproject.toml config: `project.license`
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/py-black

-- 
You are receiving this mail because:
You are the assignee for the bug.