Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build error after latest pyproject.toml update. Replace license_file parameter with license_files (license_file parameter is deprecated) #811

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

Vilez0
Copy link
Contributor

@Vilez0 Vilez0 commented Oct 21, 2023

The build error:

validate_pyproject.api.load_builtin_plugin defines `tool.distutils` schema
validate_pyproject.api.load_builtin_plugin defines `tool.setuptools` schema
Traceback (most recent call last):
  File "/home/vilez/Harddisk/mtkclient/setup.py", line 4, in <module>
    setup(
  File "/usr/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 159, in setup
    dist.parse_config_files()
  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 898, in parse_config_files
    pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
  File "/usr/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 72, in apply_configuration
    config = read_configuration(filepath, True, ignore_option_errors, dist)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 134, in read_configuration
    validate(subset, filepath)
  File "/usr/lib/python3.11/site-packages/setuptools/config/pyprojecttoml.py", line 61, in validate
    raise ValueError(f"{error}\n{summary}") from None
ValueError: invalid pyproject.toml config: `project`.
configuration error: `project` must contain ['name'] properties```

replace the deprecated parameter: ```/usr/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!

        ********************************************************************************
        The license_file parameter is deprecated, use license_files instead.

        By 2023-Oct-30, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.

        See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
        ********************************************************************************

!!

Deprecated parameter:

/usr/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
!!

        ********************************************************************************
        The license_file parameter is deprecated, use license_files instead.

        By 2023-Oct-30, you need to update your project and remove deprecated calls
        or your builds will no longer be supported.

        See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
        ********************************************************************************

!!

@Vilez0 Vilez0 changed the title Fix build after latest pyproject.toml update. Replace license_file with license_files (license_file is deprecated) Fix build after latest pyproject.toml update. Replace license_file parameter with license_files (license_file parameter is deprecated) Oct 21, 2023
@Vilez0 Vilez0 changed the title Fix build after latest pyproject.toml update. Replace license_file parameter with license_files (license_file parameter is deprecated) Fix build error after latest pyproject.toml update. Replace license_file parameter with license_files (license_file parameter is deprecated) Oct 22, 2023
@olijf
Copy link

olijf commented Oct 23, 2023

Im having the same problem, adding name + version to the toml fixed it for me.

@bkerler bkerler merged commit b63c933 into bkerler:main Oct 24, 2023
@bkerler
Copy link
Owner

bkerler commented Oct 24, 2023

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants