<commit_before>from __future__ import print_function
import os
from setuptools import setup, Extension
from glob import glob
from platform import system
from numpy import get_include
from numpy.distutils.system_info import get_info, BlasNotFoundError 

def install_scs(USE_64_BIT_BLAS, blas_info, lapack_info, USE_OPENMP, rootDir): 
    libraries = []
    if system() == 'Linux':
        libraries += ['rt']
   
    sources = ['scsmodule.c', ] + glob(rootDir + 'src/*.c') + glob(rootDir + 'linsys/*.c')
    include_dirs = [rootDir, rootDir + 'include', get_include(), rootDir + 'linsys']
    
    define_macros = [('PYTHON', None), ('DLONG', None), ('CTRLC', 1), ('COPYAMATRIX', None)]
    # define_macros += [('EXTRAVERBOSE', None)] # for debugging
    extra_compile_args = ["-O3"]
    library_dirs = []
    extra_link_args = []
    
    if USE_OPENMP:
        define_macros += [('OPENMP', None)]
        extra_compile_args += ['-fopenmp']
        extra_link_args += ['-lgomp']
    
    if USE_64_BIT_BLAS:
        define_macros += [('BLAS64', None)]
    
    if blas_info or lapack_info:
        define_macros += [('LAPACK_LIB_FOUND', None)] + blas_info.pop('define_macros', []) + lapack_info.pop('define_macros', [])
        include_dirs += blas_info.pop('include_dirs', []) + lapack_info.pop('include_dirs', [])
        library_dirs += blas_info.pop('library_dirs', []) + lapack_info.pop('library_dirs', [])
        libraries += blas_info.pop('libraries', []) + lapack_info.pop('libraries', [])
        extra_link_args += blas_info.pop('extra_link_args', []) + lapack_info.pop('extra_link_args', [])
        extra_compile_args += blas_info.pop('extra_compile_args', []) + lapack_info.pop('extra_compile_args', [])
    
    _scs_direct = Extension(
                        name='_scs_direct',
                        sources=sources + glob(rootDir + 'linsys/direct/*.c') + glob(rootDir + 'linsys/direct/external/*.c'),
                        define_macros=define_macros,
                        include_dirs=include_dirs + [rootDir + 'linsys/direct/', rootDir + 'linsys/direct/external/'],
                        library_dirs=library_dirs,
                        libraries=libraries,
                        extra_link_args=extra_link_args,
                        extra_compile_args=extra_compile_args
                        )
    
    _scs_indirect = Extension(
                        name='_scs_indirect',
                        sources=sources + glob(rootDir + 'linsys/indirect/*.c'),
                        define_macros=define_macros + [('INDIRECT', None)],
                        include_dirs=include_dirs + [rootDir + 'linsys/indirect/'],
                        library_dirs=library_dirs,
                        libraries=libraries,
                        extra_link_args=extra_link_args,
                        extra_compile_args=extra_compile_args
                        )
    setup(name='scs',
            version='1.1.0',
            author = '<NAME>',
            author_email = '<EMAIL>',
            url = 'http://github.com/cvxgrp/scs',
            description='scs: splittling cone solver',
            py_modules=['scs'],
            ext_modules=[_scs_direct, _scs_indirect],
            install_requires=["numpy >= 1.7","scipy >= 0.13.2"],
            license = "MIT",
            long_description="Solves convex cone programs via operator splitting. Can solve: linear programs (LPs) second-order cone programs (SOCPs), semidefinite programs (SDPs), and exponential cone programs (ECPs). See http://github.com/cvxgrp/scs for more details."
            )

#####################################

# location of SCS root directory, containing 'src/' etc.
rootDir = '../'

# use 'export OMP_NUM_THREADS=16' to control num of threads (in that case, 16)
USE_OPENMP = False<commit_msg>bump python ver<commit_after>from __future__ import print_function
import os
from setuptools import setup, Extension
from glob import glob
from platform import system
from numpy import get_include
from numpy.distutils.system_info import get_info, BlasNotFoundError 

