← All tasks
pythonpython-cffi/cffi #200Not a task: not reproduced

`license` in pyproject.toml is not following the PEP 621

envgap__python-cffi__cffi-200

01 / FAILURE SIGNATURE

As reported upstream

configuration error: `project.license` must be valid exactly by one definition (2 matches found):
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
39436854447effd46aff0f13966c8346e517a009
Manifest
pyproject.toml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

python-cffi/cffi #200 · read the original issue
Hi!

I'm getting the following error while trying to install the `poetry==1.8.2` using pip 25.0.1, it looks that the `license` in pyproject.toml is not compatible with the [PEP 621](https://peps.python.org/pep-0621/#license):

```
Collecting cffi>=1.14 (from cryptography>=2.0->SecretStorage>=3.2->keyring<25.0.0,>=24.0.0->poetry==1.8.2)
  Downloading #REDACTED#/pypi/simple/cffi/2.0.0/cffi-2.0.0.tar.gz
     - 523.6 kB 231.7 MB/s 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [87 lines of output]
      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://peps.python.org/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"
                      ]
                  }
              ]
          }
```

I proposed https://github.com/python-cffi/cffi/pull/199 for making it compatible but am not quite sure whether it's the best way to resolve it
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]