| 1 | from setuptools import setup, find_packages, Command |
| 2 | import io |
| 3 | from os import path |
| 4 | |
| 5 | |
| 6 | class Test(Command): |
| 7 | user_options = [] |
| 8 | |
| 9 | def initialize_options(self): |
| 10 | pass |
| 11 | |
| 12 | def finalize_options(self): |
| 13 | pass |
| 14 | |
| 15 | def run(self): |
| 16 | import subprocess |
| 17 | import sys |
| 18 | errno = subprocess.call([ |
| 19 | sys.executable, 'commonmark/tests/run_spec_tests.py']) |
| 20 | raise SystemExit(errno) |
| 21 | |
| 22 | |
| 23 | tests_require = [ |
| 24 | 'flake8==3.9.2', |
| 25 | 'hypothesis==4.24.4', |
| 26 | ] |
| 27 | |
| 28 | |
| 29 | this_directory = path.abspath(path.dirname(__file__)) |
| 30 | with io.open(path.join(this_directory, 'README.rst'), encoding='utf-8') as f: |
| 31 | long_description = f.read() |
| 32 | |
| 33 | |
| 34 | setup( |
| 35 | name="commonmark", |
| 36 | packages=find_packages(exclude=['tests']), |
| 37 | version="0.9.2", |
| 38 | license="BSD-3-Clause", |
| 39 | description="Python parser for the CommonMark Markdown spec", |
| 40 | long_description=long_description, |
| 41 | long_description_content_type='text/x-rst', |
| 42 | author="Bibek Kafle <[email protected]>, " + |
| 43 | "Roland Shoemaker <[email protected]>", |
| 44 | author_email="[email protected]", |
| 45 | url="https://github.com/rtfd/commonmark.py", |
| 46 | keywords=["markup", "markdown", "commonmark"], |
| 47 | entry_points={ |
| 48 | 'console_scripts': [ |
| 49 | 'cmark = commonmark.cmark:main', |
| 50 | ] |
| 51 | }, |
| 52 | cmdclass={'test': Test}, |
| 53 | install_requires=[ |
| 54 | 'future>=0.14.0;python_version<"3"', |
| 55 | ], |
| 56 | tests_require=tests_require, |
| 57 | extras_require={'test': tests_require}, |
| 58 | classifiers=[ |
| 59 | "Programming Language :: Python", |
| 60 | "Programming Language :: Python :: 2", |
| 61 | "Programming Language :: Python :: 3", |
| 62 | "Development Status :: 5 - Production/Stable", |
| 63 | "Environment :: Other Environment", |
| 64 | "Environment :: Console", |
| 65 | "Intended Audience :: Developers", |
| 66 | "License :: OSI Approved :: BSD License", |
| 67 | "Operating System :: OS Independent", |
| 68 | "Topic :: Documentation", |
| 69 | "Topic :: Internet :: WWW/HTTP :: Dynamic Content", |
| 70 | "Topic :: Software Development :: Documentation", |
| 71 | "Topic :: Software Development :: Libraries :: Python Modules", |
| 72 | "Topic :: Text Processing :: Markup", |
| 73 | "Topic :: Utilities"]) |