Page MenuHomePhabricator

packaging: add pygit2 to the py3 Windows installers
ClosedPublic

Authored by mharbison72 on Nov 26 2020, 2:55 AM.

Details

Summary

This is needed to be able to use the git extension.

The extension no longer complains about the library being not installed, but
hg log -r . on a repo that works in WSL yielded a TypeError:

  ...
  File "mercurial.hg", line 188, in _peerorrepo
  File "mercurial.localrepo", line 3224, in instance
  File "mercurial.localrepo", line 623, in makelocalrepository
  File "hgext.git", line 117, in _makestore
  File "hgext.git", line 48, in __init__
TypeError: Repository unable to unpack backend.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Nov 26 2020, 2:55 AM

the PyOxidizer target looks in the py2.txt file for requirements instead of py3

If anyone knows where this looks, I'm happy to try to fix it. I did a quick search for parts the *.txt file name, but came up empty (other than in build_with_py2exe).

mharbison72 edited the summary of this revision. (Show Details)Nov 26 2020, 3:17 AM

@durin42: any ideas about the stacktrace? I haven't dug into it at all, so I'm hoping maybe it's something you've seen before. It seems to original here:

https://github.com/libgit2/pygit2/blob/0129d963c8b90cd42f6f13dab0fa7953389f8441/src/repository.c#L114

@durin42: any ideas about the stacktrace? I haven't dug into it at all, so I'm hoping maybe it's something you've seen before. It seems to original here:
https://github.com/libgit2/pygit2/blob/0129d963c8b90cd42f6f13dab0fa7953389f8441/src/repository.c#L114

The problem is that pygit2 wants to load python3.dll (which is available in the python install directory next to python.exe and pythonXY.dll), but we don't copy that next to wrapper.exe, nor include it in PyOxidizer. That prevents pygit2 from initializing. So I think this patch is OK to take, and then we need to figure out how to bring python3.dll into the packaging.

pulkit accepted this revision.Nov 30 2020, 11:33 AM
This revision is now accepted and ready to land.Nov 30 2020, 11:33 AM
This revision was automatically updated to reflect the committed changes.