From: Stefan Behnel Date: Mon, 30 Jul 2007 16:58:05 +0000 (+0200) Subject: fix target directory for Lexicon.pickle (do it right this time) X-Git-Tag: 0.9.6.14~63 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=655041eb26fbf5b179f01c6afb135242e85fb923;p=cython.git fix target directory for Lexicon.pickle (do it right this time) --- diff --git a/setup.py b/setup.py index 1d479c10..93e453de 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,16 @@ from distutils.core import setup from distutils.sysconfig import get_python_lib -import os +import os, sys from Cython.Compiler.Version import version -compiler_dir = os.path.join(get_python_lib(prefix=''), 'Cython/Compiler') +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"] @@ -54,8 +61,6 @@ setup( 'Cython.Mac', 'Cython.Plex' ], - package_data = { - 'Cython.Compiler' : ['Lexicon.pickle'] - } + **setup_args )