fix target directory for Lexicon.pickle (do it right this time) from Stefan Behnel
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 7 Sep 2007 20:05:42 +0000 (13:05 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 7 Sep 2007 20:05:42 +0000 (13:05 -0700)
setup.py

index b93499ef81f2f225fd57e7f89e85a9cf3c182362..19c71b0554d915b25740750fc086a92fde6505b4 100644 (file)
--- 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
   )