-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·88 lines (68 loc) · 2.27 KB
/
install.sh
File metadata and controls
executable file
·88 lines (68 loc) · 2.27 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
#!/bin/bash
# Code Conductor Install Script
# One-command setup for code-conductor
set -e
echo "🚀 Setting up Code Conductor..."
# Check if we're in the right directory
if [ ! -f "setup.py" ]; then
echo "❌ Error: setup.py not found. Please run this script from the code-conductor directory."
exit 1
fi
# Function to install with pip/venv
install_with_pip() {
echo "📦 Installing with pip and virtual environment..."
# Create virtual environment if it doesn't exist
if [ ! -d ".venv" ]; then
echo "Creating virtual environment..."
python3 -m venv .venv
fi
# Activate virtual environment
source .venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install dependencies
if [ -f "requirements.txt" ]; then
pip install -r requirements.txt
else
echo "⚠️ No requirements.txt found, installing minimal dependencies..."
pip install pyyaml requests
fi
echo "✅ Dependencies installed with pip"
}
# Function to install with Poetry
install_with_poetry() {
echo "📦 Installing with Poetry..."
# Install dependencies
poetry install
echo "✅ Dependencies installed with Poetry"
}
# Check if Poetry is available
if command -v poetry &> /dev/null && poetry --version &> /dev/null; then
echo "🎵 Poetry detected, using Poetry for dependency management..."
install_with_poetry
# Run setup with Poetry
echo "🔧 Running setup..."
poetry run python setup.py "$@"
echo ""
echo "🎉 Setup complete!"
echo "To activate the environment and run scripts:"
echo " poetry shell"
echo " python .conductor/scripts/your-script.py"
else
echo "📦 Poetry not found, using pip and virtual environment..."
install_with_pip
# Run setup with pip
echo "🔧 Running setup..."
source .venv/bin/activate
python setup.py "$@"
echo ""
echo "🎉 Setup complete!"
echo "To activate the environment and run scripts:"
echo " source .venv/bin/activate"
echo " python .conductor/scripts/your-script.py"
fi
echo ""
echo "📚 Next steps:"
echo " 1. Check the README.md for usage instructions"
echo " 2. Run 'python setup.py --help' for setup options"
echo " 3. Explore the .conductor/examples/ directory for templates"