From e47831c40de2bdcf7c58455f25655074d127aa05 Mon Sep 17 00:00:00 2001 From: Stephan Rave Date: Wed, 25 May 2016 13:37:56 +0200 Subject: [PATCH] merge more lines from python3 branch --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ff5f043877..dd320bc148 100644 --- a/setup.py +++ b/setup.py @@ -135,6 +135,9 @@ def __init__(self, *args, **kwargs): self.rtool.refactor_dir('docs', write=True) open(checkpoint_fn, 'wta').write('converted') +cmdclass = {} +if sys.version_info[0] < 3: + print(cmdclass) def _setup(**kwargs): # the following hack is taken from scipy's setup.py @@ -157,7 +160,7 @@ def _setup(**kwargs): # numpy sometimes expects this attribute, sometimes not. all seems ok if it's set to none if not hasattr(Cython.Distutils.build_ext, 'fcompiler'): Cython.Distutils.build_ext.fcompiler = None - cmdclass = {'build_ext': Cython.Distutils.build_ext} + cmdclass.update({'build_ext': Cython.Distutils.build_ext}) from numpy import get_include include_dirs = [get_include()] ext_modules = [Extension("pymor.tools.relations", ["src/pymor/tools/relations.pyx"], include_dirs=include_dirs), @@ -223,6 +226,7 @@ def setup_package(): 'Topic :: Scientific/Engineering :: Visualization'], license='LICENSE.txt', zip_safe=False, + cmdclass=cmdclass, ) missing = list(_missing(install_suggests.keys()))