From 0dcd58f55fe832139aa566008ebc718907a75036 Mon Sep 17 00:00:00 2001 From: Talmeez Fuaad <87268503+itstalmeez@users.noreply.github.com> Date: Sat, 13 Jan 2024 03:21:17 -0800 Subject: [PATCH 1/3] Create wheel --- ta/wheel | 1 + 1 file changed, 1 insertion(+) create mode 100644 ta/wheel diff --git a/ta/wheel b/ta/wheel new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ta/wheel @@ -0,0 +1 @@ + From ead4186f15aebf0e12f4e177dd6f04192a75a2b8 Mon Sep 17 00:00:00 2001 From: Talmeez Fuaad <87268503+itstalmeez@users.noreply.github.com> Date: Sat, 13 Jan 2024 03:22:42 -0800 Subject: [PATCH 2/3] Update and rename wheel to build_ta_lib.py --- ta/build_ta_lib.py | 28 ++++++++++++++++++++++++++++ ta/wheel | 1 - 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ta/build_ta_lib.py delete mode 100644 ta/wheel diff --git a/ta/build_ta_lib.py b/ta/build_ta_lib.py new file mode 100644 index 0000000..fdc282e --- /dev/null +++ b/ta/build_ta_lib.py @@ -0,0 +1,28 @@ +import subprocess +import shutil +from pathlib import Path + +# Clone TA-Lib repository +ta_lib_url = "https://github.com/mrjbq7/ta-lib.git" +clone_dir = "ta-lib" +subprocess.run(["git", "clone", ta_lib_url, clone_dir]) + +# Change directory to the cloned repository +os.chdir(clone_dir) + +# Build TA-Lib +subprocess.run(["python", "setup.py", "build"]) + +# Build the wheel +subprocess.run(["python", "setup.py", "bdist_wheel"]) + +# Find the generated wheel file +dist_dir = Path("dist") +wheel_files = list(dist_dir.glob("*.whl")) + +if not wheel_files: + print("Error: No wheel file found.") +else: + # Move the wheel file to the current directory + shutil.move(wheel_files[0], wheel_files[0].name) + print(f"Wheel file created: {wheel_files[0].name}") diff --git a/ta/wheel b/ta/wheel deleted file mode 100644 index 8b13789..0000000 --- a/ta/wheel +++ /dev/null @@ -1 +0,0 @@ - From a388caf2f7bd9d9a48e4f9370b6c63de042d3f12 Mon Sep 17 00:00:00 2001 From: Talmeez Fuaad <87268503+itstalmeez@users.noreply.github.com> Date: Sat, 13 Jan 2024 03:36:09 -0800 Subject: [PATCH 3/3] Create wheel --- ta/wheel | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ta/wheel diff --git a/ta/wheel b/ta/wheel new file mode 100644 index 0000000..e79c356 --- /dev/null +++ b/ta/wheel @@ -0,0 +1,16 @@ +import subprocess +import shutil +from pathlib import Path +import os + +# Clone TA-Lib repository +ta_lib_url = "https://github.com/mrjbq7/ta-lib.git" +clone_dir = "ta-lib" + +# Check if the directory exists and remove it +if os.path.exists(clone_dir): + shutil.rmtree(clone_dir) + +subprocess.run(["git", "clone", ta_lib_url, clone_dir]) + +# Rest of the script...