-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (22 loc) · 829 Bytes
/
Copy pathMakefile
File metadata and controls
29 lines (22 loc) · 829 Bytes
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
.PHONY: build test clean sdist wheel rpm deb
build:
python3 setup.py build
test: build
@BUILD_DIR=$$(ls -d build/lib.*-*-* 2>/dev/null | head -1); \
[ -n "$$BUILD_DIR" ] || (echo "Error: build directory not found." && exit 1); \
PYTHONPATH=$$BUILD_DIR python3 -m unittest tests.test -v
sdist:
python3 setup.py sdist
wheel: build
python3 setup.py bdist_wheel
SRCNAME := python3-libconfig
VERSION := $(shell python3 setup.py --version 2>/dev/null)
rpm:
mkdir -p ~/.rpmbuild/SOURCES
git archive HEAD --format=tar.gz --prefix=$(SRCNAME)-$(VERSION)/ \
-o ~/.rpmbuild/SOURCES/$(SRCNAME)-$(VERSION).tar.gz
rpmbuild -ba python3-libconfig.spec
clean:
rm -rf build dist pylibconfig.egg-info *.deb
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
find . -name '*.pyc' -delete 2>/dev/null || true