Merge jython-ext-3410: exclude extensions in the build process when using Jython

Author: thijs
Reviewer: exarkun
Fixes: #3410


git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@24692 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
This commit is contained in:
thijs 2008-09-06 20:55:38 +00:00
parent f28b54c1fc
commit d25889f03c
1 changed files with 11 additions and 8 deletions

View File

@ -21,14 +21,17 @@ def getExtensions():
Get all extensions from core and all subprojects.
"""
extensions = []
for dir in os.listdir("twisted") + [""]:
topfiles = os.path.join("twisted", dir, "topfiles")
if os.path.isdir(topfiles):
ns = {}
setup_py = os.path.join(topfiles, "setup.py")
execfile(setup_py, ns, ns)
if "extensions" in ns:
extensions.extend(ns["extensions"])
if not sys.platform.startswith('java'):
for dir in os.listdir("twisted") + [""]:
topfiles = os.path.join("twisted", dir, "topfiles")
if os.path.isdir(topfiles):
ns = {}
setup_py = os.path.join(topfiles, "setup.py")
execfile(setup_py, ns, ns)
if "extensions" in ns:
extensions.extend(ns["extensions"])
return extensions