-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (37 loc) · 1.18 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
PYTHON = python3.10
all: doc
# Generate the documentation (under build/csw)
doc:
test -d .venv || $(MAKE) venv
pipenv run pdoc3 --force --html --output-dir build csw
pipenv run pdoc3 --force --html --output-dir build esw
test -d docs/csw || mkdir docs/csw
test -d docs/esw || mkdir docs/esw
rm -f docs/*.html docs/csw/*.html docs/esw/*.html
cp build/csw/*.html docs/csw
cp build/esw/*.html docs/esw
# Run tests against an included, Scala based assembly
test: all
$(MAKE) venv
./runTests.sh
# Remove generated files
clean:
(cd tests/testSupport; sbt clean)
rm -rf build dist target .venv
# Upload release (requires username, password)
release: doc
rm -rf dist build tmtpycsw.egg-info
$(PYTHON) -m pip install --upgrade setuptools wheel
$(PYTHON) setup.py sdist bdist_wheel
$(PYTHON) -m pip install --upgrade twine
$(PYTHON) -m twine upload dist/*
# Create a virtual env in the .venv dir
# To activate this project's virtualenv, run pipenv shell.
# Alternatively, run a command inside the virtualenv with pipenv run
# (or source one of the activate* scripts in the .venv/bin dir)
venv:
rm -rf .venv
mkdir .venv
$(PYTHON) -m venv .venv
pipenv run pip install pdoc3
pipenv install