forked from JGCRI/pygcam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (41 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# From http://peterdowns.com/posts/first-time-with-pypi.html
# To register a package on PyPiTest:
# python setup.py register -r pypitest
#
# Then to upload the actual package:
# python setup.py sdist upload -r pypitest
#
# Do the same with pypi instead of pypitest to go live
all: clean html sdist wheel
version = `./version.sh`
test-upload: # sdist
twine upload dist/pygcam-$(version).tar.gz -r testpypi
upload: pypi-upload
pypi-upload: sdist
twine upload dist/pygcam-$(version).tar.gz
clean-html:
make -C docs clean
html:
make -C docs html
pdf:
make -C docs latexpdf
clean-setup:
python setup.py clean
sdist:
python setup.py sdist
wheel:
python setup.py bdist_wheel
clean: clean-html clean-setup clean-requirements
dev:
pip install -e
EMPTY :=
SPACE := $(EMPTY) $(EMPTY)
RQMTS := $(shell cat requirements.in)
MODS := $(subst $(SPACE),|,$(RQMTS))
EXPR := $(shell printf "^(%s)=\n" '$(MODS)')
RTD_RQMTS = rtd.requirements.txt
clean-requirements:
rm $(RTD_RQMTS)
rtd-reqs $(RTD_RQMTS): requirements.in
python -V|sed -e 's/Python /python==/' > $(RTD_RQMTS)
pip freeze | egrep '$(EXPR)' >> $(RTD_RQMTS)