uses "/sw" by default

Bug #373470 reported by Zooko Wilcox-O'Hearn on 2009-05-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

"/sw" means fink. has a hardcoded

if sys.platform == 'darwin':
    IncludeDirs = ['/sw/include']

This is very wrong, but presumably usually has no effect. However, I happen to have an old copy of fink stored in /sw on my system. It isn't in any of my paths, and normally when I build projects they use interfaces such as environment variables, commmand-line options or distutils config files so I can control which paths they will search for include dirs, so I haven't noticed this /sw sitting around for a few years. Just now I figured out why pyOpenSSL builds strangely on this machine sometimes -- it looks in /sw even though my distutils config file doesn't say to.

An appropriate fix is probably just to remove that stanza and see if any buildbots change behavior or if any users complain.

Zooko Wilcox-O'Hearn (zooko) wrote :

Sorry if this was cryptic.

 * "This is very wrong" because using fink is likely to cause problems such as building an unloadable extension module, and fink is widely hated (not by me), and it should not be the default behavior.
 * It "usually has no effect" because fink is usually not installed.
 * "If any users complain" then we should tell them if they want builds of Python packages to use fink include dirs and lib dirs then they should edit their user or system distutils config file and specify the include_dirs and library_dirs options in the [build_ext] section.

Zooko Wilcox-O'Hearn (zooko) wrote :

So, how about it? Here's a patch!

It very likely improves behavior of the setup script, as described above, and it has a certain pleasing elegance to it.

diff -rN -u old-dw/ new-dw/
--- old-dw/ 2009-06-04 15:17:54.000000000 -0600
+++ new-dw/ 2009-06-04 15:17:55.000000000 -0600
@@ -62,10 +62,6 @@
     Libraries = ['ssl', 'crypto']
     ExtraObjects = []

-if sys.platform == 'darwin':
- IncludeDirs = ['/sw/include']
- LibraryDirs = ['/sw/lib']
 def mkExtension(name):
     modname = 'OpenSSL.' + name
     src = globals()[name.lower() + '_src']

Jean-Paul Calderone (exarkun) wrote :

I was making major changes to improve Windows support, so I went ahead and included this patch in that branch.

Changed in pyopenssl:
status: New → Fix Committed
Changed in pyopenssl:
milestone: none → 0.10
Changed in pyopenssl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers