summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2016-12-06 13:08:54 +0100
committerMatěj Cepl <mcepl@cepl.eu>2016-12-13 17:52:16 +0100
commitf7896d4ece3eeb47cf9a2f85105dcb8417136252 (patch)
treed74f31d864ac3dd839c062806cf77f3c08de1f5a /setup.py
parent3dfc27a5dbf2b05cc13044b1af553f80458065a3 (diff)
downloadm2crypto-f7896d4ece3eeb47cf9a2f85105dcb8417136252.tar.gz
Fix the commit to the current master branch.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/setup.py b/setup.py
index b271711..35ecccf 100644
--- a/setup.py
+++ b/setup.py
@@ -156,8 +156,6 @@ class _M2CryptoBuildExt(build_ext.build_ext):
self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])
self.swig_opts.append('-includeall')
- self.swig_opts.extend(['-outdir',
- os.path.join(os.getcwd(), 'M2Crypto')])
self.swig_opts.append('-modern')
self.swig_opts.append('-builtin')
@@ -166,9 +164,8 @@ class _M2CryptoBuildExt(build_ext.build_ext):
# building a single extension with a known path; a proper patch to
# distutils would be in the run phase, when extension name and path are
# known.
- self.swig_opts.append('-outdir')
- self.swig_opts.append(os.path.join(self.build_lib, 'M2Crypto'))
-
+ self.swig_opts.extend(['-outdir',
+ os.path.join(os.getcwd(), 'M2Crypto')])
self.include_dirs.append(os.path.join(os.getcwd(), 'SWIG'))
if sys.platform == 'cygwin':
@@ -182,20 +179,6 @@ class _M2CryptoBuildExt(build_ext.build_ext):
self.library_dirs += [os.path.join(self.openssl, openssl_library_dir)]
mkpath(os.path.join(self.build_lib, 'M2Crypto'))
- def run(self):
- '''Overloaded build_ext implementation to allow inplace=1 to work,
- which is needed for (python setup.py test).'''
- # This is another workaround for http://bugs.python.org/issue2624 + the
- # corresponding lack of support in setuptools' test command. Note that
- # just using self.inplace in finalize_options() above does not work
- # because swig is not rerun if the __m2crypto.so extension exists.
- # Again, hard-coding our extension name and location.
- build_ext.build_ext.run(self)
- if self.inplace:
- copy_file(os.path.join(self.build_lib, 'M2Crypto', '_m2crypto.py'),
- os.path.join('M2Crypto', '_m2crypto.py'),
- verbose=self.verbose, dry_run=self.dry_run)
-
def swig_version(req_ver):
# type: (str) -> bool