<commit_before>#!/usr/bin/env python
from distutils.core import setup
from distutils.extension import Extension

try:
    from Cython.Distutils import build_ext
    have_cython = True
except ImportError:
    have_cython = False

c_files = [
    "deps/ccv/lib/ccv_bbf.c",
    "deps/ccv/lib/ccv_cache.c",
    "deps/ccv/lib/ccv_io.c",
    "deps/ccv/lib/ccv_memory.c",
    "deps/ccv/lib/ccv_resample.c",
    "deps/ccv/lib/ccv_util.c",
    "deps/ccv/lib/3rdparty/sha1/sha1.c",
]

if have_cython:
    ccv_files = ["ccv.pyx"]
    cmdclass = {'build_ext': build_ext}
else:
    ccv_files = ["ccv.c"]
    cmdclass = {}

ext_modules = [ Extension(
                    "ccv",
                    ccv_files + c_files,
                    include_dirs=["deps/ccv/lib"],
                    define_macros=[("HAVE_LIBPNG", 1), ("HAVE_LIBJPEG", 1)],
                    libraries=["png", "jpeg"],
                    extra_compile_args=['-ffast-math', '-fPIC'],
                )
              ]

setup(
    name = 'ccv',
    version = '1.0.0',
    packages=['ccv'],
    ext_modules = ext_modules,
    author='huangyi',
    author_email='<EMAIL>',
    url = 'https://github.com/yihuang/pyccv',
    description = 'python binding of ccv library, written with cython.',
    cmdclass=cmdclass,
    long_description='',
)<commit_msg>Don't depend on png and jpeg on python-for-android<commit_after>#!/usr/bin/env python
from distutils.core import setup
from distutils.extension import Extension

try:
    from Cython.Distutils import build_ext
    have_cython = True
except ImportError:
    have_cython = False

c_files = [
    "deps/ccv/lib/ccv_bbf.c",
    "deps/ccv/lib/ccv_cache.c",
    "deps/ccv/lib/ccv_io.c",
    "deps/ccv/lib/ccv_memory.c",
    "deps/ccv/lib/ccv_resample.c",
    "deps/ccv/lib/ccv_util.c",
    "deps/ccv/lib/3rdparty/sha1/sha1.c",
]

if have_cython:
    ccv_files = ["ccv.pyx"]
    cmdclass = {'build_ext': build_ext}
    extra_args = {
        'define_macros': [("HAVE_LIBPNG", 1), ("HAVE_LIBJPEG", 1)],
        'libraries': ["png", "jpeg"],
    }
else:
    ccv_files = ["ccv.c"]
    cmdclass = {}
    extra_args = {}

ext_modules = [ Extension(
                    "ccv",
                    ccv_files + c_files,
                    include_dirs=["deps/ccv/lib"],
                    extra_compile_args=['-ffast-math', '-fPIC'],
                    **extra_args
                )
              ]

setup(
    name = 'ccv',
    version = '1.0.0',
    packages=['ccv'],
    ext_modules = ext_modules,
    author='huangyi',
    author_email='<EMAIL>',
    url = 'https://github.com/yihuang/pyccv',
    description = 'python binding of ccv library, written with cython.',
    cmdclass=cmdclass,
    long_description='',
)
{'fraction_non_alphanumeric': 0.1511585141596175, 'fraction_numerical': 0.005884516366311144, 'mean_word_length': 2.2929782082324457, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4748434', 'n_tokens_mistral': 1040, 'n_tokens_neox': 1013, 'n_words': 166}