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

Document differences between versioningit, versioneer, setuptools_scm #46

Open
basnijholt opened this issue Apr 7, 2023 · 2 comments
Open
Labels
question User requests information

Comments

@basnijholt
Copy link

basnijholt commented Apr 7, 2023

I cannot find what the fundamental differences between these packages are precisely:

@jwodder, would you be able to comment on this?

One difference at least is that setuptools_scm isn't aware of editable installs: pypa/setuptools-scm#518

@jwodder
Copy link
Owner

jwodder commented Apr 9, 2023

  • versioningit:

    • Primarily configured entirely though pyproject.toml (though there is support for using it via setup.py for advanced usage)
    • Supports Git, specially-prepared Git archives, and Mercurial
    • Supports configuring the version string format via templates in pyproject.toml
    • Supports writing the version and other information to a file in your project tree
    • Simple configuration is possible via the pyproject.toml file, and more complex configuration can be accomplished by writing custom "method" functions that are stored in either your project repository or a separate package
  • setuptools_scm:

    • Configured through pyproject.toml, setup.py, or setup.cfg
    • Supports Git, specially-prepared Git archives, and Mercurial
    • Causes all files in your code repository to be included in sdists
    • Supports writing the version to a file in your project tree
    • The format of the version string can be configured by selecting from a number of built-in formats; custom formats can be defined via Python functions stored in the project repository
  • versioneer:

    • Requires adding an autogenerated _version.py file to your project
      • When your project is built, this file is replaced with details on the project's version
    • Can be used either in "vendored mode", in which an autogenerated versioneer.py file is added to the root of your project, or in "build-time dependency mode", which uses pyproject.toml's build-system.requires
    • Configured through either setup.cfg or pyproject.toml
    • Requires setup.py to be present
    • Supports Git and Git archives
    • The format of the version string can be configured by selecting from a number of built-in formats; custom formats do not seem to be supported

@jwodder jwodder added the question User requests information label Apr 9, 2023
@basnijholt
Copy link
Author

basnijholt commented Apr 23, 2023

Thanks a lot for your detailed overview! Over time I have used all alternatives I could find. So far versioningit is my favorite.

I just wrote a blog post about my favorite Python dev tools, and tl;dr: versioningit is one of them: https://www.nijho.lt/post/best-python-dev-tooling/

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

No branches or pull requests

2 participants