11#!/usr/bin/env python
2- from distutils .core import setup , Extension
2+ from setuptools import setup
3+ from distutils .core import Extension
34from distutils .command .build_py import build_py
45from distutils .command .build_ext import build_ext
56
67import os , sys
78
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 ...
910setuptools_build_py_module = None
1011try :
1112 # don't pull it in if we don't have to
12- if 'setuptools' in sys .modules :
13+ if 'setuptools' in sys .modules :
1314 import setuptools .command .build_py as setuptools_build_py_module
1415 from setuptools .command .build_ext import build_ext
1516except ImportError :
@@ -25,23 +26,23 @@ def run(self):
2526 # END ignore errors
2627
2728def 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,
2930 the line dealing with the ``plen`` has a bug which causes it to truncate too much.
3031 It is fixed in the system interpreters as they receive patches, and shows how
3132 bad it is if something doesn't have proper unittests.
3233 The code here is a plain copy of the python2.6 version which works for all.
33-
34+
3435 Generate list of '(package,src_dir,build_dir,filenames)' tuples"""
3536 data = []
3637 if not self .packages :
3738 return data
38-
39+
3940 # this one is just for the setup tools ! They don't iniitlialize this variable
4041 # when they should, but do it on demand using this method.Its crazy
4142 if hasattr (self , 'analyze_manifest' ):
4243 self .analyze_manifest ()
4344 # END handle setuptools ...
44-
45+
4546 for package in self .packages :
4647 # Locate package source directory
4748 src_dir = self .get_package_dir (package )
@@ -60,13 +61,13 @@ def get_data_files(self):
6061 ]
6162 data .append ((package , src_dir , build_dir , filenames ))
6263 return data
63-
64+
6465build_py .get_data_files = get_data_files
6566if setuptools_build_py_module :
6667 setuptools_build_py_module .build_py ._get_data_files = get_data_files
6768# END apply setuptools patch too
6869
69-
70+
7071setup (cmdclass = {'build_ext' :build_ext_nofail },
7172 name = "async" ,
7273 version = "0.6.1" ,
@@ -79,5 +80,7 @@ def get_data_files(self):
7980 ext_modules = [Extension ('async.mod.zlib' , ['async/mod/zlibmodule.c' ], libraries = ['z' ])],
8081 license = "BSD License" ,
8182 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'
8386 )
0 commit comments