Skip to content

Modernize nimi-python setup.py projects with pyproject.toml #2095

@ni-jfitzger

Description

@ni-jfitzger

We've started receiving messages like this during codegen:

/tmp/build-env-w9fmceq7/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!

        ********************************************************************************
        Please consider removing the following classifiers in favor of a SPDX license expression:

        License :: OSI Approved :: MIT License

        See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        ********************************************************************************

!!
  self._finalize_license_expression()

This is telling us to stop specifying "License :: OSI Approved :: MIT License" in the setup.py classifiers in favor of this SPDX format ... in a pyproject.toml, which we don't have.


The pyproject.toml format wants us to specify something like

[project]
license = "MIT"
license-files = ["LICENSE", "NILICENSE"]

Maybe we would need to AND with another license in the "license" field for the "NI General Purpose EULA" that's covered in the NILICENSE file. This may be a bigger discussion that we need to have internally.


Before we can do that, though, we'll first need to add a pyproject.toml.
See https://packaging.python.org/en/latest/guides/modernize-setup-py-project/#modernize-setup-py-project

Although pyproject.toml is not required yet, it's strongly recommended.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions