<commit_before>import platform
import struct
from os.path import join

from setuptools import setup
from setuptools.extension import Extension

import numpy

SYSTEM = platform.system()
print('SYSTEM = {}'.format(SYSTEM))


try:
    import Cython.Distutils  # noqa
    USE_CYTHON = True
except ImportError:
    USE_CYTHON = False
print("USE_CYTHON = {}".format(USE_CYTHON))


if USE_CYTHON:
    LIGHTPIPES = 'LightPipes.pyx'
else:
    # assume a 'LightPipes.cpp' compiled with:
    # 'cython -t --cplus LightPipes.pyx'
    LIGHTPIPES = 'LightPipes.cpp'
sources = [
    LIGHTPIPES,
    'fresnl.cpp',
    'subs.cpp',
    'lpspy.cpp'
]


data_files = None
if SYSTEM == 'Linux':
    ext = Extension(
        'LightPipes', sources,
        include_dirs=[numpy.get_include()],
        library_dirs=['/usr/local/lib/'],
        libraries=['fftw3'],
        language="c++",
    )
elif SYSTEM == 'Windows':
    bits = struct.calcsize("P")*8
    if bits == 32:
        fftw3dir = 'fftw3_win32'
    else:
        fftw3dir = 'fftw3_win64'
    data_files = [('lib/site-packages', [join(fftw3dir, 'libfftw3-3.dll')])]
    ext = Extension(
        'LightPipes', sources,
        include_dirs=[numpy.get_include()],
        library_dirs=[fftw3dir],
        libraries=['libfftw3-3'],
        language="c++",
    )
elif SYSTEM == 'Darwin':
    pass
else:
    pass


if USE_CYTHON:
    from Cython.Build import cythonize
    extensions = cythonize([ext])
else:
    extensions = [ext]


setup(
    name='LightPipes',
    install_requires=["numpy>=1.7.1"],
    version='1.1.0',
    description='LightPipes for Python optical toolbox',
    author='<NAME>',
    author_email='<EMAIL>',
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    url='https://github.com/opticspy/lightpipes',
    download_url='https://github.com/opticspy/lightpipes/releases',
    platforms=['win64', 'win32', 'linux'],
    ext_modules=extensions,<commit_msg>update setup.py for macos<commit_after>import platform
import struct
from os.path import join

from setuptools import setup
from setuptools.extension import Extension

import numpy

SYSTEM = platform.system()
print('SYSTEM = {}'.format(SYSTEM))


try:
    import Cython.Distutils  # noqa
    USE_CYTHON = True
except ImportError:
    USE_CYTHON = False
print("USE_CYTHON = {}".format(USE_CYTHON))


if USE_CYTHON:
    LIGHTPIPES = 'LightPipes.pyx'
else:
    # assume a 'LightPipes.cpp' compiled with:
    # 'cython -t --cplus LightPipes.pyx'
    LIGHTPIPES = 'LightPipes.cpp'
sources = [
    LIGHTPIPES,
    'fresnl.cpp',
    'subs.cpp',
    'lpspy.cpp'
]


data_files = None
if SYSTEM == 'Windows':
    bits = struct.calcsize("P")*8
    if bits == 32:
        fftw3dir = 'fftw3_win32'
    else:
        fftw3dir = 'fftw3_win64'
    data_files = [('lib/site-packages', [join(fftw3dir, 'libfftw3-3.dll')])]
    ext = Extension(
        'LightPipes', sources,
        include_dirs=[numpy.get_include()],
        library_dirs=[fftw3dir],
        libraries=['libfftw3-3'],
        language="c++",
    )
elif SYSTEM == 'Linux':
    ext = Extension(
        'LightPipes', sources,
        include_dirs=[numpy.get_include()],
        library_dirs=['/usr/local/lib/'],
        libraries=['fftw3'],
        language="c++",
    )
elif SYSTEM == 'Darwin':
    ext = Extension(
        'LightPipes', sources,
        include_dirs=[numpy.get_include()],
        libraries=['fftw3'],
        language="c++",
    )
else:
    # unknown platform
    ext = Extension(
        'LightPipes', sources,
        include_dirs=[numpy.get_include()],
        library_dirs=['/usr/local/lib/'],
        libraries=['fftw3'],
        language="c++",
    )


if USE_CYTHON:
    from Cython.Build import cythonize
    extensions = cythonize([ext])
else:
    extensions = [ext]


setup(
    name='LightPipes',
    install_requires=["numpy>=1.7.1"],
    version='1.1.0',
    description='LightPipes for Python optical toolbox',
    author='<NAME>',
    author_email='<EMAIL>',
    license='MIT',
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],
    url='https://github.com/opticspy/lightpipes',
    download_url='https://github.com/opticspy/lightpipes/releases',
    platforms=['win64', 'win32', 'linux'],
    ext_modules=extensions,
{'fraction_non_alphanumeric': 0.1512826134619601, 'fraction_numerical': 0.015786011839508878, 'mean_word_length': 2.956634865568083, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4076934', 'n_tokens_mistral': 1624, 'n_tokens_neox': 1575, 'n_words': 307}