this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix psy

+39 -13
+39 -13
.tangled/workflows/build.yml
··· 136 136 command: | 137 137 echo "=== Creating virtualenv ===" 138 138 python3 -m venv .venv 139 + .venv/bin/pip install --quiet --upgrade pip 139 140 140 141 # ----------------------------------------------------------------- 141 - # psycopg build strategy 142 + # psycopg-c build fix 142 143 # 143 - # pg_config is not present in the postgresql_15 package in the 144 - # Nixery nixpkgs snapshot used here — it was split into a separate 145 - # output that Nixery's dependency syntax can't address (dotted 146 - # attribute paths like postgresql_15.pg_config silently do nothing). 144 + # pg_config is absent from this Nixery nixpkgs snapshot entirely. 145 + # psycopg-c is listed as an explicit package in Pipfile.lock, so 146 + # pipenv always tries to build it from source regardless of what's 147 + # already installed. 147 148 # 148 - # Fix: pre-install psycopg[binary] (a self-contained wheel that 149 - # bundles its own libpq — no pg_config, no compilation required). 150 - # Pipenv will then see psycopg as already satisfied and skip the 151 - # source build for psycopg_c. 149 + # Fix: 150 + # 1. Remove psycopg-c from Pipfile.lock (JSON edit via Python) 151 + # 2. Pre-install psycopg[binary] which provides the same runtime 152 + # driver with a bundled libpq — no pg_config needed 153 + # 3. Run pipenv normally; psycopg is satisfied, psycopg-c is gone 152 154 # ----------------------------------------------------------------- 153 - echo "=== Pre-installing psycopg binary wheel ===" 154 - .venv/bin/pip install --upgrade pip 155 - .venv/bin/pip install "psycopg[binary]" 156 - echo "psycopg binary install: OK" 155 + echo "=== Patching Pipfile.lock: removing psycopg-c ===" 156 + python3 - <<'EOF' 157 + import json, sys 158 + 159 + with open("Pipfile.lock") as f: 160 + lock = json.load(f) 161 + 162 + removed = [] 163 + for category, pkgs in lock.items(): 164 + if not isinstance(pkgs, dict): 165 + continue 166 + for key in ("psycopg-c", "psycopg_c"): 167 + if key in pkgs: 168 + del pkgs[key] 169 + removed.append(f"{category}/{key}") 170 + 171 + with open("Pipfile.lock", "w") as f: 172 + json.dump(lock, f, indent=4) 173 + 174 + if removed: 175 + print(f" Removed from lock: {', '.join(removed)}") 176 + else: 177 + print(" psycopg-c not found in lock file — nothing to remove") 178 + EOF 179 + 180 + echo "=== Pre-installing psycopg[binary] ===" 181 + .venv/bin/pip install --quiet "psycopg[binary]==3.3.1" 182 + echo " psycopg[binary] installed: OK" 157 183 echo "" 158 184 159 185 echo "=== Installing production dependencies ==="