From f1a9e6bdeed5b9586bbce0f5e0402158ed936de5 Mon Sep 17 00:00:00 2001 From: Thierry Moudiki Date: Fri, 4 Oct 2024 15:33:00 +0200 Subject: [PATCH] update setup for Cython --- .gitignore | 2 ++ setup.py | 11 +++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a60614f..d457206 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +mlsauce/.DS_Store + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/setup.py b/setup.py index d98d983..90388a3 100644 --- a/setup.py +++ b/setup.py @@ -4,14 +4,17 @@ # License: 3-clause BSD import subprocess +import sys -subprocess.check_call(['pip', 'install', 'Cython==3.0.10']) +subprocess.run(['pip', 'install', 'numpy'], check=False) +subprocess.run(['pip', 'install', 'scipy'], check=False) +subprocess.run(['pip', 'install', 'requests'], check=False) +subprocess.run(['pip', 'install', 'Cython'], check=False) import os import platform import setuptools import shutil -import sys from os import path from pathlib import Path @@ -22,10 +25,6 @@ except ImportError: import __builtin__ as builtins -subprocess.run(['pip', 'install', 'numpy'], check=False) -subprocess.run(['pip', 'install', 'scipy'], check=False) -subprocess.run(['pip', 'install', 'requests'], check=False) - import numpy from Cython.Build import cythonize