diff --git a/Examples/python-scipy-insecure/Makefile b/Examples/python-scipy-insecure/Makefile index 1c070f97..5182fd41 100644 --- a/Examples/python-scipy-insecure/Makefile +++ b/Examples/python-scipy-insecure/Makefile @@ -9,16 +9,8 @@ include ../../Scripts/Makefile.configs -# Constants - -# By default, Graphene runs the system Python 3.5 executable. -PYTHONVERSION ?= python3.5 -PYTHONPATH ?= /usr - -PYTHONHOME = $(PYTHONPATH)/lib/$(PYTHONVERSION) -PYTHONEXEC = $(PYTHONPATH)/bin/$(PYTHONVERSION) -PYTHONDISTHOME = $(PYTHONPATH)/lib/python3/dist-packages -PYTHONSHORTVERSION = $(subst python,,$(subst .,,$(PYTHONVERSION))) +# Python constants are declared in Makefile.python +include ../../Scripts/Makefile.python # Relative path to Graphene root GRAPHENEDIR ?= ../.. diff --git a/Examples/python-simple/Makefile b/Examples/python-simple/Makefile index 9a26a97a..e940ed48 100644 --- a/Examples/python-simple/Makefile +++ b/Examples/python-simple/Makefile @@ -9,16 +9,8 @@ include ../../Scripts/Makefile.configs -# Constants - -# By default, Graphene runs the system Python 3.5 executable. -PYTHONVERSION ?= python3.5 -PYTHONPATH ?= /usr - -PYTHONHOME := $(PYTHONPATH)/lib/$(PYTHONVERSION) -PYTHONEXEC := $(PYTHONPATH)/bin/$(PYTHONVERSION) -PYTHONDISTHOME := $(PYTHONPATH)/lib/python3/dist-packages -PYTHONSHORTVERSION := $(subst python,,$(subst .,,$(PYTHONVERSION))) +# Python constants are declared in Makefile.python +include ../../Scripts/Makefile.python # Relative path to Graphene root GRAPHENEDIR ?= ../.. diff --git a/Scripts/Makefile.python b/Scripts/Makefile.python new file mode 100644 index 00000000..ead2fc13 --- /dev/null +++ b/Scripts/Makefile.python @@ -0,0 +1,8 @@ +# By default, Graphene runs the system Python 3.5 executable. +PYTHONVERSION ?= python3.5 +PYTHONPATH ?= /usr + +PYTHONHOME := $(PYTHONPATH)/lib/$(PYTHONVERSION) +PYTHONEXEC := $(PYTHONPATH)/bin/$(PYTHONVERSION) +PYTHONDISTHOME := $(PYTHONPATH)/lib/python3/dist-packages +PYTHONSHORTVERSION := $(subst python,,$(subst .,,$(PYTHONVERSION)))