Minor change in tox.ini related to flake8 env
[osm/NG-SA.git] / tox.ini
diff --git a/tox.ini b/tox.ini
index 7247cf3..e28d5c1 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -44,7 +44,7 @@ commands =
 deps =  {[testenv]deps}
         -r{toxinidir}/requirements-dev.txt
         -r{toxinidir}/requirements-test.txt
-whitelist_externals = sh
+allowlist_externals = sh
 commands =
         sh -c 'rm -f nosetests.xml'
         coverage erase
@@ -59,7 +59,6 @@ commands =
 [testenv:flake8]
 deps =  flake8==5.0.4
         flake8-import-order
-skip_install = true
 commands =
         flake8 src/
 
@@ -90,7 +89,7 @@ commands =
 [testenv:pip-compile]
 deps =  pip-tools==6.6.2
 skip_install = true
-whitelist_externals =
+allowlist_externals =
         bash
         [
 commands =
@@ -103,6 +102,23 @@ commands =
         done"
 
 
+#######################################################################################
+[testenv:dist]
+deps =  {[testenv]deps}
+        -r{toxinidir}/requirements-dist.txt
+
+# In the commands, we copy the requirements.txt to be presented as a source file (.py)
+# so it gets included in the .deb package for others to consume
+commands =
+        sh -c 'cp requirements.txt src/osm_ngsa/requirements.txt'
+        sh -c 'cp README.rst src/osm_ngsa/README.rst'
+        python3 setup.py --command-packages=stdeb.command sdist_dsc
+        sh -c 'cd deb_dist/osm-ngsa*/ && dpkg-buildpackage -rfakeroot -uc -us'
+        sh -c 'rm src/osm_ngsa/requirements.txt'
+        sh -c 'rm src/osm_ngsa/README.rst'
+allowlist_externals = sh
+
+
 #######################################################################################
 [flake8]
 ignore =