Skip to content

Stop using smart_install_lib in setup.py #1652

@stegayet

Description

@stegayet

This issue is part of #1650.

smart_install_lib is currently used to tag Git versions. As distutils' install_lib has no replacement in setuptools, smart_install_lib has to be replaced with something else. Possible options:

  • Make use of dynamic metadata which is capable of deriving the current project version directly from git, using setuptools-scm build backend plugin. It would look like the following in pyproject.toml:
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
version_file = "ivre/VERSION"

Out of the box, default versioning scheme is the following vs current versioning scheme is the following if I'm not mistaken:

  • 1.2.3 when we have a Git tag
  • 1.2.3.devN when we have N revisions on top of 1.2.3 tag

We might be able to get the same versioning by settingsetuptools_scm.local_scheme to no-local-version.

Worst case scenario, we could use vendored copy and import install_data from setuptools._distutils.command.install_lib to buy time, however it will be an issue when we'll want to completely migrate from setup.py to pyproject.toml.

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