|
| 1 | +"""A setuptools based setup module. |
| 2 | +
|
| 3 | +See: |
| 4 | +https://packaging.python.org/en/latest/distributing.html |
| 5 | +https://github.com/chdemko/pandoc-codeblock-include |
| 6 | +""" |
| 7 | + |
| 8 | +# Always prefer setuptools over distutils |
| 9 | +from setuptools import setup, find_packages |
| 10 | + |
| 11 | +# To use a consistent encoding |
| 12 | +from codecs import open |
| 13 | +from os import path, makedirs |
| 14 | + |
| 15 | +here = path.abspath(path.dirname(__file__)) |
| 16 | + |
| 17 | +# Get the long description from the README file |
| 18 | +try: |
| 19 | + import pypandoc |
| 20 | + long_description = pypandoc.convert('README.md', 'rst') |
| 21 | +except (IOError, ImportError): |
| 22 | + with open(path.join(here, 'README.md'), encoding='utf-8') as f: |
| 23 | + long_description = f.read() |
| 24 | + |
| 25 | +setup( |
| 26 | + name='pandoc-codeblock-include', |
| 27 | + |
| 28 | + # Versions should comply with PEP440. For a discussion on single-sourcing |
| 29 | + # the version across setup.py and the project code, see |
| 30 | + # https://packaging.python.org/en/latest/single_source_version.html |
| 31 | + version='0.0.1', |
| 32 | + |
| 33 | + # The project's description |
| 34 | + description='A pandoc filter for including file in block code', |
| 35 | + long_description=long_description, |
| 36 | + |
| 37 | + # The project's main homepage. |
| 38 | + url='https://github.com/chdemko/pandoc-codeblock-include', |
| 39 | + |
| 40 | + # The project's download page |
| 41 | + download_url = 'https://github.com/chdemko/pandoc-codeblock-include/archive/master.zip', |
| 42 | + |
| 43 | + # Author details |
| 44 | + author='Christophe Demko', |
| 45 | + |
| 46 | + |
| 47 | + # Maintainer details |
| 48 | + maintainer='Christophe Demko', |
| 49 | + maintainer_email='[email protected]', |
| 50 | + |
| 51 | + # Choose your license |
| 52 | + license='BSD-3-Clause', |
| 53 | + |
| 54 | + # See https://pypi.python.org/pypi?%3Aaction=list_classifiers |
| 55 | + classifiers=[ |
| 56 | + # How mature is this project? Common values are |
| 57 | + # 3 - Alpha |
| 58 | + # 4 - Beta |
| 59 | + # 5 - Production/Stable |
| 60 | + 'Development Status :: 3 - Alpha', |
| 61 | + |
| 62 | + # Specify the OS |
| 63 | + 'Operating System :: OS Independent', |
| 64 | + |
| 65 | + # Indicate who your project is intended for |
| 66 | + 'Environment :: Console', |
| 67 | + 'Intended Audience :: End Users/Desktop', |
| 68 | + 'Intended Audience :: Developers', |
| 69 | + 'Topic :: Software Development :: Build Tools', |
| 70 | + |
| 71 | + # Specify the Python versions you support here. In particular, ensure |
| 72 | + # that you indicate whether you support Python 2, Python 3 or both. |
| 73 | + 'Programming Language :: Python :: 2.7', |
| 74 | + 'Programming Language :: Python :: 3.4', |
| 75 | + 'Programming Language :: Python :: 3.5', |
| 76 | + ], |
| 77 | + |
| 78 | + # What does your project relate to? |
| 79 | + keywords='pandoc filters codeblock include', |
| 80 | + |
| 81 | + # Alternatively, if you want to distribute just a my_module.py, uncomment |
| 82 | + # this: |
| 83 | + py_modules=["pandoc_codeblock_include"], |
| 84 | + |
| 85 | + # To provide executable scripts, use entry points in preference to the |
| 86 | + # "scripts" keyword. Entry points provide cross-platform support and allow |
| 87 | + # pip to create the appropriate form of executable for the target platform. |
| 88 | + entry_points={ |
| 89 | + 'console_scripts': [ |
| 90 | + 'pandoc-codeblock-include = pandoc_codeblock_include:main', |
| 91 | + ], |
| 92 | + }, |
| 93 | + |
| 94 | + |
| 95 | + # List run-time dependencies here. These will be installed by pip when |
| 96 | + # your project is installed. For an analysis of "install_requires" vs pip's |
| 97 | + # requirements files see: |
| 98 | + # https://packaging.python.org/en/latest/requirements.html |
| 99 | + install_requires=[ |
| 100 | + 'panflute>=1.10', |
| 101 | + 'pypandoc>=1.4' |
| 102 | + ], |
| 103 | + |
| 104 | + # List additional groups of dependencies here (e.g. development |
| 105 | + # dependencies). You can install these using the following syntax, |
| 106 | + # for example: |
| 107 | + # $ pip install -e .[dev,test] |
| 108 | + extras_require={ |
| 109 | + 'dev': ['check-manifest'], |
| 110 | + 'test': ['coverage'], |
| 111 | + }, |
| 112 | + |
| 113 | + # packages=find_packages(), |
| 114 | + # include_package_data = True, |
| 115 | + |
| 116 | + setup_requires=['pytest-runner'], |
| 117 | + tests_require=['pytest', 'coverage'], |
| 118 | +) |
0 commit comments