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

Dynamic version from setuptools_scm prevents packaging from github tag archives #36

Open
JasonGantner opened this issue Oct 22, 2024 · 2 comments

Comments

@JasonGantner
Copy link

The source archives provided by github as tagged releases do not contain the .git directory which prevents setuptools_scm to guess the version number. Which in turn make the packaging process fail.

Could you update the method for versionning inside pyproject.toml to allow packaging based on tagged releases ?

@jwbargsten
Copy link
Owner

It would be nice if you could give a bit more background on this. There are plenty of options to check out a specific tag using standard git commands. To download the source from github as zip or tar.gz and build a package from it is a flow is not supported currently. setuptools_scm gives already sufficient alternatives in the error message:

LookupError: setuptools-scm was unable to detect version for pytest-archon-0.0.6.

Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

If you have a legit use case, I'm happy to have a look.

@jwbargsten
Copy link
Owner

And of course: pull requests are welcome :)

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

No branches or pull requests

2 participants