Skip to content

Commit

Permalink
Modified setup.py to make cTools optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf authored and felix.antoine.fortin committed Apr 11, 2012
1 parent 1d9c74e commit 9379803
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env python
import sys
from distutils.core import setup, Extension
try:
from distutils.command.build_py import build_py_2to3 as build_py
Expand All @@ -7,7 +8,10 @@

import deap

deap_ctools = Extension('deap.cTools', ['deap/cTools.cpp'])
ext_modules = []
if "--with-ctools" in sys.argv:
ext_modules.append(Extension('deap.cTools', ['deap/cTools.cpp']))
sys.argv.remove("--with-ctools")

setup(name='deap',
version=deap.__revision__,
Expand All @@ -31,6 +35,6 @@
'Topic :: Scientific/Engineering',
'Topic :: Software Development',
],
ext_modules = [deap_ctools],
ext_modules = ext_modules,
cmdclass = {'build_py': build_py}
)

0 comments on commit 9379803

Please sign in to comment.