licheck/Makefile

72 lines
1.9 KiB
Makefile
Raw Permalink Normal View History

2021-07-18 18:12:10 +02:00
#!/usr/bin/env make
#
# Makefile
#
# Copyright (C) 2021-2022 Franco Masotti (franco \D\o\T masotti {-A-T-} tutanota \D\o\T com)
2021-07-18 18:12:10 +02:00
#
# This file is part of licheck.
#
# licheck is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# licheck is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with licheck. If not, see <http://www.gnu.org/licenses/>.
#
export PACKAGE_NAME=licheck
default: doc
doc: clean
pipenv run $(MAKE) -C docs html
install:
pip3 install . --user
uninstall:
2021-10-05 18:42:36 +02:00
pip3 uninstall --verbose --yes $(PACKAGE_NAME)
2021-07-18 18:12:10 +02:00
install-dev:
pipenv install --dev
pipenv run pre-commit install
pipenv graph
pipenv check
2021-07-18 18:12:10 +02:00
uninstall-dev:
rm -f Pipfile.lock
2021-07-18 18:12:10 +02:00
pipenv --rm
update: install-dev
pipenv run pre-commit autoupdate
2021-07-18 18:12:10 +02:00
test:
pipenv run python -m unittest $(PACKAGE_NAME).tests.tests --failfast --locals --verbose
dist:
pipenv run python setup.py sdist
2021-08-06 10:43:42 +02:00
# Create a reproducible archve at least on the wheel.
# See
# https://bugs.python.org/issue31526
# https://bugs.python.org/issue38727
# https://github.com/pypa/setuptools/issues/1468
# https://github.com/pypa/setuptools/issues/2133
# https://reproducible-builds.org/docs/source-date-epoch/
SOURCE_DATE_EPOCH=$$(git log -1 --pretty=%ct) pipenv run python setup.py bdist_wheel
2021-07-18 18:12:10 +02:00
pipenv run twine check dist/*
upload:
pipenv run twine upload dist/*
clean:
rm -rf build dist *.egg-info
2021-07-18 18:12:10 +02:00
pipenv run $(MAKE) -C docs clean
.PHONY: default doc install uninstall install-dev uninstall-dev update test clean demo