forked from rigetti/pyquil
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (49 loc) · 1.16 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
COMMIT_HASH=$(shell git rev-parse --short HEAD)
DEFAULT_QUILC_URL=tcp://localhost:5555
DEFAULT_QVM_URL=http://localhost:5000
DOCKER_TAG=rigetti/forest:$(COMMIT_HASH)
.PHONY: all
all: dist
.PHONY: clean
clean:
rm -rf dist
rm -rf pyquil.egg-info
rm -rf .pytest_cache/
.PHONY: config
config:
echo "[Rigetti Forest]" > ~/.forest_config
echo "qvm_address = ${DEFAULT_QVM_URL}" >> ~/.forest_config
echo "quilc_address = ${DEFAULT_QUILC_URL}" >> ~/.forest_config
cat ~/.forest_config
.PHONY: dist
dist:
python setup.py sdist
.PHONY: docs
docs: CHANGELOG.md
pandoc --from=markdown --to=rst --output=docs/source/changes.rst CHANGELOG.md
make -C docs html
.PHONY: docker
docker: Dockerfile
docker build -t $(DOCKER_TAG) .
.PHONY: info
info:
python -V
pip freeze
.PHONY: install
install:
pip install -e .
.PHONY: requirements
requirements: requirements.txt
pip install -r requirements.txt
.PHONY: style
style:
flake8 pyquil
.PHONY: test
test:
pytest -v --runslow --cov=pyquil
.PHONY: upload
upload:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
.PHONY: version
version:
@git describe --tags | sed 's/v//' | sed 's/\(.*\)-.*/\1/'| sed 's/-/./'