207 lines
		
	
	
		
			8.9 KiB
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			207 lines
		
	
	
		
			8.9 KiB
		
	
	
	
		
			Python
		
	
	
	
"""
 | 
						|
    setup file for 'py' package based on:
 | 
						|
 | 
						|
        https://codespeak.net/svn/py/release/0.9.x, revision=57387
 | 
						|
 | 
						|
    autogenerated by gensetup.py
 | 
						|
"""
 | 
						|
import os, sys
 | 
						|
        
 | 
						|
if 1: # set to zero if you want plain distutils
 | 
						|
    import ez_setup
 | 
						|
    ez_setup.use_setuptools()
 | 
						|
    from setuptools import setup, Extension
 | 
						|
else:
 | 
						|
    from distutils.core import setup, Extension
 | 
						|
        
 | 
						|
def main():
 | 
						|
    setup(cmdclass=cmdclass,
 | 
						|
        name='py',
 | 
						|
        description='py lib: agile development and test support library',
 | 
						|
        version='0.9.2-alpha-6', 
 | 
						|
        url='http://pylib.org', 
 | 
						|
        license='MIT license',
 | 
						|
        platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], 
 | 
						|
        author='holger krekel, Guido Wesdorp, Carl Friedrich Bolz, Armin Rigo, Maciej Fijalkowski & others',
 | 
						|
        author_email='holger at merlinux.eu, py-dev at codespeak.net',
 | 
						|
        ext_modules = [Extension("py.c-extension.greenlet.greenlet", 
 | 
						|
            ["py/c-extension/greenlet/greenlet.c"]),],
 | 
						|
        
 | 
						|
        py_modules=['_findpy'],
 | 
						|
        long_description='the py lib is a development support library featuring py.test, ad-hoc distributed execution, micro-threads and svn abstractions.',
 | 
						|
        classifiers=['Development Status :: 3 - Alpha',
 | 
						|
                     'Intended Audience :: Developers',
 | 
						|
                     'License :: OSI Approved :: MIT License',
 | 
						|
                     'Operating System :: POSIX',
 | 
						|
                     'Operating System :: Microsoft :: Windows',
 | 
						|
                     'Operating System :: MacOS :: MacOS X',
 | 
						|
                     'Topic :: Software Development :: Testing',
 | 
						|
                     'Topic :: Software Development :: Libraries',
 | 
						|
                     'Topic :: System :: Distributed Computing',
 | 
						|
                     'Topic :: Utilities',
 | 
						|
                     'Programming Language :: Python'],
 | 
						|
        scripts=['py/bin/py.cleanup',
 | 
						|
                 'py/bin/py.countloc',
 | 
						|
                 'py/bin/py.lookup',
 | 
						|
                 'py/bin/py.rest',
 | 
						|
                 'py/bin/py.test'],
 | 
						|
        packages=['py',
 | 
						|
                  'py.apigen',
 | 
						|
                  'py.apigen.rest',
 | 
						|
                  'py.apigen.rest.testing',
 | 
						|
                  'py.apigen.source',
 | 
						|
                  'py.apigen.source.testing',
 | 
						|
                  'py.apigen.testing',
 | 
						|
                  'py.apigen.tracer',
 | 
						|
                  'py.apigen.tracer.testing',
 | 
						|
                  'py.apigen.tracer.testing.package',
 | 
						|
                  'py.apigen.tracer.testing.package.submodule',
 | 
						|
                  'py.apigen.tracer.testing.package.submodule.pak',
 | 
						|
                  'py.builtin',
 | 
						|
                  'py.builtin.testing',
 | 
						|
                  'py.code',
 | 
						|
                  'py.code.testing',
 | 
						|
                  'py.compat',
 | 
						|
                  'py.compat.testing',
 | 
						|
                  'py.doc',
 | 
						|
                  'py.execnet',
 | 
						|
                  'py.execnet.script',
 | 
						|
                  'py.execnet.testing',
 | 
						|
                  'py.io',
 | 
						|
                  'py.io.test',
 | 
						|
                  'py.log',
 | 
						|
                  'py.log.testing',
 | 
						|
                  'py.magic',
 | 
						|
                  'py.magic.testing',
 | 
						|
                  'py.misc',
 | 
						|
                  'py.misc.cmdline',
 | 
						|
                  'py.misc.testing',
 | 
						|
                  'py.path',
 | 
						|
                  'py.path.gateway',
 | 
						|
                  'py.path.local',
 | 
						|
                  'py.path.local.testing',
 | 
						|
                  'py.path.svn',
 | 
						|
                  'py.path.svn.testing',
 | 
						|
                  'py.path.testing',
 | 
						|
                  'py.process',
 | 
						|
                  'py.process.testing',
 | 
						|
                  'py.rest',
 | 
						|
                  'py.rest.testing',
 | 
						|
                  'py.test',
 | 
						|
                  'py.test.rsession',
 | 
						|
                  'py.test.rsession.testing',
 | 
						|
                  'py.test.rsession.webdata',
 | 
						|
                  'py.test.terminal',
 | 
						|
                  'py.test.testing',
 | 
						|
                  'py.test.testing.import_test.package',
 | 
						|
                  'py.test.web',
 | 
						|
                  'py.thread',
 | 
						|
                  'py.thread.testing',
 | 
						|
                  'py.tool',
 | 
						|
                  'py.tool.testing',
 | 
						|
                  'py.xmlobj',
 | 
						|
                  'py.xmlobj.testing'],
 | 
						|
        package_data={'py': ['LICENSE',
 | 
						|
                             'apigen/api.js',
 | 
						|
                             'apigen/apigen.js',
 | 
						|
                             'apigen/source/index.cgi',
 | 
						|
                             'apigen/style.css',
 | 
						|
                             'apigen/todo-apigen.txt',
 | 
						|
                             'apigen/todo.txt',
 | 
						|
                             'bin/py.cleanup',
 | 
						|
                             'bin/py.countloc',
 | 
						|
                             'bin/py.lookup',
 | 
						|
                             'bin/py.rest',
 | 
						|
                             'bin/py.test',
 | 
						|
                             'c-extension/greenlet/README.txt',
 | 
						|
                             'c-extension/greenlet/greenlet.c',
 | 
						|
                             'c-extension/greenlet/greenlet.h',
 | 
						|
                             'c-extension/greenlet/slp_platformselect.h',
 | 
						|
                             'c-extension/greenlet/switch_amd64_unix.h',
 | 
						|
                             'c-extension/greenlet/switch_ppc_macosx.h',
 | 
						|
                             'c-extension/greenlet/switch_ppc_unix.h',
 | 
						|
                             'c-extension/greenlet/switch_s390_unix.h',
 | 
						|
                             'c-extension/greenlet/switch_sparc_sun_gcc.h',
 | 
						|
                             'c-extension/greenlet/switch_x86_msvc.h',
 | 
						|
                             'c-extension/greenlet/switch_x86_unix.h',
 | 
						|
                             'compat/LICENSE',
 | 
						|
                             'compat/testing/test_doctest.txt',
 | 
						|
                             'compat/testing/test_doctest2.txt',
 | 
						|
                             'doc/TODO.txt',
 | 
						|
                             'doc/apigen.txt',
 | 
						|
                             'doc/bin.txt',
 | 
						|
                             'doc/code.txt',
 | 
						|
                             'doc/coding-style.txt',
 | 
						|
                             'doc/contact.txt',
 | 
						|
                             'doc/download.txt',
 | 
						|
                             'doc/execnet.txt',
 | 
						|
                             'doc/future.txt',
 | 
						|
                             'doc/future/code_template.txt',
 | 
						|
                             'doc/future/planning.txt',
 | 
						|
                             'doc/future/pylib_pypy.txt',
 | 
						|
                             'doc/future/rsession_todo.txt',
 | 
						|
                             'doc/greenlet.txt',
 | 
						|
                             'doc/impl-test.txt',
 | 
						|
                             'doc/index.txt',
 | 
						|
                             'doc/io.txt',
 | 
						|
                             'doc/links.txt',
 | 
						|
                             'doc/log.txt',
 | 
						|
                             'doc/misc.txt',
 | 
						|
                             'doc/path.txt',
 | 
						|
                             'doc/release-0.9.0.txt',
 | 
						|
                             'doc/release-0.9.1.txt',
 | 
						|
                             'doc/release-0.9.2.txt',
 | 
						|
                             'doc/style.css',
 | 
						|
                             'doc/test.txt',
 | 
						|
                             'doc/why_py.txt',
 | 
						|
                             'doc/xml.txt',
 | 
						|
                             'env.cmd',
 | 
						|
                             'execnet/NOTES',
 | 
						|
                             'misc/testing/data/svnlookrepo.dump',
 | 
						|
                             'path/gateway/TODO.txt',
 | 
						|
                             'path/svn/quoting.txt',
 | 
						|
                             'path/svn/testing/repotest.dump',
 | 
						|
                             'rest/rest.sty.template',
 | 
						|
                             'rest/testing/data/example.rst2pdfconfig',
 | 
						|
                             'rest/testing/data/example1.dot',
 | 
						|
                             'rest/testing/data/formula.txt',
 | 
						|
                             'rest/testing/data/formula1.txt',
 | 
						|
                             'rest/testing/data/graphviz.txt',
 | 
						|
                             'rest/testing/data/part1.txt',
 | 
						|
                             'rest/testing/data/part2.txt',
 | 
						|
                             'rest/testing/data/tocdepth.rst2pdfconfig',
 | 
						|
                             'test/rsession/webdata/index.html',
 | 
						|
                             'test/rsession/webdata/source.js']},
 | 
						|
        zip_safe=False,
 | 
						|
    )
 | 
						|
 | 
						|