def install_scs(USE_64_BIT_BLAS, blas_info, lapack_info, USE_OPENMP, rootDir): 
    libraries = []
    if system() == 'Linux':
        libraries += ['rt']
   
    sources = ['scsmodule.c', ] + glob(rootDir + 'src/*.c') + glob(rootDir + 'linsys/*.c')
    include_dirs = [rootDir, rootDir + 'include', get_include(), rootDir + 'linsys']
    
    define_macros = [('PYTHON', None), ('DLONG', None), ('CTRLC', 1), ('COPYAMATRIX', None)]
    # define_macros += [('EXTRAVERBOSE', None)] # for debugging
    extra_compile_args = ["-O3"]
    library_dirs = []
    extra_link_args = []
    
    if USE_OPENMP:
        define_macros += [('OPENMP', None)]
        extra_compile_args += ['-fopenmp']
        extra_link_args += ['-lgomp']
    
    if USE_64_BIT_BLAS:
        define_macros += [('BLAS64', None)]
    
    if blas_info or lapack_info:
        define_macros += [('LAPACK_LIB_FOUND', None)] + blas_info.pop('define_macros', []) + lapack_info.pop('define_macros', [])
        include_dirs += blas_info.pop('include_dirs', []) + lapack_info.pop('include_dirs', [])
        library_dirs += blas_info.pop('library_dirs', []) + lapack_info.pop('library_dirs', [])
        libraries += blas_info.pop('libraries', []) + lapack_info.pop('libraries', [])
        extra_link_args += blas_info.pop('extra_link_args', []) + lapack_info.pop('extra_link_args', [])
        extra_compile_args += blas_info.pop('extra_compile_args', []) + lapack_info.pop('extra_compile_args', [])
    
    _scs_direct = Extension(
                        name='_scs_direct',
                        sources=sources + glob(rootDir + 'linsys/direct/*.c') + glob(rootDir + 'linsys/direct/external/*.c'),
                        define_macros=define_macros,
                        include_dirs=include_dirs + [rootDir + 'linsys/direct/', rootDir + 'linsys/direct/external/'],
                        library_dirs=library_dirs,
                        libraries=libraries,
                        extra_link_args=extra_link_args,
                        extra_compile_args=extra_compile_args
                        )
    
    _scs_indirect = Extension(
                        name='_scs_indirect',
                        sources=sources + glob(rootDir + 'linsys/indirect/*.c'),
                        define_macros=define_macros + [('INDIRECT', None)],
                        include_dirs=include_dirs + [rootDir + 'linsys/indirect/'],
                        library_dirs=library_dirs,
                        libraries=libraries,
                        extra_link_args=extra_link_args,
                        extra_compile_args=extra_compile_args
                        )
    setup(name='scs',
            version='1.1.1',
            author = '<NAME>',
            author_email = '<EMAIL>',
            url = 'http://github.com/cvxgrp/scs',
            description='scs: splittling cone solver',
            py_modules=['scs'],
            ext_modules=[_scs_direct, _scs_indirect],
            install_requires=["numpy >= 1.7","scipy >= 0.13.2"],
            license = "MIT",
            long_description="Solves convex cone programs via operator splitting. Can solve: linear programs (LPs) second-order cone programs (SOCPs), semidefinite programs (SDPs), and exponential cone programs (ECPs). See http://github.com/cvxgrp/scs for more details."
            )

#####################################

# location of SCS root directory, containing 'src/' etc.
rootDir = '../'

# use 'export OMP_NUM_THREADS=16' to control num of threads (in that case, 16)
USE_OPENMP = False
{'fraction_non_alphanumeric': 0.13847364280094415, 'fraction_numerical': 0.0055074744295830055, 'mean_word_length': 2.434038721296713, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '6837932', 'n_tokens_mistral': 2400, 'n_tokens_neox': 2339, 'n_words': 431}