Skip to content

Extract version from source file? #435

@ChrisBarker-NOAA

Description

@ChrisBarker-NOAA

@henryiii told me that being able to extract the version from the source was on the list, but not yet done.

But I don't see an issue on it.

How can I help? It seems like pretty straightforward code to write, once I know where to put it.

NOTE: I'd like to see two options:

  1. setuptools-like version from a code file:

version = {attr = "my_package.VERSION"}

  1. setuptools_scm style: writing to a dynamically generated file:

write_to = "src/binary4fun/_version.py"

In this case, unlike setuptools_scm, I'd like to be able to be flexible about where the version comes from -- e.g. it could be extracted from SCM, or simply hard-coded in the 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