-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-dev.sh
More file actions
executable file
·116 lines (103 loc) · 2.84 KB
/
setup-dev.sh
File metadata and controls
executable file
·116 lines (103 loc) · 2.84 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/bin/bash
# Installation script for Sound Equalizer development environment
set -e
echo "=========================================="
echo "Sound Equalizer Development Setup"
echo "=========================================="
echo ""
# Detect OS
if [ -f /etc/os-release ]; then
. /etc/os-release
OS=$ID
else
echo "Cannot detect OS. This script supports Debian/Ubuntu, Fedora, and Arch Linux."
exit 1
fi
echo "Detected OS: $OS"
echo ""
# Install system dependencies based on OS
case "$OS" in
ubuntu|debian)
echo "Installing system dependencies for Ubuntu/Debian..."
sudo apt-get update
sudo apt-get install -y \
python3 \
python3-pip \
python3-venv \
portaudio19-dev \
pulseaudio \
ladspa-sdk \
swh-plugins \
git
;;
fedora|rhel|centos)
echo "Installing system dependencies for Fedora/RHEL..."
sudo dnf install -y \
python3 \
python3-pip \
portaudio-devel \
pulseaudio \
ladspa \
swh-plugins \
git
;;
arch|manjaro)
echo "Installing system dependencies for Arch Linux..."
sudo pacman -S --noconfirm \
python \
python-pip \
portaudio \
pulseaudio \
ladspa \
swh-plugins \
git
;;
*)
echo "Unsupported OS: $OS"
echo "Please install dependencies manually:"
echo " - Python 3.8+"
echo " - pip"
echo " - portaudio development files"
echo " - PulseAudio"
echo " - LADSPA SDK and swh-plugins"
exit 1
;;
esac
echo ""
echo "System dependencies installed successfully!"
echo ""
# Create virtual environment
echo "Creating Python virtual environment..."
python3 -m venv venv
echo "Activating virtual environment..."
source venv/bin/activate
echo "Upgrading pip..."
pip install --upgrade pip
echo ""
echo "Installing Python dependencies..."
pip install -r requirements.txt || echo "Note: PyAudio installation failed. This is OK for testing without real-time audio."
echo ""
echo "Installing development dependencies..."
pip install -r requirements-dev.txt
echo ""
echo "Installing pre-commit hooks..."
pre-commit install
echo ""
echo "=========================================="
echo "Setup Complete!"
echo "=========================================="
echo ""
echo "To activate the virtual environment, run:"
echo " source venv/bin/activate"
echo ""
echo "To run tests:"
echo " python -m pytest"
echo ""
echo "To run the equalizer in test mode:"
echo " cd python-equalizer && python equalizer.py --test"
echo ""
echo "To run examples:"
echo " cd python-equalizer && python examples.py"
echo ""
echo "See CONTRIBUTING.md for more information."
echo ""