forked from hoanganhduc/getscipapers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (40 loc) · 1.19 KB
/
Makefile
File metadata and controls
49 lines (40 loc) · 1.19 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
.PHONY: build install clean test lint help setup venv activate
# Variables
VENV_PATH = ~/.getscipapers
PACKAGE_NAME = getscipapers_hoanganhduc
VERSION = 0.1.0
# Default target
help:
@echo "Available targets:"
@echo " setup - Complete setup: create venv, install deps, build and install package"
@echo " venv - Create virtual environment"
@echo " build - Build the Python package"
@echo " install - Install the package in development mode"
@echo " clean - Remove build artifacts"
@echo " format - Format code with black"
@echo " help - Show this help message"
setup: venv
@echo "Setting up getscipapers..."
bash -c "source $(VENV_PATH)/bin/activate && \
pip install --upgrade pip && \
pip install build && \
pip install -r requirements.txt && \
python -m build"
@echo "Setup completed successfully!"
venv:
@echo "Creating virtual environment at $(VENV_PATH)..."
python -m venv $(VENV_PATH)
build:
python -m build
install:
pip install -e .
clean:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info/
find . -type d -name __pycache__ -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
format:
python -m black .
dist: clean build
@echo "Package built successfully"