File: setup.py

package info (click to toggle)
python-cmarkgfm 0.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,252 kB
  • sloc: ansic: 9,412; python: 251; makefile: 9
file content (62 lines) | stat: -rwxr-xr-x 2,116 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import platform
import sys
from setuptools import setup, find_packages
from setuptools.command.build_ext import build_ext
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
    long_description = f.read()


class custom_build_ext(build_ext):
    """Custom build_ext command that uses mingw32 when building on Python2.7
    in Windows."""

    def finalize_options(self):
        build_ext.finalize_options(self)
        is_windows = platform.system() == 'Windows'
        is_py2 = sys.version_info[0] < 3
        is_py34 = sys.version_info[:2] == (3, 4)
        if self.compiler is None and is_windows and (is_py2 or is_py34):
            self.compiler = 'mingw32'


setup(
    name='cmarkgfm',
    version='0.4.2',
    description="Minimal bindings to GitHub's fork of cmark",
    long_description=long_description,
    url='https://github.com/jonparrott/cmarkgfm',
    author='The Python Packaging Authority',
    author_email='thea@skeletonbuddy.com, pypa-dev@googlegroups.com',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'Topic :: Software Development :: Build Tools',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    package_dir={'': 'src'},
    packages=find_packages(where='src'),
    cffi_modules=["src/cmarkgfm/build_cmark.py:ffibuilder"],
    setup_requires=["cffi>=1.0.0"],
    install_requires=["cffi>=1.0.0"],
    project_urls={
        'Bug Reports': 'https://github.com/jonparrott/cmarkgfm/issues',
        'Funding': 'https://donate.pypi.org',
        'Source': 'https://github.com/jonparrott/cmarkgfm',
    },
    zip_safe=False,
    include_package_data=True,
    cmdclass={
        'build_ext': custom_build_ext,
    },
)