This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
66 lines (57 loc) · 2.08 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
cvloopversion = $(shell python -c "import cvloop; print(cvloop.__version__)")
# Installs the editable version
install: uninstall package
pip3 install -e $(CURDIR)
# Installs the packaged version
testpackage: uninstall package
pip3 install dist/cvloop*.tar.gz
# Packs the package into the dist directory and signs it
package: clean doc
python3 setup.py sdist
gpg --detach-sign --armor dist/cvloop*.tar.gz
# Uninstalls the package from a local installation
uninstall:
pip3 freeze | grep cvloop > /dev/null ; \
if [ $$? -eq 0 ]; then \
pip3 uninstall cvloop -y ; \
fi
# Cleans up: Removes the packed package and sanitizes the examples file.
clean:
rm -rf dist
python3 tools/sanitize_ipynb.py examples/cvloop_examples.ipynb
for f in manual_tests/*.ipynb ; do python3 tools/sanitize_ipynb.py "$$f" ; done
# Creates the documentation and updates the functions ipynb.
doc:
python3 tools/create_functions_ipynb.py examples/cvloop_functions.ipynb
# Publishes to pypitest
testpublish: package
@read -p "Enter the name of this package to verify upload to pypi test: " name ; \
if [ "$$name" == "cvloop" ]; then \
twine register -r pypitest $$(ls dist/*.tar.gz) ; \
twine upload -r pypitest dist/* ; \
else \
echo 'Sorry, this was wrong. Please try again.' ; \
fi
# Publishes to pypi
publish: package updateforge
@read -p "Enter the name of this package to verify upload to pypi: " name ; \
if [ "$$name" == "cvloop" ]; then \
twine register -r pypi $$(ls dist/*.tar.gz) ; \
twine upload -r pypi dist/* ; \
cd ./tools/cvloop-feedstock \
&& git commit -am "Updating cvloop to version $(cvloopversion)" \
&& git push ; \
&& hub pull-request \
-b conda-forge/cvloop-feedstock:master \
-h shoeffner/cvloop-feedstock:master \
-m "Updating cvloop to version $(cvloopversion)" ; \
cd ../.. ; \
git commit ./tools/cvloop-feedstock -m "Updating submodule for $(cvloopversion)" ; \
else \
echo 'Sorry, this was wrong. Please try again.' ; \
fi
updateforge:
python3 tools/updaterecipe.py \
$(cvloopversion) \
$(shell shasum -a 256 dist/cvloop-*.tar.gz | cut -f 1 -d ' ') \
;