summaryrefslogtreecommitdiff
path: root/setuptools/command/build_ext.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-01-13 22:32:57 +0000
committerPJ Eby <distutils-sig@python.org>2006-01-13 22:32:57 +0000
commit87a755a2de76494d70a412f4410a2f953ff46608 (patch)
treee56c15af754252fdc6fadd348ea0dd43a8451ec1 /setuptools/command/build_ext.py
parent777f53fdfd99b9b18522d6a51f61eb6990bf0494 (diff)
downloadpython-setuptools-bitbucket-87a755a2de76494d70a412f4410a2f953ff46608.tar.gz
Don't write .py stubs except for actual extensions that don't already
have them.
Diffstat (limited to 'setuptools/command/build_ext.py')
-rw-r--r--setuptools/command/build_ext.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/command/build_ext.py b/setuptools/command/build_ext.py
index 6d5fb124..7f110436 100644
--- a/setuptools/command/build_ext.py
+++ b/setuptools/command/build_ext.py
@@ -165,12 +165,12 @@ class build_ext(_build_ext):
def build_extension(self, ext):
_compiler = self.compiler
_rpath = ext.runtime_library_dirs
- _ldirs = library_dirs
+ _ldirs = ext.library_dirs
try:
if isinstance(ext,Library):
self.compiler = self.shlib_compiler
- if have_rtld and self.links_to_dynamic(ext):
- ext.runtime_library_dirs = _rpath + [os.curdir]
+ if self.links_to_dynamic(ext):
+ if have_rtld: ext.runtime_library_dirs = _rpath + [os.curdir]
ext.library_dirs = _ldirs + [
os.path.dirname(
os.path.join(self.build_lib,
@@ -196,12 +196,12 @@ class build_ext(_build_ext):
libnames = dict.fromkeys(
[self.get_ext_fullname(lib.name) for lib in self.shlibs]
)
- if not libnames:
- return False
pkg = '.'.join(self.get_ext_fullname(ext.name).split('.')[:-1])
+ if pkg: pkg+='.'
for libname in ext.libraries:
- if ('%s.%s' % (pkg,libname)) in libnames:
- return True
+ if pkg+libname in libnames: return True
+ return False
+
if have_rtld or os.name=='nt':
# Build shared libraries