Deb package creation for NG-SA
Change-Id: I96bb72bfd77e0c57215ba62abdbdaf8df5bb8cde
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/tox.ini b/tox.ini
index 7247cf3..4a9dcbf 100644
--- a/tox.ini
+++ b/tox.ini
@@ -104,6 +104,23 @@
#######################################################################################
+[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'
+whitelist_externals = sh
+
+
+#######################################################################################
[flake8]
ignore =
W291,