Ayounsi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389890 )

Change subject: Add make_wheels.sh
......................................................................

Add make_wheels.sh

Change-Id: I8221aea361c961d7061c71afa31a2a4936a629db
---
A make_wheels.sh
R requirements_tmp.txt
2 files changed, 26 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/netbox-deploy 
refs/changes/90/389890/1

diff --git a/make_wheels.sh b/make_wheels.sh
new file mode 100644
index 0000000..a143f1e
--- /dev/null
+++ b/make_wheels.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+# Build wheels for distribution
+set -o errexit
+set -o nounset
+set -o pipefail
+
+BASE=$(realpath $(dirname $0))
+BUILD=${BASE}/_build
+VENV=${BUILD}/venv
+WHEEL_DIR=${BASE}/wheels
+REQUIREMENTS=${BASE}/requirements_tmp.txt
+REQUIREMENTS_FIXED=${BASE}/requirements.txt
+
+PIP=${VENV}/bin/pip
+
+mkdir -p $VENV
+virtualenv --python python3 $VENV || /bin/true
+$PIP install -r $REQUIREMENTS
+$PIP freeze --local --requirement $REQUIREMENTS_FIXED > $REQUIREMENTS_FIXED
+# https://github.com/pypa/pip/issues/4668
+sed -i '/pkg-resources==0.0.0/d' $REQUIREMENTS_FIXED
+$PIP install wheel
+$PIP wheel --find-links $WHEEL_DIR \
+           --wheel-dir $WHEEL_DIR \
+               --requirement $REQUIREMENTS_FIXED
+
diff --git a/requirements.txt b/requirements_tmp.txt
similarity index 100%
rename from requirements.txt
rename to requirements_tmp.txt

-- 
To view, visit https://gerrit.wikimedia.org/r/389890
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8221aea361c961d7061c71afa31a2a4936a629db
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/netbox-deploy
Gerrit-Branch: master
Gerrit-Owner: Ayounsi <ayou...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to