Commit d77f307d authored by Jameson Rollins's avatar Jameson Rollins

make: use python3

parent 56afec27
......@@ -4,7 +4,7 @@ PACKAGE = guardian
SVERS := $(shell git describe | sed -e 's/_/~/' -e 's/-/+/' -e 's/-/~/' -e 's|.*/||')
VFILE := lib/guardian/_version.py
CVERS := $(shell test -e $(VFILE) && python -c "execfile('$(VFILE)'); print __version__")
CVERS := $(shell test -e $(VFILE) && PYTHONPATH=lib python3 -m guardian.version)
DIST := $(PACKAGE)-$(SVERS)
WITH_SYSTEMD := $(shell which systemd-run)
......@@ -43,11 +43,11 @@ _release-commit: test version
git add $(VFILE)
git commit -m "Release $(VERSION)"
git tag -m "Release" $(VERSION)
release-major: VERSION = $(shell PYTHONPATH=lib python -m guardian.version -r major $(SVERS))
release-major: VERSION = $(shell PYTHONPATH=lib python3 -m guardian.version -r major $(SVERS))
release-major: _release-commit
release-minor: VERSION = $(shell PYTHONPATH=lib python -m guardian.version -r minor $(SVERS))
release-minor: VERSION = $(shell PYTHONPATH=lib python3 -m guardian.version -r minor $(SVERS))
release-minor: _release-commit
release-rev: VERSION = $(shell PYTHONPATH=lib python -m guardian.version -r rev $(SVERS))
release-rev: VERSION = $(shell PYTHONPATH=lib python3 -m guardian.version -r rev $(SVERS))
release-rev: _release-commit
release: release-rev
......@@ -55,19 +55,19 @@ release: release-rev
.PHONY: dist
dist: version
python ./setup.py sdist
python3 ./setup.py sdist
.PHONY: build
build: version
python ./setup.py build
python3 ./setup.py build
.PHONY: install
ifndef PREFIX
install: version
python ./setup.py install
python3 ./setup.py install
else
install: version
python ./setup.py install --prefix=$(PREFIX)
python3 ./setup.py install --prefix=$(PREFIX)
endif
##################################################
......@@ -91,7 +91,7 @@ deb-src:
rm -rf build/$(DIST)
mkdir -p build/$(VERSION)
git archive master | tar -x -C build/$(VERSION)/
cd build/$(VERSION) && python setup.py sdist
cd build/$(VERSION) && python3 setup.py sdist
mv build/$(VERSION)/dist/$(DIST).tar.gz build/$(PACKAGE)_$(VERSION).orig.tar.gz
cd build && tar xf $(PACKAGE)_$(VERSION).orig.tar.gz
mkdir build/$(DIST)/debian
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment