Skip to content

Replace setup.py and setup.cfg with pyproject.toml #1678

@stegayet

Description

@stegayet

While setup.cfg can be completely replaced in favor of pyproject.toml, some parts of setup.py are definitely tricky and require attention. Good news is that we can keep both setup.py and pyproject.toml and progressively transition from the former to the latter.

  • setup.cfg:
    • [rstcheck] section can be moved over to pyproject.toml according to the documentation.
    • [metadata] section can be removed as README.md is already used in long_description argument in setup.py.
    • [sdist]: formats=gztar entry can be removed as this is already the default value. I'm not sure why owner=root and group=root are needed, it has been added in f7a4002, it can probably be removed
  • setup.py:
    • The following setup arguments can be moved over to pyproject.toml
      • name
      • version
      • author
      • author_email
      • url
      • download_url
      • license
      • description
      • long_description
      • long_description_content_type is automatically detected so not needed anymore
      • keywords
      • classifiers
      • python_requires
      • install_requires
      • extras_require could either use quoted keys to keep current names in pyproject.toml, or switch to more standard names (this would be a breaking change, maybe as a follow-up task)
      • packages is not needed as build backend will automatically discover them
      • scripts
    • data_files is the trickiest part as this uses custom smart_install_data class, this will be investigated while switching from distutils to setuptools.
    • smart_install_lib could also be replaced, however it will require work around versioning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions