forked from nkaz001/hftbacktest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (29 loc) · 920 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Makefile
# Set the shell to bash
SHELL := /bin/bash
# Path to virtualenvwrapper.sh (adjust this to your actual path)
VENVWRAPPER_SCRIPT := /usr/local/bin/virtualenvwrapper.sh
# Name of the virtual environment
VENV = hft
VENV_ACTIVATE=$(WORKON_HOME)/$(VENV)/bin/activate
all: build install
build:
@echo "Building the Python project..."
@echo "Setting up virtual environment..."
# Check if virtual environment already exists
@if [ ! -d $(WORKON_HOME)/$(VENV) ]; then \
echo "Creating and activating virtual environment..."; \
( \
source $(VENVWRAPPER_SCRIPT); \
mkvirtualenv $(VENV); \
); \
@echo "Installing Python dependencies..."
. $(VENV_ACTIVATE) && \
pip install -r requirements.txt && \
pip install build
@python -m build
install:
@echo "Installing hftbacktest..."
. $(VENV_ACTIVATE) && \
pip install --force-reinstall dist/hftbacktest-*.whl
.PHONY: build install