Skip to content

Conversation

@mih
Copy link
Member

@mih mih commented May 5, 2025

This is WiP. Posting now to see if anything re actions integration would work. The packaging itself has been tested on linux and windows already.

@mih
Copy link
Member Author

mih commented May 5, 2025

@yarikoptic It is not clear to me why the patch would not apply -- it does for me locally, and it only adds files. Please advice.

Update: Applying the patch only fails on windows. The very same patch (against the same sources?) applies cleanly on macos and ubuntu.

@yarikoptic
Copy link
Member

yep, confirming the update that it does build fine on linux and fails on windows
image
with error

+ echo '[INFO] Applying patch patches/20250505-7bf6e1df-python-packaging.patch'
+ git apply -R --check patches/20250505-7bf6e1df-python-packaging.patch
error: git diff header lacks filename information when removing 1 leading pathname component (line 84)
+ git apply patches/20250505-7bf6e1df-python-packaging.patch
patches/20250505-7bf6e1df-python-packaging.patch:7: trailing whitespace.
[project]
patches/20250505-7bf6e1df-python-packaging.patch:8: trailing whitespace.
authors = [
patches/20250505-7bf6e1df-python-packaging.patch:9: trailing whitespace.
  { name = "Joey Hess", email = "id@joeyh.name" },
patches/20250505-7bf6e1df-python-packaging.patch:10: trailing whitespace.
]
patches/202[50](https://github.com/datalad/git-annex/actions/runs/14843716923/job/41672490498?pr=224#step:9:51)505-7bf6e1df-python-packaging.patch:11: trailing whitespace.
classifiers = [
error: git diff header lacks filename information when removing 1 leading pathname component (line 84)
+ '[' pull_request = pull_request ']'
Error: '[ERROR] patches/20250505-7bf6e1df-python-packaging.patch failed to apply.'
+ exit 1
Error:  patches/20250505-7bf6e1df-python-packaging.patch failed to apply.
Error: Process completed with exit code 1.

and since that line 84 is way far after that classifiers, I wonder if without converting to windows end of lines it just failed to load/handle that file correctly? might be worth on windows trying to do some unix2dos and see how it goes... since linux seems to not care

❯ patch -p 1 < /tmp/20250505-7bf6e1df-python-packaging.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file pyproject.toml
patching file python/README.md
(Stripping trailing CRs from patch; use --binary to disable.)
patching file python/build_hook_plugin.py
patching file python/py.typed

I will push an attempt with unix2dos converted patches... will drop it if does not help

@yarikoptic yarikoptic force-pushed the master branch 2 times, most recently from 5e667f2 to 0a3cc9f Compare May 6, 2025 20:28
Apparently git is touchy to line endings on Windows while applying
patches, so we will just modify them in place on windows to guarantee
correct ending
GitHub Almighty added 4 commits May 6, 2025 16:41
=== Do not change lines below ===
{
 "chain": [
  "47fa1b854c9e94abc0fe7aadb8df8a8cd6525808",
  "ff26f850198044041285400f56f451b5a76d95d3",
  "424897650eadcbf7c13636064073bde0df7a6eda"
 ],
 "cmd": "make -C .github/workflows/template",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@yarikoptic
Copy link
Member

this is confusing... it was working ok in some TEMP implementations where I had unix2dos call before applying the patches, and it worked. but now it stopped, uff... dunno ATM. Might later troubleshoot directly in github actions using https://github.com/mxschmitt/action-tmate .

At least I added installation/invocation of uv to the template/all OSes

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

Successfully merging this pull request may close these issues.

2 participants