christoph2 / asamint

Integration package for various ASAM related open source projects
GNU General Public License v2.0
10 stars 5 forks source link

unable to run setup.py #1

Closed SpieringsAE closed 2 years ago

SpieringsAE commented 2 years ago

I'm trying to install the package:

/usr/local/lib/python3.7/dist-packages/setuptools/config/pyprojecttoml.py:102: _ExperimentalProjectMetadata: Support for project metadata in `pyproject.toml` is still experimental and may be removed (or change) in future releases.
  warnings.warn(msg, _ExperimentalProjectMetadata)
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:
    "GPLv2"

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 "setup.py", line 67, in <module>
    zip_safe=False,
  File "/usr/local/lib/python3.7/dist-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/usr/local/lib/python3.7/dist-packages/setuptools/_distutils/core.py", line 122, in setup
    dist.parse_config_files()
  File "/usr/local/lib/python3.7/dist-packages/setuptools/dist.py", line 854, in parse_config_files
    pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
  File "/usr/local/lib/python3.7/dist-packages/setuptools/config/pyprojecttoml.py", line 54, in apply_configuration
    config = read_configuration(filepath, True, ignore_option_errors, dist)
  File "/usr/local/lib/python3.7/dist-packages/setuptools/config/pyprojecttoml.py", line 120, in read_configuration
    validate(subset, filepath)
  File "/usr/local/lib/python3.7/dist-packages/setuptools/config/pyprojecttoml.py", line 43, in validate
    raise error from None
ValueError: invalid pyproject.toml config: `project.license`

something about the license definition it seems like the license definition is recognised as a file and as a string while its only allowed to be recognised as one of these?

deleting pyproject.toml seemed to fix the issue. I take that back it seemed to do more but didnt actually install the package:

Using /usr/local/lib/python3.7/dist-packages Finished processing dependencies for asamint==0.1.1 these are the last lines of the process, seems like success?

also, the version in this file is correct, but not in setup.py and setup.cfg