forked from openai/mujoco-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (34 loc) · 1.1 KB
/
Makefile
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
38
39
40
41
42
43
.PHONY: all clean build test mount_shell shell upload check-env
MUJOCO_LICENSE_PATH ?= ~/.mujoco/mjkey.txt
all: test
clean:
rm -rf mujoco_py.egg-info
rm -rf */__pycache__
rm -rf */*/__pycache__
rm -rf mujoco_py/generated/_pyxbld*
rm -rf mujoco_py/generated/*.so
rm -rf mujoco_py/generated/*.dll
rm -rf mujoco_py/generated_cymj*
rm -rf mujoco_py/cythonlock_*.pyc
rm -rf mujoco_py/cymj.c
rm -rf mujoco_py/__pycache__
rm -rf dist
rm -rf build
build: check-license
cp $(MUJOCO_LICENSE_PATH) mjkey.txt
docker build -t mujoco_py . || rm mjkey.txt && rm mjkey.txt
test: build
# run it interactive mode so we can abort with CTRL+C
docker run --rm -i mujoco_py pytest
mount_shell:
docker run --rm -it -v `pwd`:/code mujoco_py /bin/bash -c "pip3 uninstall -y mujoco_py; rm -rf /mujoco_py; (cd /code; /bin/bash)"
shell:
docker run --rm -it mujoco_py /bin/bash
upload:
rm -rf dist
python setup.py sdist
twine upload dist/*
check-license:
ifeq ("","$(wildcard $(MUJOCO_LICENSE_PATH))")
$(error "License key not found at location $(MUJOCO_LICENSE_PATH). Use MUJOCO_LICENSE_PATH to specify its path")
endif