Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have done with a wheel in python #334

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions ta/build_ta_lib.py
Original file line number Diff line number Diff line change
@@ -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}")
16 changes: 16 additions & 0 deletions ta/wheel
Original file line number Diff line number Diff line change
@@ -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...