/
makefile
49 lines (35 loc) · 1.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
SHELL = /usr/bin/env bash
version = `python -c "import sand; print(sand.__version__)"`
img-name = sand
name = $(img-name)-$(version)
include docker/makefile
ci: test flake8
test:
py.test
flake8:
flake8 --ignore=E501 sand
# https://packaging.python.org/tutorials/distributing-packages/#working-in-development-mode
requirements:
pip install -r requirements.txt
env:
conda create --name sand python=3.9
conda install --force-reinstall -y -q --name sand -c conda-forge --file requirements.txt
source ${CONDA_PREFIX}/bin/activate sand && \
python setup.py develop
rm-env:
conda env remove --name sand
release: wheel sign upload clean tag
wheel:
python setup.py sdist bdist_wheel
sign:
gpg --detach-sign -a dist/$(name).tar.gz
gpg --detach-sign -a dist/$(name)-py3-none-any.whl
upload:
twine upload dist/$(name)-py3-none-any.whl dist/$(name)-py3-none-any.whl.asc
twine upload dist/$(name).tar.gz dist/$(name).tar.gz.asc
clean:
rm -rf build dist .egg sand.egg-info
tag:
git tag v$(version)
git push --tags
@echo "Now increment version in sand/__version__.py to start next release."