<commit_before>import sys
import platform
import os.path

py_version = sys.version[0:sys.version.find(" ")]
py_nm = py_version[0:3]
py_locate = [i for i in sys.path]
system_type = platform.system()
system_name = platform.dist()[0]
system_version = platform.dist()[1]
system_machine = platform.machine()

windows_list = {
    "swig":"\"W:\SWIG\swig.exe\"",
    "python":"\"W:\Anaconda3\python.exe\"",
    "python lib":"-LW:/Anaconda3/libs -lPython"+py_nm.replace('.', ''),
    "python include":"-IW:/Anaconda3/include",
    }
ubuntu_list = {
    "swig":"swig",
    "python":"python3",
    "python lib":"-L/usr/lib/python"+py_nm+"/config-"+py_nm+"m-x86_64-linux-gnu/ -lpython"+py_nm+"m",
    "python include":"-IW:/Anaconda3/include",
    }

def file_check():
    print(str(os.path.isfile('../solvespace.h'))+' | ../solvespace.h')
    print(str(os.path.isfile('../dsc.h'))+' | ../dsc.h')
    print(str(os.path.isfile('../sketch.h'))+' | ../sketch.h')
    print(str(os.path.isfile('../expr.h'))+' | ../expr.h')
    print(str(os.path.isfile('./slvs.h'))+' | ./slvs.h')
    print(str(os.path.isfile('../entity.cpp'))+' | ../entity.cpp')
    print(str(os.path.isfile('../expr.cpp'))+' | ../expr.cpp')
    print(str(os.path.isfile('../constrainteq.cpp'))+' | ../constrainteq.cpp')
    print(str(os.path.isfile('../system.cpp'))+' | ../system.cpp')
    print(str(os.path.isfile('./lib.cpp'))+' | ./lib.cpp')
    print(str(os.path.isfile('./slvs_python.hpp'))+' | ./slvs_python.hpp')
    print(str(os.path.isfile('./slvs.i'))+' | ./slvs.i')
    n = (os.path.isfile('../solvespace.h') and os.path.isfile('../dsc.h') and os.path.isfile('../sketch.h') and
         os.path.isfile('../expr.h') and os.path.isfile('./slvs.h') and os.path.isfile('../entity.cpp') and 
         os.path.isfile('../expr.cpp') and os.path.isfile('../constrainteq.cpp') and os.path.isfile('../system.cpp') and
         os.path.isfile('./lib.cpp') and os.path.isfile('./slvs_python.hpp') and os.path.isfile('./slvs.i')
         )
    return n

def build_Makefile():
    Makefile_script = "#Python Solvespace Makefile"
    if platform.system().lower()=="windows":
        system_list = windows_list
        Makefile_script += """
WIN_DEFINES = -D_WIN32_WINNT=0x500 -D_WIN32_IE=0x500 -DWIN32_LEAN_AND_MEAN
"""
    else: system_list = ubuntu_list
    Makefile_script += """
SWIG = """+ubuntu_list["swig"]+"""
PYTHON = """+ubuntu_list["python"]+"""
PYTHONLIB = """+ubuntu_list["python lib"]+"""
PYTHONINCLUDE = """+ubuntu_list["python include"]+"""
DEFINES = -DISOLATION_AWARE_ENABLED -DLIBRARY -DDLL_EXPORT
CFLAGS  = -I../extlib -I../../common/win32 -I. -I.. -D_DEBUG -D_CRT_SECURE_NO_WARNINGS -O2 -g -Wno-write-strings -fpermissive
HEADERS = ../solvespace.h \
../dsc.h \<commit_msg>configure.py include fix<commit_after>import sys
import platform
import os.path

py_version = sys.version[0:sys.version.find(" ")]
py_nm = py_version[0:3]
py_locate = [i for i in sys.path]
system_type = platform.system()
system_name = platform.dist()[0]
system_version = platform.dist()[1]
system_machine = platform.machine()

windows_list = {
    "swig":"\"W:\SWIG\swig.exe\"",
    "python":"\"W:\Anaconda3\python.exe\"",
    "python lib":"-LW:/Anaconda3/libs -lPython"+py_nm.replace('.', ''),
    "python include":"-IW:/Anaconda3/include",
    }
ubuntu_list = {
    "swig":"swig",
    "python":"python3",
    "python lib":"-L/usr/lib/python"+py_nm+"/config-"+py_nm+"m-x86_64-linux-gnu/ -lpython"+py_nm+"m",
    "python include":"-I/usr/include/python"+py_nm+"/",
    }

def file_check():
    print(str(os.path.isfile('../solvespace.h'))+' | ../solvespace.h')
    print(str(os.path.isfile('../dsc.h'))+' | ../dsc.h')
    print(str(os.path.isfile('../sketch.h'))+' | ../sketch.h')
    print(str(os.path.isfile('../expr.h'))+' | ../expr.h')
    print(str(os.path.isfile('./slvs.h'))+' | ./slvs.h')
    print(str(os.path.isfile('../entity.cpp'))+' | ../entity.cpp')
    print(str(os.path.isfile('../expr.cpp'))+' | ../expr.cpp')
    print(str(os.path.isfile('../constrainteq.cpp'))+' | ../constrainteq.cpp')
    print(str(os.path.isfile('../system.cpp'))+' | ../system.cpp')
    print(str(os.path.isfile('./lib.cpp'))+' | ./lib.cpp')
    print(str(os.path.isfile('./slvs_python.hpp'))+' | ./slvs_python.hpp')
    print(str(os.path.isfile('./slvs.i'))+' | ./slvs.i')
    n = (os.path.isfile('../solvespace.h') and os.path.isfile('../dsc.h') and os.path.isfile('../sketch.h') and
         os.path.isfile('../expr.h') and os.path.isfile('./slvs.h') and os.path.isfile('../entity.cpp') and 
         os.path.isfile('../expr.cpp') and os.path.isfile('../constrainteq.cpp') and os.path.isfile('../system.cpp') and
         os.path.isfile('./lib.cpp') and os.path.isfile('./slvs_python.hpp') and os.path.isfile('./slvs.i')
         )
    return n

def build_Makefile():
    Makefile_script = "#Python Solvespace Makefile"
    if platform.system().lower()=="windows":
        system_list = windows_list
        Makefile_script += """
WIN_DEFINES = -D_WIN32_WINNT=0x500 -D_WIN32_IE=0x500 -DWIN32_LEAN_AND_MEAN
"""
    else: system_list = ubuntu_list
    Makefile_script += """
SWIG = """+system_list["swig"]+"""
PYTHON = """+system_list["python"]+"""
PYTHONLIB = """+system_list["python lib"]+"""
PYTHONINCLUDE = """+system_list["python include"]+"""
DEFINES = -DISOLATION_AWARE_ENABLED -DLIBRARY -DDLL_EXPORT
CFLAGS  = -I../extlib -I../../common/win32 -I. -I.. -D_DEBUG -D_CRT_SECURE_NO_WARNINGS -O2 -g -Wno-write-strings -fpermissive
HEADERS = ../solvespace.h \
../dsc.h \
{'fraction_non_alphanumeric': 0.24446058844896476, 'fraction_numerical': 0.011078823102070468, 'mean_word_length': 3.4197431781701444, 'pattern_counts': {'":': 18, '<': 3, '<?xml version=': 0, '>': 3, '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': '3494592', 'n_tokens_mistral': 2236, 'n_tokens_neox': 2177, 'n_words': 280}