aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/bdist_egg.py
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-04-24 20:52:59 +0000
committerPJ Eby <distutils-sig@python.org>2006-04-24 20:52:59 +0000
commit847ce20a9390a14d3c415d9127db4bf9b86af3cb (patch)
treec2493e37a3995d7862fedeec17d2ba9bb14ee9c2 /setuptools/command/bdist_egg.py
parent3f6ffbc76c79adac2905221aef8f03bef28999f7 (diff)
downloadexternal_python_setuptools-847ce20a9390a14d3c415d9127db4bf9b86af3cb.tar.gz
external_python_setuptools-847ce20a9390a14d3c415d9127db4bf9b86af3cb.tar.bz2
external_python_setuptools-847ce20a9390a14d3c415d9127db4bf9b86af3cb.zip
Backport 'module' fixes to 0.6
--HG-- branch : setuptools-0.6 extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4045696
Diffstat (limited to 'setuptools/command/bdist_egg.py')
-rw-r--r--setuptools/command/bdist_egg.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/setuptools/command/bdist_egg.py b/setuptools/command/bdist_egg.py
index 74f2d426..ae94a869 100644
--- a/setuptools/command/bdist_egg.py
+++ b/setuptools/command/bdist_egg.py
@@ -12,6 +12,13 @@ from pkg_resources import get_build_platform, Distribution
from types import CodeType
from setuptools.extension import Library
+def strip_module(filename):
+ if '.' in filename:
+ filename = os.path.splitext(filename)[0]
+ if filename.endswith('module'):
+ filename = filename[:-6]
+ return filename
+
def write_stub(resource, pyfile):
f = open(pyfile,'w')
f.write('\n'.join([
@@ -32,13 +39,6 @@ NS_PKG_STUB = '__import__("pkg_resources").declare_namespace(__name__)'
-
-
-
-
-
-
-
class bdist_egg(Command):
description = "create an \"egg\" distribution"
@@ -179,7 +179,7 @@ class bdist_egg(Command):
to_compile = []
for (p,ext_name) in enumerate(ext_outputs):
filename,ext = os.path.splitext(ext_name)
- pyfile = os.path.join(self.bdist_dir, filename + '.py')
+ pyfile = os.path.join(self.bdist_dir, strip_module(filename)+'.py')
self.stubs.append(pyfile)
log.info("creating stub loader for %s" % ext_name)
if not self.dry_run: