From 0dc244e59ae939bf15bb7d8fa2927bee833318be Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 7 Sep 2007 13:05:42 -0700 Subject: [PATCH] fix target directory for Lexicon.pickle (do it right this time) from Stefan Behnel --- setup.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 ) -- 2.26.2