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

Building issue under windows. #3140

Closed
GBillotey opened this issue Jun 17, 2014 · 4 comments · Fixed by #3157
Closed

Building issue under windows. #3140

GBillotey opened this issue Jun 17, 2014 · 4 comments · Fixed by #3157
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone

Comments

@GBillotey
Copy link
Contributor

Since PR #3067 I am unable to build from source (under windows).

This PR added a get_extension method to class FreeType in setupext.py.
A easy workaround is to explicitly return the default None under windows platform, but this seems a bit dirty.

def get_extension(self):
    ext = make_extension('freetype2', [])
    self.add_flags(ext)
    if sys.platform == 'win32':
        return None
    else:
        return ext

I would be happy to submit a PR for this but I would like first to take the advice of a setup.py / windows expert...

@pelson
Copy link
Member

pelson commented Jun 18, 2014

Thanks @GBillotey.

@cgohlke - just wondering if you have any thoughts on this?

@cgohlke
Copy link
Contributor

cgohlke commented Jun 18, 2014

I can confirm the build issue and that the fix works with msvc. It looks to me that building a dummy C extension without source files is "undefined" and could also break with other compilers/linkers (?).

diff --git a/setupext.py b/setupext.py
index 868516d..7a8f285 100755
--- a/setupext.py
+++ b/setupext.py
@@ -918,6 +918,8 @@ class FreeType(SetupPackage):
             alt_exec='freetype-config')

     def get_extension(self):
+        if sys.platform == 'win32':
+            return None
         ext = make_extension('freetype2', [])
         self.add_flags(ext)
         return ext

@pelson
Copy link
Member

pelson commented Jun 25, 2014

@GBillotey - over to you if you're happy to submit a PR?

@GBillotey
Copy link
Contributor Author

Unfortunately due to a recent "flooding" issue with my home computer, I
will be unable to submit it in the next few weeks.
Please, feel free to go on and merge the proposed patch if you wish.

2014-06-25 16:48 GMT+02:00 Phil Elson notifications@github.com:

@GBillotey https://github.com/GBillotey - over to you if you're happy
to submit a PR?


Reply to this email directly or view it on GitHub
#3140 (comment)
.

@tacaswell tacaswell added this to the v1.4.0 milestone Jun 25, 2014
tacaswell added a commit to tacaswell/matplotlib that referenced this issue Jun 27, 2014
patch suggested by cgohlke to fix issues with building
FreeType extension

Closes matplotlib#3140
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants