Edgewall Software

Changeset 1137


Ignore:
Timestamp:
Oct 24, 2010, 11:09:36 PM (13 years ago)
Author:
hodgestar
Message:

py3k branch: add 2to3 build infrastructure to setup.py (this pulls the tests into the source distribution so that tests can be run after building with 2to3)

Location:
branches/experimental/py3k
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • branches/experimental/py3k/MANIFEST.in

    r594 r1137  
    33include doc/api/*.*
    44include doc/*.html
     5recursive-include genshi/template/tests/templates *.html *.txt
  • branches/experimental/py3k/setup.py

    r1125 r1137  
    4242        try:
    4343            build_ext.run(self)
    44         except DistutilsPlatformError, e:
     44        except DistutilsPlatformError:
     45            _etype, e, _tb = sys.exc_info()
    4546            self._unavailable(e)
    4647
     
    5051            global _speedup_available
    5152            _speedup_available = True
    52         except CCompilerError, e:
     53        except CCompilerError:
     54            _etype, e, _tb = sys.exc_info()
    5355            self._unavailable(e)
    5456
     
    8789
    8890
     91# Use 2to3 if we're running under Python 3 (with Distribute)
     92extra = {}
     93if sys.version_info >= (3,):
     94    extra['use_2to3'] = True
     95    extra['convert_2to3_doctests'] = []
     96    extra['use_2to3_fixers'] = ['fixes']
     97    # include tests for python3 setup.py test
     98    packages = [
     99        'genshi', 'genshi.filters', 'genshi.template',
     100        'genshi.tests', 'genshi.filters.tests',
     101        'genshi.template.tests',
     102        'genshi.template.tests.templates',
     103    ]
     104    # Install genshi template tests
     105    extra['include_package_data'] = True
     106else:
     107    packages = ['genshi', 'genshi.filters', 'genshi.template']
     108
     109
    89110setup(
    90111    name = 'Genshi',
     
    109130        'Operating System :: OS Independent',
    110131        'Programming Language :: Python',
     132        'Programming Language :: Python :: 3',
    111133        'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
    112134        'Topic :: Software Development :: Libraries :: Python Modules',
     
    115137    ],
    116138    keywords = ['python.templating.engines'],
    117     packages = ['genshi', 'genshi.filters', 'genshi.template'],
     139    packages = packages,
    118140    test_suite = 'genshi.tests.suite',
    119141
     
    133155
    134156    features = {'speedups': speedups},
    135     cmdclass = cmdclass
     157    cmdclass = cmdclass,
     158
     159    **extra
    136160)
Note: See TracChangeset for help on using the changeset viewer.