-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
42 lines (32 loc) · 991 Bytes
/
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
.PHONY: clean deploy format install mount sdist test uninstall upload
# Remove unnecessary data
clean:
rm -rf build dist MetaSBT.egg-info
find metasbt -type f -iname "*.pyc" -delete
find metasbt -type d -iname "__pycache__" -delete
# Shortcut for building and uploading package
deploy: sdist upload clean
# Format code with black
format:
black --line-length 120 .
# Install requirements and software
install: metasbt/requirements.txt dist
pip install -r metasbt/requirements.txt
find dist -type f -iname "MetaSBT-*.tar.gz" -exec pip install {} \;
# Run linting with tox
lint: tox.ini
tox -e lint
# Shortcut for building and installing package
mount: sdist install clean
# Create the new distribution
sdist: setup.py
python setup.py sdist
# Run all unit tests
test:
find metasbt/tests/ -type f -iname "*.py" -exec python {} \;
# Uninstall package
uninstall:
pip uninstall metasbt
# Upload the new distribution to the Python Package Index
upload: sdist
twine upload dist/*