Skip to content

Commit

Permalink
Refactor setup scripts: remove deprecated pycache cleanup, reorganize…
Browse files Browse the repository at this point in the history
… virtual environment setup, and streamline dependency installation
  • Loading branch information
arthur-debert committed Dec 9, 2024
1 parent 8aee756 commit d1e3db3
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 4 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ classifiers = [
urls = { "Homepage" = "https://github.com/arthur-debert/rangy" }

dependencies = [
"dateutils==0.6.12",
"toml>=0.10.2",
]

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion scripts/py-remove-pycache

This file was deleted.

10 changes: 10 additions & 0 deletions scripts/setup::all
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /usr/bin/env bash

# calls the setup::venv and setup::requirements scripts

script_dir=$(dirname "$0")
"$script_dir/setup::venv" || exit 1
"$script_dir/setup::deps"

source .venv/bin/activate || { echo "Virtual environment activation failed!"; exit 1; }
"$@" # Execute any command passed as arguments
4 changes: 2 additions & 2 deletions scripts/setup → scripts/setup::deps
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if [ ! -d .venv ]; then
echo "Creating virtual environment .venv"
python3 -m venv .venv
echo "Venv should be created, see setup::venv.sh"
exit 1

fi
source .venv/bin/activate &&\
Expand Down
5 changes: 5 additions & 0 deletions scripts/setup::venv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if [ ! -d .venv ]; then
echo "Creating virtual environment .venv"
python3 -m venv .venv

fi

0 comments on commit d1e3db3

Please sign in to comment.