Pure-Peace / peace-performance-python

rosu-pp (Rust) binding for python. To calculate star ratings and performance points for all osu! gamemodes, and quickly parse Beatmap into python objects.
https://pypi.org/project/peace-performance-python
MIT License
9 stars 2 forks source link

configuration error: `project.license` must be valid exactly by one definition (2 matches found): #2

Closed Lxmune closed 2 years ago

Lxmune commented 2 years ago

Hi ! By installing the package to install bancho.py, I've encountered a problem with the pkg.

Collecting peace-performance-python==1.1.2
  Downloading peace-performance-python-1.1.2.tar.gz (25 kB)
  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
  ╰─> [80 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://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 "/usr/local/lib/python3.9/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
          main()
        File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
          return self._get_build_requires(
        File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py", line 159, in _get_build_requires
          self.run_setup()
        File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py", line 281, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py", line 174, in run_setup
          exec(code, locals())
        File "<string>", line 20, in <module>
        File "/usr/local/lib/python3.9/dist-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/usr/local/lib/python3.9/dist-packages/setuptools/_distutils/core.py", line 151, in setup
          dist.parse_config_files()
        File "/usr/local/lib/python3.9/dist-packages/setuptools/dist.py", line 868, in parse_config_files
          pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
        File "/usr/local/lib/python3.9/dist-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/dist-packages/setuptools/config/pyprojecttoml.py", line 122, in read_configuration
          validate(subset, filepath)
        File "/usr/local/lib/python3.9/dist-packages/setuptools/config/pyprojecttoml.py", line 47, in validate
          raise error from None
      ValueError: invalid pyproject.toml config: `project.license`
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Got this error on a clean install (Ubuntu 22) & by following the steps of bancho.py installation. I didn't have this problem on x86 but since I moved to an aarch64 (ARM), it happened.

Pure-Peace commented 2 years ago

Fixed at 9bf840dbc3243e6b2bd145fc922511280bd005f0

thanks!