OSDN Git Service

6387f175c1abac7a80c7994bd63008fabd65957f
[joypy/Thun.git] / Makefile
1 # My make-fu style is old and tired.  I just want to have a few helper commands.
2
3 TESTDIR = ./test00
4 VERSION = 0.4.0
5 WEBSERVER = sforman@shell.osdn.net
6
7 .PHONY: clean sdist test docs upload-docs
8
9
10 clean:
11         $(RM) -r Thun.egg-info/ dist/ build/ __pycache__/ $(TESTDIR)
12         find . -name '*.pyc' | xargs $(RM)
13
14 sdist:
15         python ./setup.py sdist bdist_wheel
16
17
18 # In order to support testing the code as installed
19 # create a virtualenv and install the source dist zip there.
20 test: sdist
21         $(RM) -r $(TESTDIR)
22         virtualenv --system-site-packages --never-download $(TESTDIR)
23         . $(TESTDIR)/bin/activate && \
24                 pip install --no-cache-dir --no-index ./dist/Thun-$(VERSION).tar.gz
25         echo "Type: source $(TESTDIR)/bin/activate"
26
27
28 docs:
29         cd ./docs && make && make mov && cd ./sphinx_docs && make html
30
31 upload-docs: docs
32         ssh $(WEBSERVER) /home/users/s/sf/sforman/backup-and-remove-htdocs
33         rsync -rv --progress ./docs/sphinx_docs/_build/html/ $(WEBSERVER):/home/groups/j/jo/joypy/htdocs/