fattura-elettronica-reader/Makefile

74 lines
2.1 KiB
Makefile
Raw Normal View History

2019-08-10 13:12:47 +02:00
#!/usr/bin/env make
#
# Makefile
#
2021-12-21 18:19:20 +01:00
# Copyright (C) 2019-2021 Franco Masotti (franco \D\o\T masotti {-A-T-} tutanota \D\o\T com)
2019-08-10 13:12:47 +02:00
#
# This file is part of fattura-elettronica-reader.
#
# fattura-elettronica-reader 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.
#
# fattura-elettronica-reader 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 fattura-elettronica-reader. If not, see <http://www.gnu.org/licenses/>.
#
export PACKAGE_NAME=fattura_elettronica_reader
2019-08-10 13:12:47 +02:00
default: doc
2019-08-10 13:12:47 +02:00
2021-01-08 12:34:32 +01:00
doc: clean
pipenv run $(MAKE) -C docs html
2019-08-10 13:12:47 +02:00
install:
pip3 install . --user
2019-08-10 13:12:47 +02:00
uninstall:
2021-09-20 12:09:08 +02:00
pip3 uninstall --verbose --yes $(PACKAGE_NAME)
2019-08-10 13:12:47 +02:00
install-dev:
pipenv install --dev
pipenv run pre-commit install
2021-10-16 22:39:22 +02:00
pipenv graph
pipenv check
uninstall-dev:
2021-10-18 17:47:23 +02:00
rm -f Pipfile.lock
pipenv --rm
update: install-dev
pipenv run pre-commit autoupdate
test:
2021-06-07 18:53:05 +02:00
pipenv run python -m unittest $(PACKAGE_NAME).tests.tests --failfast --locals --verbose
2019-08-10 13:12:47 +02:00
dist:
pipenv run python setup.py sdist
# 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/
2021-12-21 23:19:39 +01:00
SOURCE_DATE_EPOCH=$$(git -c log.showSignature='false' log -1 --pretty=%ct) pipenv run python setup.py bdist_wheel
pipenv run twine check dist/*
2019-08-10 13:12:47 +02:00
upload:
pipenv run twine upload dist/*
2019-08-10 13:12:47 +02:00
clean:
rm -rf build dist *.egg-info
# Remove all markdown files except the readme.
find -regex ".*\.[mM][dD]" ! -name 'README.md' ! -name 'CONTRIBUTING.md' -type f -exec rm -f {} +
pipenv run $(MAKE) -C docs clean
2019-08-10 13:12:47 +02:00
2021-11-13 01:17:27 +01:00
.PHONY: default doc install uninstall install-dev uninstall-dev update test clean