Skip to content

Commit bc8f5ca

Browse files
committed
make:all:fixed:tested on macos:13.5 (22G74)
1 parent dc34937 commit bc8f5ca

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

GNUmakefile

+7-6
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,10 @@ all: initialize init install prune-cluster## all
391391

392392
.PHONY: venv
393393
venv:## create python3 virtualenv .venv
394-
test -d .venv || $(PYTHON3) -m virtualenv .venv
394+
test -d .venv || python3 -m virtualenv .venv || pipx install virtualenv && virtualenv .venv
395395
( \
396-
source .venv/bin/activate; pip install -q -r requirements.txt; \
397-
python3 -m pip install -q omegaconf \
396+
source .venv/bin/activate; pip install -q -r requirements.txt --break-system-package; \
397+
pip install -q omegaconf --break-system-package \
398398
pip install -q --upgrade pip; \
399399
);
400400
@echo "To activate (venv)"
@@ -432,10 +432,11 @@ endif
432432
@install -v -m=o+rwx $(PWD)/getcoins.py /usr/local/bin/play-getcoins
433433

434434
#$(PYTHON3) -m pip install -q --upgrade pip 2>/dev/null
435-
$(PYTHON3) -m pip install -q omegaconf 2>/dev/null
436-
$(PYTHON3) -m pip install -q -r requirements.txt 2>/dev/null
435+
$(PYTHON3) -m pip install -q omegaconf 2>/dev/null || $(MAKE) venv
436+
$(PYTHON3) -m pip install -q -r requirements.txt 2>/dev/null || true
437437
# pushd docs 2>/dev/null && $(PYTHON3) -m pip install -q -r requirements.txt && popd 2>/dev/null
438-
$(PYTHON3) plebnet_generate.py TRIPLET=$(TRIPLET) services=$(SERVICES)
438+
source .venv/bin/activate; $(PYTHON3) plebnet_generate.py TRIPLET=$(TRIPLET) services=$(SERVICES) || \
439+
pip3 install omegaconf --break-system-packages
439440

440441
#pushd scripts 2>/dev/null; for string in *; do sudo chmod -R o+rwx /usr/local/bin/$$string; done; popd 2>/dev/null || echo
441442

pip.conf

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
user = true
2+
break-system-packages = true

scripts/initialize

+16-16
Original file line numberDiff line numberDiff line change
@@ -71,37 +71,36 @@ if hash brew 2>/dev/null; then
7171
if ! hash gawk 2>/dev/null; then
7272
brew install gawk
7373
fi
74+
if ! hash pipx 2>/dev/null; then
75+
brew install pipx
76+
fi
7477
#brew install [email protected]
7578
if ! hash docker 2>/dev/null; then
7679
rm -rf /usr/local/share/zsh/site-functions/_docker && \
7780
rm -rf /usr/local/share/fish/vendor_completions.d/docker.fish && \
7881
rm -rf /usr/local/etc/bash_completion.d/docker
7982

80-
brew install --cask docker
81-
brew install docker
82-
brew link docker
83+
brew install --cask docker || true
84+
brew install docker || true
85+
brew link docker || true
8386
fi
8487
if ! hash docker-compose 2>/dev/null; then
85-
brew install docker-compose
88+
brew install docker-compose || true
8689
fi
8790
if ! hash mkdocs 2>/dev/null; then
8891
brew install mkdocs
8992
fi
9093
if ! hash jq 2>/dev/null; then
9194
brew install jq
9295
fi
93-
brew install --quiet --force [email protected]
94-
curl -O https://bootstrap.pypa.io/get-pip.py
95-
sudo -H python3 get-pip.py --no-warn-script-location
96-
97-
if [ -f "/usr/local/opt/[email protected]/bin/python3" ] && [ -f "/opt/homebrew/opt/[email protected]/bin/python3" ]; then
98-
python39=/opt/homebrew/opt/[email protected]/bin/python3
99-
else
100-
python39=$(which python3)
101-
fi
102-
export python39
103-
$python39 -m pip -q install --upgrade pip
104-
$python39 -m pip -q install omegaconf
96+
#brew install --quiet --force python@3
97+
##curl -O https://bootstrap.pypa.io/get-pip.py
98+
##sudo -H python3 get-pip.py --no-warn-script-location
99+
100+
python3=$(which python3)
101+
export python3
102+
pipx ensurepath && \
103+
pipx install omegaconf --include-deps --force #|| $(which python3) -m pip -q install --upgrade pip && $(which python3) -m pip -q install omegaconf ||
105104
echo
106105
else
107106
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
@@ -167,6 +166,7 @@ if [[ "$OSTYPE" == "linux"* ]]; then
167166
fi
168167
elif [[ "$OSTYPE" == "darwin"* ]]; then
169168
checkbrew
169+
echo
170170
elif [[ "$OSTYPE" == "cygwin" ]]; then
171171
echo TODO add support for $OSTYPE
172172
elif [[ "$OSTYPE" == "msys" ]]; then

0 commit comments

Comments
 (0)