From: Robert Bradshaw Date: Fri, 7 Sep 2007 20:05:42 +0000 (-0700) Subject: fix target directory for Lexicon.pickle (do it right this time) from Stefan Behnel X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0dc244e59ae939bf15bb7d8fa2927bee833318be;p=cython.git fix target directory for Lexicon.pickle (do it right this time) from Stefan Behnel --- diff --git a/setup.py b/setup.py index b93499ef..19c71b05 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,15 @@ compiler_dir = os.path.join(get_python_lib(prefix=''), 'Cython/Compiler') if sys.platform == "win32": compiler_dir = compiler_dir[len(sys.prefix)+1:] +setup_args = {} + +if sys.version_info < (2,4): + compiler_dir = os.path.join(get_python_lib(prefix=''), 'Cython/Compiler') + setup_args['data_files'] = [ + {compiler_dir : ['Cython/Compiler/Lexicon.pickle']}] +else: + setup_args['package_data'] = {'Cython.Compiler' : ['Lexicon.pickle']} + if os.name == "posix": scripts = ["bin/cython"] else: @@ -57,8 +66,6 @@ setup( 'Cython.Mac', 'Cython.Plex' ], - package_data = { - 'Cython.Compiler' : ['Lexicon.pickle'] - } + **setup_args )