From e371dccb7742c152ec69ebbd52150b346a9f6d80 Mon Sep 17 00:00:00 2001
From: Jonas L <jooola@users.noreply.github.com>
Date: Tue, 1 Mar 2022 13:40:34 +0100
Subject: [PATCH] chore: always build egg (#1654)

Prevent a possible mismatch between new setup.py and old requires.txt in previous egg build.
---
 tools/extract-requirements.sh | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/tools/extract-requirements.sh b/tools/extract-requirements.sh
index 6818c3115..8bd97a780 100755
--- a/tools/extract-requirements.sh
+++ b/tools/extract-requirements.sh
@@ -21,14 +21,9 @@ command -v sed > /dev/null || error "sed command not found!"
 
 for setup_path in */setup.py; do
   path="$(dirname "$setup_path")"
-  egg_path="$(echo "$path"/*.egg-info)"
 
-  # Only build egg if absent
-  if [[ ! -d "$egg_path" ]]; then
-    python3 "$setup_path" egg_info > /dev/null 2>&1 || true
-  fi
-
-  # Refresh egg_path with bash expansion
+  # Build egg
+  python3 "$setup_path" egg_info > /dev/null 2>&1 || true
   egg_path="$(echo "$path"/*.egg-info)"
 
   # Remove entire extra section from require file