Skip to content

maint: setupext.py for freetype had a Catch case for missing ft2build.h #12321

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

Merged
merged 1 commit into from
Sep 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ def check(self):
try:
check_include_file(get_include_dirs(), 'ft2build.h', 'freetype')
except CheckFailed:
check_include_file(get_include_dirs(), 'freetype2\\ft2build.h', 'freetype')
check_include_file(get_include_dirs(), os.path.join('freetype2', 'ft2build.h'), 'freetype')
Copy link
Member

Choose a reason for hiding this comment

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

This block should only be executed if sys.platform is windows, but I guess the change is reasonable. Does it fix a known bug?

Copy link
Contributor Author

@zerothi zerothi Sep 28, 2018

Choose a reason for hiding this comment

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

No, it may also be executed IFF you don't have ft2build.h installed in /usr/include. I.e. if you install freetype in a non-default location and you want to link it using setup.cfg and basedirlist, then you have problems because freetype installs the headers in the freetype2/ directory

return 'Using unknown version found on system.'

status, output = subprocess.getstatusoutput(
Expand Down