-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
📦 Enable support for git archive installs #1095
📦 Enable support for git archive installs #1095
Conversation
This patch enables the end-users to succeed installing from GitHub source Git archive URLs, letting `setuptools-scm` calculate the distribution version correctly, including the exports of non-tagged commits [[1]]. [1]: https://github.com/pypa/setuptools_scm#git-archives
c7ba193
to
532d441
Compare
Proof that this works: $ pip install https://github.com/webknjaz/attrs/archive/maintenance/packaging-git-archives-support.tar.gz
Collecting https://github.com/webknjaz/attrs/archive/maintenance/packaging-git-archives-support.tar.gz
Downloading https://github.com/webknjaz/attrs/archive/maintenance/packaging-git-archives-support.tar.gz
\ 208 kB 750 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Building wheels for collected packages: attrs
Building wheel for attrs (PEP 517) ... done
Created wheel for attrs: filename=attrs-22.1.1.dev156-py3-none-any.whl size=59959 sha256=5fca3d4e94fdbd7dc5515da4b6e45c69db01a1fae3bb16aac1b168f5570f61d9
Stored in directory: ~/.cache/pip/wheels/29/55/36/3b514229ffa36f05afab77610f4e90f30f1f595a2fb5aba2a9
Successfully built attrs
Installing collected packages: attrs
Successfully installed attrs-22.1.1.dev156 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool thanks! I guess I'll have to look at my other projects too!
@webknjaz I have just noticed two new warnings while building:
What exactly do they mean? Can we fix them or do we have to ignore them? I'm getting them locally too, that's how I noticed. |
I'll check. I think this may happen on source archives made with very old Git but not sure. I'm traveling so it'll take a while to get to a power outlet. @RonnyPfannschmidt might know the answer, though. |
I only looked at the logs from phone and it seems to be happening during sdist creation. The warning seems to indicate an old Git version so I'd update it first thing, maybe that's enough. |
im pretty sure this can happen when creating a sdist while the file finder is active |
@RonnyPfannschmidt are you implying that the behavior that hatch/hatch-vcs might differ from setuptools, in how this is included in sdist? |
I missed the hatch migration, for hatch the exclude location differs from |
@RonnyPfannschmidt is the expectation that this is just excluded? |
No, the detail issue is that the bugfix for missed archival was tested in isolation and we missed that it warns for correct sdists depending on the order of entrypoints |
Ah, so no changes are needed here. |
Wait, I didn't understand any of this. 😅 What's happening? |
@hynek: @RonnyPfannschmidt said that it's a bug in the setuptools-scm upstream so we just need to wait for the fix. |
OK but the bug is the warning – the packages are OK, right? |
Correct |
Summary
This patch enables the end-users to succeed installing from GitHub source Git archive URLs, letting
setuptools-scm
calculate the distribution version correctly, including the exports of non-tagged commits [1].Pull Request Check List
Our CI fails if coverage is not 100%.
.pyi
).tests/typing_example.py
.attr/__init__.pyi
, they've also been re-imported inattrs/__init__.pyi
.docs/api.rst
by hand.@attr.s()
have to be added by hand too.versionadded
,versionchanged
, ordeprecated
directives.The next version is the second number in the current release + 1.
So if the current version on PyPI is 23.1.0, the next version is gonna be 23.2.0.
.rst
files is written using semantic newlines.changelog.d
.