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
= $(PACKAGE
)-$(VERSION
).
tar.gz
12 WHEEL
= $(PACKAGE
)-$(VERSION
)-py3-none-any.whl
13 URL
= $(REPO
)/releases
/download
/$(TAG
)
18 tox
-e py38-cryptography
-- -n auto
21 python setup.py
install --prefix=$(prefix)
24 rm -rf __pycache__ build
dist .tox
25 rm -f
*.pyc MANIFEST
*.orig
*.rej
*.html
*.class
test/*.pyc
26 rm -rf doc
/_build doc
/_static doc
/_templates doc
/html
27 rm -rf .coverage cover
*
29 rm -f
test/files
/*.rar.
[pjt
]* *.diffs
35 for fn in
test/files
/*.py38-cryptography
; do \
36 cp
$$fn `echo $$fn | sed 's/[.]py.*/.exp/'` || exit
1; \
40 @echo
"Checking version - $(VERSION)"
41 @grep
-qE
'^\w+ $(RXVERSION)\b' $(NEWS
) \
42 ||
{ echo
"Version '$(VERSION)' not in $(NEWS)"; exit
1; }
43 @echo
"Checking git repo"
44 @git diff
--stat
--exit-code ||
{ echo
"ERROR: Unclean repo"; exit
1; }
48 git push github
$(TAG
):$(TAG
)
51 mkdir
-p
dist && rm -f
dist/*
52 cd
dist && wget
-q
$(URL
)/$(TGZ
)
53 cd
dist && wget
-q
$(URL
)/$(WHEEL
)
55 unzip
-t
dist/$(WHEEL
)
56 twine upload
dist/$(TGZ
) dist/$(WHEEL
)
59 awk
-v VER
="$(VERSION)" -f doc
/note.awk
$(NEWS
) \
60 | pandoc
-f rst
-t gfm
--wrap
=none
63 git push github
:$(TAG
)
67 python3 setup.py sdist
68 rm -rf
$(PACKAGE
)-$(VERSION
)
70 cd
$(PACKAGE
)-$(VERSION
) && tox