From f0e724b620effc68f828086240832a6dde9aa444 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sat, 23 Nov 2019 21:08:17 +0100 Subject: [PATCH] Switch build system to Python 3 But still allow easy override (make ... PYTHON=python2). --- Makefile | 7 ++++--- setup.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 141685f..7515457 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ +PYTHON = python3 SPHINXOPTS = -W -SPHINXBUILD = sphinx-build +SPHINXBUILD = $(PYTHON) -m sphinx DOCDIR = doc DOCHTML = $(DOCDIR)/html DOCTREES = $(DOCDIR)/doctrees @@ -13,7 +14,7 @@ REPS = 5 all: doc test $(MODNAME): xattr.c - ./setup.py build_ext --inplace + $(PYTHON) ./setup.py build_ext --inplace $(DOCHTML)/index.html: $(MODNAME) $(RSTFILES) $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCHTML) @@ -22,7 +23,7 @@ $(DOCHTML)/index.html: $(MODNAME) $(RSTFILES) doc: $(DOCHTML)/index.html dist: - fakeroot ./setup.py sdist + fakeroot $(PYTHON) ./setup.py sdist test: @for ver in $(PYVERS); do \ diff --git a/setup.py b/setup.py index 4cd944b..26df53c 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 import distutils import platform -- 2.39.5