diff options
-rw-r--r-- | INSTALL.rst | 17 | ||||
-rw-r--r-- | setup.py | 4 |
2 files changed, 13 insertions, 8 deletions
diff --git a/INSTALL.rst b/INSTALL.rst index 5edf3a1..24b9a2d 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -42,13 +42,15 @@ this::: $ python setup.py test -This assumes OpenSSL is installed in /usr. You can provide an alternate -OpenSSL prefix location with --openssl option to build\_ext command. -Other commands accept standard options if you need them. +This assumes OpenSSL is installed in ``/usr``. You can provide an +alternate OpenSSL prefix location with --openssl option to +``build\_ext`` (or ``build``) command. So, for example, if you +build your local version of OpenSSL and install it with +``/usr/local`` prefix (your includes are in +``/usr/local/include/openssl`` and libs in ``/usr/local/lib``), +then you would add ``--openssl=/usr/local`` to your ``build`` +command. -Some distributions, like Fedora Core, package OpenSSL headers in a -different location from OpenSSL itself. In that case you need to tell -``build`` the additional include location with -I option. Differences when installing on Windows -------------------------------------- @@ -60,7 +62,8 @@ files, import libraries and DLLs. By default setup.py assumes that OpenSSL include files are in ``c:\pkg\openssl\include``, and the import libraries in ``c:\pkg\openssl\lib``. As with other platforms, you can specify a different OpenSSL location with --openssl option to -``build\_ext`` (or ``build``) command. +``build\_ext`` (or ``build``) command. That would +be ``--openssl=c:\pkg\openssl`` in this case. Using OpenSSL 0.9.8 on Windows requires Python be built with applink.c (add an include statement in python.c). This is not a requirement for @@ -51,6 +51,7 @@ def _get_additional_includes(): _, err = pid.communicate() err = [line.lstrip() for line in err.decode('utf8').split('\n') if line and line[0] == ' '] + log.debug('additional includes:\n%s', err) return err @@ -211,7 +212,8 @@ class _M2CryptoBuildExt(build_ext.build_ext): # Someday distutils will be fixed and this won't be needed. self.library_dirs += [os.path.join(self.openssl, 'bin')] - self.library_dirs += [os.path.join(self.openssl, openssl_library_dir)] + self.library_dirs.insert(0, os.path.join(self.openssl, openssl_library_dir)) + log.debug('self.library_dirs = %s', self.library_dirs) mkpath(os.path.join(self.build_lib, 'M2Crypto')) |