| 1 | # SPDX-License-Identifier: MPL-2.0 |
| 2 | # |
| 3 | # libpathrs: safe path resolution on Linux |
| 4 | # Copyright (C) 2019-2025 SUSE LLC |
| 5 | # Copyright (C) 2026 Aleksa Sarai <[email protected]> |
| 6 | # |
| 7 | # This Source Code Form is subject to the terms of the Mozilla Public |
| 8 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
| 9 | # file, You can obtain one at https://mozilla.org/MPL/2.0/. |
| 10 | |
| 11 | PYTHON ?= python3 |
| 12 | PIP ?= pip3 |
| 13 | |
| 14 | SRC_FILES := $(wildcard *.py pathrs/*.py) |
| 15 | |
| 16 | dist: $(SRC_FILES) pyproject.toml |
| 17 | $(PYTHON) -m build |
| 18 | |
| 19 | .PHONY: clean |
| 20 | clean: |
| 21 | rm -rf dist/ pathrs.*-info/ pathrs/__pycache__/ pathrs/_libpathrs_cffi.* |
| 22 | |
| 23 | .PHONY: lint |
| 24 | lint: |
| 25 | ruff format --check --diff . |
| 26 | ruff check . |
| 27 | mypy . |
| 28 | |
| 29 | .PHONY: install |
| 30 | install: dist |
| 31 | $(PIP) install dist/pathrs*.whl |