Skip to content

Commit

Permalink
Don't cache python extension build file names.
Browse files Browse the repository at this point in the history
This allows to build with various Python versions by calling scons with
the Python version we want to build for. Not the very best solution, but
a working one.
  • Loading branch information
bzed committed Nov 1, 2011
1 parent a7b16d2 commit 307f14d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

# Unfinished items:
# * Qt binding (needs to build .pc, .prl files)
# * Allow building for multiple python versions)
# * Out-of-directory builds: see http://www.scons.org/wiki/UsingBuildDir

# Release identification begins here
Expand Down Expand Up @@ -927,7 +926,13 @@ else:
for ext, sources in python_extensions.iteritems():
python_objects[ext] = []
for src in sources:
python_objects[ext].append(python_env.SharedObject(src.split(".")[0] + '-py', src))
python_objects[ext].append(
python_env.NoCache(
python_env.SharedObject(
src.split(".")[0] + '-py_' + '_'.join(['%s' %(x,) for x in sys.version_info]), src
)
)
)
python_compiled_libs[ext] = python_env.SharedLibrary(ext, python_objects[ext])
python_built_extensions = python_compiled_libs.values()

Expand Down

0 comments on commit 307f14d

Please sign in to comment.