From 655041eb26fbf5b179f01c6afb135242e85fb923 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 30 Jul 2007 18:58:05 +0200 Subject: [PATCH] fix target directory for Lexicon.pickle (do it right this time) --- setup.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 ) -- 2.26.2