diff options
Diffstat (limited to 'dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch')
-rw-r--r-- | dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch b/dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch new file mode 100644 index 000000000000..1aafd8022d56 --- /dev/null +++ b/dev-python/pycrypto/files/pycrypto-2.1.0-gmp.patch @@ -0,0 +1,20 @@ +--- setup.py ++++ setup.py +@@ -151,11 +151,12 @@ + if self.compiler.compiler_type == 'msvc': + self.compiler.include_dirs.insert(0, "src/inc-msvc/") + +- # Detect libgmp and don't build _fastmath if it is missing. +- lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib'] +- if not (self.compiler.find_library_file(lib_dirs, 'gmp')): +- print >>sys.stderr, "warning: GMP library not found; Not building Crypto.PublicKey._fastmath." +- self.__remove_extensions(["Crypto.PublicKey._fastmath"]) ++ if os.environ.get("USE_GMP", "1") == "1": ++ # Detect libgmp and don't build _fastmath if it is missing. ++ lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib'] ++ if not (self.compiler.find_library_file(lib_dirs, 'gmp')): ++ print >>sys.stderr, "error: GMP library not found." ++ sys.exit(1) + + def __remove_extensions(self, names): + """Remove the specified extension from the list of extensions to build""" |