fix target directory for Lexicon.pickle (do it right this time)
authorStefan Behnel <scoder@users.berlios.de>
Mon, 30 Jul 2007 16:58:05 +0000 (18:58 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 30 Jul 2007 16:58:05 +0000 (18:58 +0200)
setup.py

index 1d479c10c7de8c09e51f22ec95f3e7b0961f7ad5..93e453de1689fda7e56788f29ba21144b4188b57 100644 (file)
--- 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
   )