Makefile
changeset 60 b19d0a86651b
parent 56 d48cf08cf448
child 62 00a196f8d14a
--- a/Makefile	Wed Mar 18 19:32:02 2020 +0100
+++ b/Makefile	Thu Mar 19 14:53:28 2020 +0100
@@ -1,7 +1,9 @@
-YML_PATH=
-YML2C=yml2c
-PKGVER=$(shell python setup.py -V)
-DEBVER=1
+PYTHON   := python3
+YML_PATH  =
+YML2C     = yml2c
+DEBVER   := 1
+PKGVER    = $(shell $(PYTHON) setup.py -V)
+TWINE    := $(PYTHON) -m twine
 
 all: homepage
 
@@ -26,10 +28,19 @@
 	mv -f dist/YML2-$(PKGVER).tar.gz YML2_$(PKGVER).orig.tar.gz
 
 python-yml2_$(PKGVER)-$(DEBVER)_all.deb:
-	python setup.py --command-packages=stdeb.command bdist_deb
+	$(PYTHON) setup.py --command-packages=stdeb.command bdist_deb
 	mv -f deb_dist/python-yml2_$(PKGVER)-$(DEBVER)_all.deb .
 
 clean:
 	rm -f *.html *.pyc *.pyo
 	rm -f YML2_$(PKGVER).orig.tar.gz
 	rm -f python-yml2_$(PKGVER)-$(DEBVER)_all.deb
+
+.PHONY: dist
+dist: dist/YML2-$(PKGVER).tar.gz
+	$(TWINE) check $<
+
+dist/YML2-$(PKGVER).tar.gz:
+	$(PYTHON) setup.py sdist
+	ls -lh dist/YML2-$(PKGVER).tar.gz
+