4 REPO
= https
://github.com
/markokr
/rarfile
7 PACKAGE
= $(shell python3 setup.py
--name
)
8 VERSION
= $(shell python3 setup.py
--version
)
9 RXVERSION
= $(shell python3 setup.py
--version | sed
's/\./[.]/g')
11 TGZ
= dist/$(PACKAGE
)-$(VERSION
).
tar.gz
12 URL
= $(REPO
)/releases
/download
/v
$(VERSION
)/$(PACKAGE
)-$(VERSION
).
tar.gz
17 tox
-e py38-cryptography
-- -n auto
20 python setup.py
install --prefix=$(prefix)
23 rm -rf __pycache__ build
dist .tox
24 rm -f
*.pyc MANIFEST
*.orig
*.rej
*.html
*.class
test/*.pyc
25 rm -rf doc
/_build doc
/_static doc
/_templates doc
/html
26 rm -rf .coverage cover
*
28 rm -f
test/files
/*.rar.
[pjt
]* *.diffs
34 for fn in
test/files
/*.py38-cryptography
; do \
35 cp
$$fn `echo $$fn | sed 's/[.]py.*/.exp/'` || exit
1; \
39 @echo
"Checking version - $(VERSION)"
40 @grep
-qE
'^\w+ $(RXVERSION)\b' $(NEWS
) \
41 ||
{ echo
"Version '$(VERSION)' not in $(NEWS)"; exit
1; }
42 @echo
"Checking git repo"
43 @git diff
--stat
--exit-code ||
{ echo
"ERROR: Unclean repo"; exit
1; }
47 git push github
$(TAG
):$(TAG
)
50 mkdir
-p
dist && rm -f
dist/*
51 cd
dist && wget
-q
$(URL
)
56 awk
-v VER
="$(VERSION)" -f doc
/note.awk
$(NEWS
) \
57 | pandoc
-f rst
-t gfm
--wrap
=none
60 git push github
:$(TAG
)
64 python3 setup.py sdist
65 rm -rf
$(PACKAGE
)-$(VERSION
)
67 cd
$(PACKAGE
)-$(VERSION
) && tox