Permalink
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (62 sloc) 2.32 KB
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import os
import sys
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def run_tests(self):
import shlex
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)
def get_version():
basedir = os.path.dirname(__file__)
with open(os.path.join(basedir, 'textile/version.py')) as f:
variables = {}
exec(f.read(), variables)
return variables.get('VERSION')
raise RuntimeError('No version info found.')
setup(
name='textile',
version=get_version(),
author='Dennis Burke',
author_email='ikirudennis@gmail.com',
description='Textile processing for python.',
url='http://github.com/textile/python-textile',
packages=find_packages(),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
keywords='textile,text,html markup',
install_requires=['six',],
extras_require={
':python_version=="2.6"': ['ordereddict>=1.1'],
'develop': ['regex', 'pytest', 'pytest-cov'],
},
entry_points={'console_scripts': ['pytextile=textile.__main__:main']},
setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-cov'],
cmdclass = {'test': PyTest},
include_package_data=True,
zip_safe=False,
)