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

Make pygit work (for FAForever) in a frozen environment #453

Merged
merged 1 commit into from Jan 19, 2015

Conversation

Sheeo
Copy link
Contributor

@Sheeo Sheeo commented Nov 26, 2014

Two things here:

  • Ensure git stores headers with LF line endings, so it's parseable by CFFI at runtime even on windows.
  • If sys has attribute 'Frozen', we need to look in a different place for the decl.h file. This naively uses the current path of the executable, as I don't know where else to put it.

I'm not sure you'll want this in main, but it posed problems for me when using pygit2 in a frozen executable (Using cx_Freeze), where the python modules are loaded from a .zip file.

if getattr(sys, 'frozen', False):
dir_path = dirname(abspath(sys.executable))
else:
dir_path = dirname(abspath(__file__))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wasn't this file in the first place? I may be wrong in replacing it.

@jdavid jdavid merged commit df0e117 into libgit2:master Jan 19, 2015
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.

None yet

2 participants