Open bhrutledge opened 5 years ago
currently this is already exposed via multiple entry-points that do not require creating a script
the old setuptools integration features python setup.py --version
a main entry-point is exposed for python -m setuptools_scm
both of those don't do the local version check (its something i actually avoid in my release pipelines) but i do believe its fine to add something like that to the setuptools_scm entry-point
would you like to propose a pr and/or the exact semantics you'd like to see?
Thanks!
I see that __main__.py
already has an ls
subcommand. What about something like this?
python -m setuptools_scm check
And maybe something like this in entry_points
?
[console_scripts]
scm_version = setuptools_scm.__main__:main
Also, I discovered that Warehouse uses packaging.version
to invalidate local versions; I'm inclined do the same.
Finally, if you don't mind, why do you avoid the local version check?
i do use devpi and there local versions are fine in addition my release pipeline that does pypi only happens on tags or specific commands that do the
the command should be named like something that clearly indicates a check for pypi uploadability
python -m setuptools_scm pypi_check
?
Also, I forgot that this was already under consideration in https://github.com/pypa/twine/issues/430. Happy to consider implementing it there, although adding it here would make it useful for other uploaders (e.g. Poetry) and allow for a clearer course of action (e.g. "clean your working tree").
Hi there! Thanks for making this. I'm setting up a new project, and I've found it very useful to offload the version management.
I've made a rudimentary release pipeline with tox:
And the contents of
check_version.py
is:Could something like
check_version
be implemented in setuptools_scm?It's somewhat overkill, because PyPI will reject PEP-440 local versions, but I thought it'd be nice to abort before that step.