-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (52 loc) · 1.33 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
63
64
65
66
67
68
69
70
71
72
73
74
75
.PHONY: clean install data requirements
# init
SHELL=/bin/bash
PROJECT_NAME=datatracker
CONDA_BASE:=$(shell conda info --base)
# install
update-pip:
pip install -U setuptools wheel twine
install: clean update-pip
pip install -e .
install-setup: clean update-pip
python setup.py install
install-reqs:
pip install -r requirements.txt
freeze-reqs: install-requirements
pip freeze > requirements.txt
version:
@python -c 'import datatracker; print(datatracker.__version__)'
lib-version:
@python -c 'import $(NAME); print($(NAME).__version__)'
# clean
clean: clean-py
clean-py: clean-build clean-pyc clean-test
clean-pyc:
find . -name '*.py[co]' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
clean-test:
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
# build
build: clean-py
python setup.py sdist bdist_wheel
twine check dist/*
upload-test:
twine upload --repository testpypi dist/*
upload:
twine upload dist/*
# env
create-env:
conda create --name $(PROJECT_NAME) python=3.7.4 jupyter=1.0.0
remove-env: clean
( source $(CONDA_BASE)/etc/profile.d/conda.sh && \
conda deactivate && \
conda remove --name $(PROJECT_NAME) --all )