1
1
#!/usr/bin/env python
2
- from distutils .core import setup , Extension
2
+ from setuptools import setup
3
+ from distutils .core import Extension
3
4
from distutils .command .build_py import build_py
4
5
from distutils .command .build_ext import build_ext
5
6
6
7
import os , sys
7
8
8
- # wow, this is a mixed bag ... I am pretty upset about all of this ...
9
+ # wow, this is a mixed bag ... I am pretty upset about all of this ...
9
10
setuptools_build_py_module = None
10
11
try :
11
12
# don't pull it in if we don't have to
12
- if 'setuptools' in sys .modules :
13
+ if 'setuptools' in sys .modules :
13
14
import setuptools .command .build_py as setuptools_build_py_module
14
15
from setuptools .command .build_ext import build_ext
15
16
except ImportError :
@@ -25,23 +26,23 @@ def run(self):
25
26
# END ignore errors
26
27
27
28
def get_data_files (self ):
28
- """Can you feel the pain ? So, in python2.5 and python2.4 coming with maya,
29
+ """Can you feel the pain ? So, in python2.5 and python2.4 coming with maya,
29
30
the line dealing with the ``plen`` has a bug which causes it to truncate too much.
30
31
It is fixed in the system interpreters as they receive patches, and shows how
31
32
bad it is if something doesn't have proper unittests.
32
33
The code here is a plain copy of the python2.6 version which works for all.
33
-
34
+
34
35
Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
35
36
data = []
36
37
if not self .packages :
37
38
return data
38
-
39
+
39
40
# this one is just for the setup tools ! They don't iniitlialize this variable
40
41
# when they should, but do it on demand using this method.Its crazy
41
42
if hasattr (self , 'analyze_manifest' ):
42
43
self .analyze_manifest ()
43
44
# END handle setuptools ...
44
-
45
+
45
46
for package in self .packages :
46
47
# Locate package source directory
47
48
src_dir = self .get_package_dir (package )
@@ -60,13 +61,13 @@ def get_data_files(self):
60
61
]
61
62
data .append ((package , src_dir , build_dir , filenames ))
62
63
return data
63
-
64
+
64
65
build_py .get_data_files = get_data_files
65
66
if setuptools_build_py_module :
66
67
setuptools_build_py_module .build_py ._get_data_files = get_data_files
67
68
# END apply setuptools patch too
68
69
69
-
70
+
70
71
setup (cmdclass = {'build_ext' :build_ext_nofail },
71
72
name = "async" ,
72
73
version = "0.6.1" ,
@@ -79,5 +80,7 @@ def get_data_files(self):
79
80
ext_modules = [Extension ('async.mod.zlib' , ['async/mod/zlibmodule.c' ], libraries = ['z' ])],
80
81
license = "BSD License" ,
81
82
zip_safe = False ,
82
- long_description = """Async is a framework to process interdependent tasks in a pool of workers"""
83
+ long_description = """Async is a framework to process interdependent tasks in a pool of workers""" ,
84
+ tests_require = ('nose' ),
85
+ test_suite = 'nose.collector'
83
86
)
0 commit comments