From 1fcc8f62051250b53b8d8292bfed0d30f43b64c1 Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Tue, 20 Sep 2022 10:21:10 +0000
Subject: [PATCH] L2SS-951: Fix CI/CD wheel build

---
 .gitlab-ci.yml                            | 6 +-----
 tangostationcontrol/test-requirements.txt | 2 ++
 tangostationcontrol/tox.ini               | 4 ++++
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b2e643249..71459469f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -625,10 +625,6 @@ wheel_packaging:
   artifacts:
     paths:
       - tangostationcontrol/dist/*.whl
-  before_script:
-    - pip3 install build
-    - pip3 install -r tangostationcontrol/test-requirements.txt
-    - pip3 install -r docker-compose/itango/lofar-requirements.txt
   script:
     - cd tangostationcontrol
-    - python -m build
+    - tox -e build
diff --git a/tangostationcontrol/test-requirements.txt b/tangostationcontrol/test-requirements.txt
index b8fe7099d..dbd81d74d 100644
--- a/tangostationcontrol/test-requirements.txt
+++ b/tangostationcontrol/test-requirements.txt
@@ -4,6 +4,8 @@
 
 asynctest>=0.13.0 # Apache-2.0
 bandit>=1.6.0 # Apache-2.0
+virtualenv>=20.16.0 # MIT
+build>=0.8.0 # MIT
 coverage>=5.2.0 # Apache-2.0
 doc8>=0.8.0 # Apache-2.0
 flake8>=3.8.0 # MIT
diff --git a/tangostationcontrol/tox.ini b/tangostationcontrol/tox.ini
index a5e8e0736..a380e29a0 100644
--- a/tangostationcontrol/tox.ini
+++ b/tangostationcontrol/tox.ini
@@ -101,6 +101,10 @@ commands =
     {envpython} -m xenon --version
     {envpython} -m xenon tangostationcontrol -b B -m A -a A -i libhdbpp-python
 
+[testenv:build]
+usedevelop = False
+commands = {envpython} -m build
+
 [testenv:docs]
 envdir = {toxworkdir}/docs
 deps =
-- 
GitLab