Skip to content

Using use_scm_version write_to in setup.cfg #582

Closed
@smarie

Description

@smarie

I love setuptools_scm, I use it in all my libs. I find the write_to option a great way to have the package find its own __version__, using the trick described here.

I adopted last year a practice to place most of the setup information in setup.cfg, it seems to work very well (following this great example)

Until now I was always still placing use_scm_version={"write_to": f"{name}/_version.py"} in the setup.py because it was not supported in setup.cfg. However the name had to be inserted in both files, which is not convenient (For example: here in setup.py and here in setup.cfg).

Digging aroung in the past issues and PR I found #364 and #181 So I thought that maybe the status had evolved now ? Can I now use

use_scm_version = 
    write_to = foo/_version.py

in setup.cfg ? If this is not the recommended way, let me know !
Thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions