-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
91 lines (71 loc) · 2.65 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
NAME = SparseEdges
VERSION=`python3.11 -c'import SparseEdges; print(SparseEdges.__version__)'`
PYTHON = python3.11
UNAME_S := $(shell uname -s)
PIP = python3.11 -m pip
default: $(NAME).pdf index.html
# check out http://stackoverflow.com/questions/714100/os-detecting-makefile#12099167
test2:
echo `uname`
if [ `uname` = Darwin ]; then \
echo "This is a system under evolution"; \
else \
echo "This is not such a system."; \
fi
edit:
mvim -p setup.py src/__init__.py src/$(NAME).py README.md Makefile requirements.txt
# https://docs.python.org/3/distutils/packageindex.html
pypi_all: pypi_tags pypi_upload
pypi_tags:
git commit -am' tagging for PyPI '
# in case you wish to delete tags, visit http://wptheming.com/2011/04/add-remove-github-tags/
git tag $(VERSION) -m "Adds a tag so that we can put this on PyPI."
git push --tags origin master
pypi_upload:
$(PYTHON) setup.py sdist #upload
twine upload -u LaurentPerrinet dist/*
pypi_docs:
rm web.zip
zip web.zip index.html
open https://pypi.python.org/pypi?action=pkg_edit&name=$NAME
RIOU = /hpc/invibe/perrinet.l/$(NAME)
FRIOUL = [email protected]
OPTIONS = -av --delete --progress --exclude .AppleDouble --exclude .git
transfer_to_riou:
rsync $(OPTIONS) probe $(FRIOUL):$(RIOU)/
transfer_from_riou:
rsync $(OPTIONS) $(FRIOUL):$(RIOU)/probe/{cache_dir,debug.log} ./probe
install_dev:
pip3 uninstall -y $(NAME) ; pip3 install -e .
todo:
grep -R * (^|#)[ ]*(TODO|FIXME|XXX|HINT|TIP)( |:)([^#]*)
pull:
cd ../SLIP; git pull; cd ../SparseEdges/
cd ../LogGabor; git pull; cd ../SparseEdges/
git pull
update:
cd ../SLIP; git pull; $(PIP) install -U --user . ; cd ../SparseEdges/
cd ../LogGabor; git pull; $(PIP) install -U --user . ; cd ../SparseEdges/
git pull; $(PIP) install -U --user .
update_dev:
cd ../SLIP; git pull; $(PIP) uninstall -y SLIP; $(PIP) install --user -e . ; cd ../SparseEdges/
cd ../LogGabor; git pull; $(PIP) uninstall -y LogGabor; $(PIP) install --user -e . ; cd ../SparseEdges/
git pull; $(PIP) uninstall -y $(NAME) ; $(PIP) install --user -e .
console:
open -a /Applications/Utilities/Console.app/ log-sparseedges-debug.log
# macros for tests
index.html: $(NAME).ipynb
jupyter nbconvert --SphinxTransformer.author='Laurent Perrinet (INT, UMR7289)' --to html index.html $(NAME).ipynb
run_all:
for i in *.py; do echo $i; i$(PYTHON) $i ; done
%.pdf: %.ipynb
jupyter nbconvert --SphinxTransformer.author='Laurent Perrinet (INT, UMR7289)' --to pdf $<
# cleaning macros
clean_tmp:
#find . -name .AppleDouble -type d -exec rm -fr {} \;
find . -name *lock* -exec rm -fr {} \;
rm frioul.*
rm log-edge-debug.log
clean:
rm -fr figures/* *.pyc *.py~ build dist
.PHONY: clean