mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-26 23:19:39 +00:00
Replace requirements.txt with modern pyproject.toml configuration to align with Python packaging best practices. All dependencies are now declared in [project] section, with optional dev dependencies (ruff, mypy) in [project.optional-dependencies]. Updated all references: - Dockerfile: Install with `pip install .` instead of `-r requirements.txt` - setup_env.sh: Install with `pip install -e .` for editable development mode - README.md: Updated installation instructions in both quick start and development sections - CLAUDE.md: Updated documentation references - .gitignore: Added common IDE and tool directories Installation is now: `pip install -e .` for development or `pip install .` for production. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
1.1 KiB
Bash
Executable File
46 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
dirpath=$(dirname "$(readlink -f "$0")")
|
|
|
|
# Check if git is installed
|
|
if ! command -v git &> /dev/null; then
|
|
echo
|
|
echo "No git executable found in PATH!"
|
|
echo
|
|
read -p "Press any key to continue..."
|
|
exit 1
|
|
fi
|
|
|
|
# Check if the virtual environment exists
|
|
if [ ! -d "$dirpath/env" ]; then
|
|
echo
|
|
echo "Creating the env folder..."
|
|
python3 -m venv "$dirpath/env"
|
|
if [ $? -ne 0 ]; then
|
|
echo
|
|
echo "No python executable found in PATH or failed to create virtual environment!"
|
|
echo
|
|
read -p "Press any key to continue..."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Activate the virtual environment and install dependencies
|
|
echo
|
|
echo "Installing dependencies from pyproject.toml..."
|
|
"$dirpath/env/bin/python" -m pip install -U pip
|
|
"$dirpath/env/bin/pip" install wheel
|
|
"$dirpath/env/bin/pip" install -e "$dirpath"
|
|
if [ $? -ne 0 ]; then
|
|
echo
|
|
echo "Failed to install dependencies."
|
|
echo
|
|
read -p "Press any key to continue..."
|
|
exit 1
|
|
fi
|
|
|
|
echo
|
|
echo "Environment setup completed successfully."
|
|
echo
|
|
read -p "Press any key to continue..."
|