<commit_before># encoding: utf-8

__docformat__ = "restructuredtext en"

#----------------------------------------------------------------------------
#  Copyright (C) 2008  The IPython Development Team
#
#  Distributed under the terms of the BSD License.  The full license is in
#  the file COPYING, distributed as part of this software.
#----------------------------------------------------------------------------

#----------------------------------------------------------------------------
# Imports
#----------------------------------------------------------------------------

from distutils.core import setup
from mpidistutils import Distribution, Extension, Executable
from mpidistutils import config, build, build_ext
from mpidistutils import build_exe, install_exe, clean_exe
import mpi4py
import numpy

#--------- -------------------------------------------------------------------
# Metadata
#----------------------------------------------------------------------------

metadata = {
    'name'             : 'distarray',
    'version'          : '0.1',
    'description'      : 'Distributed Memory Arrays for Python',
    'keywords'         : 'parallel mpi distributed array',
    'license'          : 'New BSD',
    'author'           : '<NAME>',
    'author_email'     : '<EMAIL>',
    }

# See if FFTW_DIR is set 
import os
fftw_dir = os.getenv("FFTW_DIR")

#----------------------------------------------------------------------------
# Extension modules
#----------------------------------------------------------------------------

def find_ext_modules():
    import sys
    
    maps = Extension(
        name='distarray.core.maps_fast',
        sources=['distarray/core/maps_fast.c']
    )
    # This extension shows how to call mpi4py's C layer using Cython
    mpi_test = Extension(
        name='distarray.mpi.tests.helloworld',
        sources=['distarray/mpi/tests/helloworld.c'],
        include_dirs = [mpi4py.get_include()]
    )
    
    allext = [maps, mpi_test]
    if not fftw_dir is None:
        py_fftw = Extension(
            name = 'distarray.fft.py_fftw',
            library_dirs = [fftw_dir+"/lib"],
            include_dirs = [
                fftw_dir+"/include", 
                mpi4py.get_include(),
                numpy.get_include()],
            libraries = ['fftw3_mpi', 'fftw3', 'fftw3f_mpi','fftw3f'],
            sources = ['distarray/fft/py_fftw.c'],
        )
        allext.append(py_fftw)
        print "FFTW found, including distarray.fft"
    
    return allext

def find_headers():
    # allheaders = ['mpi/ext/libmpi.h']
    return []

def find_executables():
    return []

def find_packages():
    packages= [
        'distarray',
        'distarray.tests',
        'distarray.core',
        'distarray.core.tests',
        'distarray.mpi',
        'distarray.mpi.tests',
        'distarray.random',
        'distarray.random.tests',
        'distarray.linalg',
        'distarray.linalg.tests'
    ]
    
    if not fftw_dir is None:
        packages.extend([
            'distarray.fft',
            'distarray.fft.tests'
        ])

    return packages


#----------------------------------------------------------------------------
# Setup
#----------------------------------------------------------------------------


def main():<commit_msg>Remove related sections from `setup.py`.<commit_after># encoding: utf-8

__docformat__ = "restructuredtext en"

#----------------------------------------------------------------------------
#  Copyright (C) 2008  The IPython Development Team
#
#  Distributed under the terms of the BSD License.  The full license is in
#  the file COPYING, distributed as part of this software.
#----------------------------------------------------------------------------

#----------------------------------------------------------------------------
# Imports
#----------------------------------------------------------------------------

from distutils.core import setup
from mpidistutils import Distribution, Extension, Executable
from mpidistutils import config, build, build_ext
from mpidistutils import build_exe, install_exe, clean_exe
import mpi4py
import numpy

#--------- -------------------------------------------------------------------
# Metadata
#----------------------------------------------------------------------------

metadata = {
    'name'             : 'distarray',
    'version'          : '0.1',
    'description'      : 'Distributed Memory Arrays for Python',
    'keywords'         : 'parallel mpi distributed array',
    'license'          : 'New BSD',
    'author'           : '<NAME>',
    'author_email'     : '<EMAIL>',
    }

# See if FFTW_DIR is set 
import os

#----------------------------------------------------------------------------
# Extension modules
#----------------------------------------------------------------------------

def find_ext_modules():
    import sys
    
    maps = Extension(
        name='distarray.core.maps_fast',
        sources=['distarray/core/maps_fast.c']
    )
    # This extension shows how to call mpi4py's C layer using Cython
    mpi_test = Extension(
        name='distarray.mpi.tests.helloworld',
        sources=['distarray/mpi/tests/helloworld.c'],
        include_dirs = [mpi4py.get_include()]
    )
    
    allext = [maps, mpi_test]
    return allext

def find_headers():
    # allheaders = ['mpi/ext/libmpi.h']
    return []

def find_executables():
    return []

def find_packages():
    packages= [
        'distarray',
        'distarray.tests',
        'distarray.core',
        'distarray.core.tests',
        'distarray.mpi',
        'distarray.mpi.tests',
        'distarray.random',
        'distarray.random.tests'
    ]
    return packages


#----------------------------------------------------------------------------
# Setup
#----------------------------------------------------------------------------


def main():
{'fraction_non_alphanumeric': 0.3422387554954346, 'fraction_numerical': 0.004227257355427798, 'mean_word_length': 1.0982617949627527, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5636400', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1446, 'n_words': 340}