<commit_before>from setuptools import setup
from setuptools.extension import Extension
import os
import numpy 
from Cython.Build import cythonize
from Cython.Build import build_ext
import subprocess
from sys import argv

mypackage_root_dir = os.path.dirname(__file__)
with open(os.path.join(mypackage_root_dir, 'requirements.txt')) as requirements_file:
    requirements = requirements_file.read().splitlines()

with open(os.path.join(mypackage_root_dir, 'optoanalysis/VERSION')) as version_file:
    version = version_file.read().strip()

extensions = [Extension(
    name="optoanalysis.sde_solver.solve",
    sources=["optoanalysis/sde_solver/solve.pyx"],
    include_dirs=[numpy.get_include()],
    )
]

#if mypackage_root_dir == "":
#    mypackage_root_dir = "." # so that if running from current directory subprocess starts in current directory
#
#def run_process(process_string):
#    popen = subprocess.Popen(process_string,
#                             cwd=mypackage_root_dir,
#                             stdout=subprocess.PIPE,
#                             universal_newlines=True,
#                             shell=True) # builds cython code
#    for stdout_line in iter(popen.stdout.readline, ""): 
#        print(stdout_line) # prints output of cython build process
#    popen.stdout.close()
#
#if argv[-1] != "--inplace": # so that it doesn't recursively call setup.py
#    run_process("python3 setup.py build_ext --inplace")

setup(name='optoanalysis',
      version=version,
      description='Python package with functions for data analysis',<commit_msg>added working solution, had to change name in extension so that it builds the shared object file and puts it in the root package directory when installed<commit_after>from setuptools import setup
from setuptools.extension import Extension
import os
import numpy 
from Cython.Build import cythonize
from Cython.Build import build_ext
import subprocess
from sys import argv

mypackage_root_dir = os.path.dirname(__file__)
with open(os.path.join(mypackage_root_dir, 'requirements.txt')) as requirements_file:
    requirements = requirements_file.read().splitlines()

with open(os.path.join(mypackage_root_dir, 'optoanalysis/VERSION')) as version_file:
    version = version_file.read().strip()

extensions = [Extension(
    name="solve",
    sources=["optoanalysis/sde_solver/solve.pyx"],
    include_dirs=[numpy.get_include()],
    )
]

#if mypackage_root_dir == "":
#    mypackage_root_dir = "." # so that if running from current directory subprocess starts in current directory
#
#def run_process(process_string):
#    popen = subprocess.Popen(process_string,
#                             cwd=mypackage_root_dir,
#                             stdout=subprocess.PIPE,
#                             universal_newlines=True,
#                             shell=True) # builds cython code
#    for stdout_line in iter(popen.stdout.readline, ""): 
#        print(stdout_line) # prints output of cython build process
#    popen.stdout.close()
#
#if argv[-1] != "--inplace": # so that it doesn't recursively call setup.py
#    run_process("python3 setup.py build_ext --inplace")

setup(name='optoanalysis',
      version=version,
      description='Python package with functions for data analysis',
{'fraction_non_alphanumeric': 0.09883720930232558, 'fraction_numerical': 0.0012239902080783353, 'mean_word_length': 3.533980582524272, 'pattern_counts': {'":': 4, '<': 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': '1419905', 'n_tokens_mistral': 966, 'n_tokens_neox': 945, 'n_words': 241}