File: Makefile

package info (click to toggle)
python-ajsonrpc 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 524 kB
  • sloc: python: 1,286; makefile: 56; sh: 17
file content (37 lines) | stat: -rw-r--r-- 788 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
ENV=$(CURDIR)/.env
BIN=$(ENV)/bin

.PHONY: help
# target: help - Display callable targets
help:
	@egrep "^# target:" [Mm]akefile

.PHONY: clean
# target: clean - Display callable targets
clean:
	@rm -rf build dist docs/_build
	@find . -name \*.py[co] -delete
	@find . -name *\__pycache__ -delete

env:
	@python3.8 -m venv $(ENV)

.PHONY: test
# target: test - test the code
test: env
	$(BIN)/python -m unittest

.PHONY: build
# target: build - Build package
build: clean
	$(BIN)/python setup.py sdist bdist_wheel

.PHONY: test-release
# target: test-release - Release package to test pypi
test-release: build
	$(BIN)/twine upload --repository-url https://test.pypi.org/legacy/ dist/*

.PHONY: release
# target: release - Release package to pypi
release: build
	$(BIN)/twine upload dist/*