-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 728 Bytes
/
Makefile
File metadata and controls
30 lines (23 loc) · 728 Bytes
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
# Copyright (C) 2020 The F4PGA Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
SHELL=bash
PYTHON?=python3
ALL_EXCLUDE = third_party .git env build
FORMAT_EXCLUDE = $(foreach x,$(ALL_EXCLUDE),-and -not -path './$(x)/*')
PYTHON_SRCS=$(shell find . -name "*py" $(FORMAT_EXCLUDE))
IN_ENV = if [ -e env/bin/activate ]; then . env/bin/activate; fi;
env:
$(PYTHON) -mvenv env
$(IN_ENV) pip install --upgrade -r requirements.txt
format: ${PYTHON_SRCS}
$(IN_ENV) yapf -i ${PYTHON_SRCS}
test-py:
$(IN_ENV) pytest -s --doctest-modules
clean:
rm -rf env
.PHONY: clean env build test-py