Commits

Jonathan Eunice committed 3894e71

Updated setup to deal with reported packaging error for PY3. The PY3 version of guess_language-spirit now on PyPI, so installing from there.

Comments (0)

Files changed (1)

 from setuptools import setup
 import sys
 
-_PY3 = sys.version_info[0] >= 3
-
-
-# A little black magic to install a different version of guess_language for py3.
-# The updated version is not available on PyPI (yet), so must install directly
-# from its code repository.
-reqs = ['Markdown>=2.0', 'namedentities==1.5.2']
-if _PY3:
-    reqs.append('guess_language-spirit')
-    dlinks = ['https://bitbucket.org/spirit/guess_language/downloads/guess_language-spirit-0.5a4.tar.bz2#egg=guess_language-spirit']
-else:
-    # But if py2, just get everything from PyPI, as usual.
-    reqs.append('guess_language>=0.2')
-    dlinks = []
+# Choose version of guess-language library (two separate implementations)
+_PYLE26 = sys.version_info[0:2] <= (2,6)
+guess_language = 'guess-language>=0.2' if _PYLE26 else 'guess_language-spirit>=0.5a4'
 
 setup(
     name='mdx_smartypants',
-    version='1.5.0',
+    version='1.5.1',
     author='Jonathan Eunice',
     author_email='jonathan.eunice@gmail.com',
     description='Python-Markdown extension using smartypants to emit typographically nicer ("curly") quotes, proper ("em" and "en") dashes, etc.',
     long_description=open('README.rst').read(),
     url='http://bitbucket.org/jeunice/mdx_smartypants',
     packages=['mdx_smartypants'],
-    install_requires=reqs,
-    dependency_links=dlinks,
+
+    install_requires=['Markdown>=2.0', 'namedentities==1.5.2', guess_language],
     tests_require = ['tox', 'pytest', 'six', 'textdata'],
     zip_safe = False,
     keywords='markdown smartypants extension curly quotes typographic',