-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathMakefile
65 lines (48 loc) · 1.4 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
.PHONY: build dist redist install dist-no-cython install-from-source clean venv-create venv-activate check-dist test-pypi pypi-upload
build:
python setup.py build
dist:
python setup.py build bdist_wheel sdist
dist-no-cython:
CYTHONIZE=0 python setup.py build bdist_wheel
compile:
python setup.py build build_ext --inplace
redist: clean dist
install:
pip install .
install-from-source: dist
pip install dist/k-means-constrained-0.5.0.tar.gz
clean:
$(RM) -r build dist src/*.egg-info artifact
$(RM) -r .pytest_cache
find . -name __pycache__ -exec rm -r {} +
#git clean -fdX
venv-create:
conda create -n k-means-constrained python=3.10
conda activate k-means-constrained
pip install -r requirements.txt
pip install -r requirements-dev.txt
venv-activate:
# Doesn't work. Need to execute manually
conda activate k-means-constrained
venv-delete:
conda env delete k-means-constrained
docs:
sphinx-build -b html docs_source docs
source-dists:
rm -r dist
python setup.py sdist --formats=gztar
download-dists:
# e.g. `make download-dists ID=8`
# ID is run id (get from url. Not Job ID)
# Need gh installed. `brew install gh`
rm -r artifact || true
gh run download $(ID)
check-dist:
twine check artifact/*
test-pypi:
# Get API key from password manager
twine upload --repository-url https://test.pypi.org/legacy/ artifact/*
pypi-upload:
# Get API key from password manager
twine upload artifact/*