Browse Source

Start work on support for Python 3.5 (for #101)

tags/v0.4.1
Ben Kurtovic 9 years ago
parent
commit
04188b590e
2 changed files with 5 additions and 3 deletions
  1. +1
    -0
      .travis.yml
  2. +4
    -3
      setup.py

+ 1
- 0
.travis.yml View File

@@ -5,6 +5,7 @@ python:
- 3.2 - 3.2
- 3.3 - 3.3
- 3.4 - 3.4
- 3.5
install: install:
- pip install coveralls - pip install coveralls
- python setup.py build - python setup.py build


+ 4
- 3
setup.py View File

@@ -36,14 +36,14 @@ from setuptools import setup, find_packages, Extension
from mwparserfromhell import __version__ from mwparserfromhell import __version__
from mwparserfromhell.compat import py26, py3k from mwparserfromhell.compat import py26, py3k


with open("README.rst", **{'encoding':'utf-8'} if py3k else {}) as fp:
with open("README.rst", **({'encoding':'utf-8'} if py3k else {})) as fp:
long_docs = fp.read() long_docs = fp.read()


tokenizer = Extension("mwparserfromhell.parser._tokenizer", tokenizer = Extension("mwparserfromhell.parser._tokenizer",
sources=["mwparserfromhell/parser/tokenizer.c"], sources=["mwparserfromhell/parser/tokenizer.c"],
depends=["mwparserfromhell/parser/tokenizer.h"]) depends=["mwparserfromhell/parser/tokenizer.h"])


use_extension=True
use_extension = True


# Allow env var WITHOUT_EXTENSION and args --with[out]-extension # Allow env var WITHOUT_EXTENSION and args --with[out]-extension
if '--without-extension' in sys.argv: if '--without-extension' in sys.argv:
@@ -53,7 +53,7 @@ elif '--with-extension' in sys.argv:
elif os.environ.get('WITHOUT_EXTENSION', '0') == '1': elif os.environ.get('WITHOUT_EXTENSION', '0') == '1':
use_extension = False use_extension = False


# Remove the command line argument as it isnt understood by
# Remove the command line argument as it isn't understood by
# setuptools/distutils # setuptools/distutils
sys.argv = [arg for arg in sys.argv sys.argv = [arg for arg in sys.argv
if not arg.startswith('--with') if not arg.startswith('--with')
@@ -126,6 +126,7 @@ optional_compile_setup(
"Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Topic :: Text Processing :: Markup" "Topic :: Text Processing :: Markup"
], ],
) )

Loading…
Cancel
Save