# on windows we need to hack up the to-be-installed scripts
 | 
						|
from distutils.command.install_scripts import install_scripts
 | 
						|
class my_install_scripts(install_scripts):
 | 
						|
    def run(self):
 | 
						|
        install_scripts.run(self)
 | 
						|
        #print self.outfiles
 | 
						|
        for fn in self.outfiles:
 | 
						|
            basename = os.path.basename(fn)
 | 
						|
            if "." in basename:
 | 
						|
                #print "tackling", fn
 | 
						|
                newbasename = basename.replace(".", "_")
 | 
						|
                newfn = os.path.join(os.path.dirname(fn), newbasename)
 | 
						|
                if os.path.exists(newfn):
 | 
						|
                    os.remove(newfn)
 | 
						|
                os.rename(fn, newfn)
 | 
						|
                newname = fn + ".cmd"
 | 
						|
                if os.path.exists(newname):
 | 
						|
                   os.remove(newname)
 | 
						|
                f = open(newname, 'w')
 | 
						|
                f.write("@echo off\n")
 | 
						|
                f.write('python "%%~dp0\%s" %%*\n' % newbasename)
 | 
						|
                f.close()
 | 
						|
if sys.platform == "win32":
 | 
						|
    cmdclass = {'install_scripts': my_install_scripts}
 | 
						|
else:
 | 
						|
    cmdclass = {}
 | 
						|
        
 | 
						|
if __name__ == '__main__':
 | 
						|
    main()
 | 
						|
         |