setup.py uses "/sw" by default

Bug #373470 reported by Zooko Wilcox-O'Hearn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyOpenSSL
Fix Released
Undecided
Unassigned

Bug Description

"/sw" means fink. setup.py 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.

Revision history for this message
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.

Revision history for this message
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/setup.py new-dw/setup.py
--- old-dw/setup.py 2009-06-04 15:17:54.000000000 -0600
+++ new-dw/setup.py 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']

Revision history for this message
Jean-Paul Calderone (exarkun) wrote :

I was making major setup.py 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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.