-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile.template
More file actions
34 lines (27 loc) · 1.2 KB
/
Copy pathMakefile.template
File metadata and controls
34 lines (27 loc) · 1.2 KB
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
# Copyright (C) 2020 SymbiFlow 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
# The top directory where environment will be created.
TOP_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
# A pip `requirements.txt` file.
# https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
REQUIREMENTS_FILE := requirements.txt
# A conda `environment.yml` file.
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
ENVIRONMENT_FILE := environment.yml
# Rule to checkout the git submodule if it wasn't cloned.
$(TOP_DIR)/third_party/make-env/env.mk: $(TOP_DIR)/.gitmodules
cd $(TOP_DIR); git submodule update --init third_party/make-env
touch $(TOP_DIR)/third_party/make-env/env.mk
-include $(TOP_DIR)/third_party/make-env/env.mk
# Example make target which runs commands inside the conda environment.
example-command: | $(ENV_PYTHON)
$(IN_ENV) echo "Python is $$(which python)"
@$(IN_ENV) python --version
# Check that no system packages are found in the environment.
test-command: | $(ENV_PYTHON)
$(IN_ENV) python check.py