aboutsummaryrefslogtreecommitdiff
path: root/pow/POW-0.7/setup.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2009-10-02 05:31:38 +0000
committerRob Austein <sra@hactrn.net>2009-10-02 05:31:38 +0000
commitd660defc47f15522f320f5593fe77f31138dca52 (patch)
treebe4625b2552767bbd2aa57ef88ce9ee488f28ad2 /pow/POW-0.7/setup.py
parentcf945b64ac9d64f052ba740890d8a4d351227993 (diff)
Vile changes to enable shared library support for OpenSSL and POW,
because the %^&^%*! GNU linker is unable to build _POW.so from static libraries on 64-bit hardware. svn path=/openssl/Makefile; revision=2806
Diffstat (limited to 'pow/POW-0.7/setup.py')
-rw-r--r--pow/POW-0.7/setup.py45
1 files changed, 26 insertions, 19 deletions
diff --git a/pow/POW-0.7/setup.py b/pow/POW-0.7/setup.py
index 3275b09f..21862805 100644
--- a/pow/POW-0.7/setup.py
+++ b/pow/POW-0.7/setup.py
@@ -13,26 +13,33 @@ oidinfo.dumpobjs('lib/_objects.py')
print 'writing oid module'
oidinfo.dumpoids('lib/_oids.py')
-library_dirs = [ "../../openssl/openssl" ]
-include_dirs = [ library_dirs[0] + "/include" ]
-libraries = [ "ssl", "crypto" ]
+# Setting -rpath to point to the OpenSSL build directory is temporary.
+# Once we figure out how and where to install this stuff, we'll need
+# to adjust this to point to the installation location. We wouldn't
+# be using shared libraries at all except for a GNU linker bug. Ick.
-setup(name='POW',
- version='0.7',
- description='Python OpenSSL Wrappers',
- author='Peter Shannon',
- author_email='peter_shannon@yahoo.com',
- license='BSD',
- url='http://www.sourceforge.net/projects/pow',
- packages=['POW'],
- package_dir={'POW':'lib'},
- ext_modules=[
- Extension('POW._POW',
- ['POW.c'],
- libraries=libraries,
- library_dirs=library_dirs,
- include_dirs=include_dirs)
- ])
+openssl_dir = os.path.realpath(os.path.join(os.getcwd(), "../../openssl/openssl"))
+
+library_dirs = [ openssl_dir ]
+include_dirs = [ openssl_dir + "/include" ]
+libraries = [ "ssl", "crypto" ]
+extra_link_args = [ "-Wl,-rpath", openssl_dir ]
+
+setup(name = 'POW',
+ version = '0.7',
+ description = 'Python OpenSSL Wrappers',
+ author = 'Peter Shannon',
+ author_email = 'peter_shannon@yahoo.com',
+ license = 'BSD',
+ url = 'http://www.sourceforge.net/projects/pow',
+ packages = ['POW'],
+ package_dir = {'POW':'lib'},
+ ext_modules = [ Extension('POW._POW',
+ ['POW.c'],
+ libraries = libraries,
+ library_dirs = library_dirs,
+ include_dirs = include_dirs,
+ extra_link_args = extra_link_args) ])
os.remove('lib/_objects.py')
os.remove('lib/_oids.py')