Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Added 2to3 support to setup for compatability with Python 3.x #5

Merged
merged 1 commit into from

5 participants

@ArmstrongJ

This change simply implements the 2to3 hook available to convert the package to Python 3.x during the execution of setup.py. No further changes seem necessary to support 3.x.

@ArmstrongJ

Chris, I was wondering if you've considered this pull request yet. I'm presenting a poster this year at PyCon of a package that relies on python-textile. I was hoping this minor change could get accepted and possibly a minor version increment could be submitted to PyPI prior to the conference at the beginning of March. Let me know if you'd consider a new release with 2to3 included in setup.py.

@vladimiroff

+1 for this Pull Request.

@bow

Another +1. I'd love to see a python3-compatible python-textile.

@xordoquy

Would be nice too.

@sebix sebix merged commit 4efbf11 into sebix:master
@sebix
Owner

Sorry for the long wait, here it comes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 12, 2011
This page is out of date. Refresh to see the latest.
Showing with 33 additions and 27 deletions.
  1. +33 −27 setup.py
View
60 setup.py
@@ -1,27 +1,33 @@
-from setuptools import setup, find_packages
-
-version = '2.1.5'
-
-setup(
- name='textile',
- version=version,
- description='Textile processing for python.',
- author='Chris Drackett',
- author_email='chris@chrisdrackett.com',
- url='http://github.com/chrisdrackett/python-textile',
- packages=find_packages(),
- classifiers=[
- 'Development Status :: 3 - Alpha',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: BSD License',
- 'Operating System :: OS Independent',
- 'Programming Language :: Python',
- 'Topic :: Software Development :: Libraries :: Python Modules',
- ],
- keywords='textile,text',
- test_suite = 'nose.collector',
- tests_require = ['nose'],
- include_package_data=True,
- zip_safe=False,
-)
+from setuptools import setup, find_packages
+import sys
+
+version = '2.1.5'
+
+extra = {}
+if sys.version_info >= (3,):
+ extra['use_2to3'] = True
+
+setup(
+ name='textile',
+ version=version,
+ description='Textile processing for python.',
+ author='Chris Drackett',
+ author_email='chris@chrisdrackett.com',
+ url='http://github.com/chrisdrackett/python-textile',
+ packages=find_packages(),
+ classifiers=[
+ 'Development Status :: 3 - Alpha',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ ],
+ keywords='textile,text',
+ test_suite = 'nose.collector',
+ tests_require = ['nose'],
+ include_package_data=True,
+ zip_safe=False,
+ **extra
+)
Something went wrong with that request. Please try again.