1
# -*- mode: makefile; coding: utf-8 -*-
2
# Copyright © 2003 Colin Walters <walters@debian.org>
3
# Copyright © 2004-2005 Jonas Smedegaard <dr$jones.dk>
4
# Description: Defines useful variables for Python libraries and programs
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of the GNU General Public License as
8
# published by the Free Software Foundation; either version 2, or (at
9
# your option) any later version.
11
# This program is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22
ifndef _cdbs_bootstrap
23
_cdbs_scripts_path ?= /usr/lib/cdbs
24
_cdbs_rules_path ?= /usr/share/cdbs/1/rules
25
_cdbs_class_path ?= /usr/share/cdbs/1/class
28
ifndef _cdbs_class_python_distutils_vars
29
_cdbs_class_python_distutils_vars := 1
31
# These should reflect the system
32
DEB_PYTHON_DEFAULT_VERSION := $(shell /usr/bin/python -V 2>&1 | sed 's/^[^0-9]*\([0-9]\+.[0-9]\+\)[^0-9].*/\1/')
33
DEB_PYTHON_NEXT_VERSION := $(shell expr '$(DEB_PYTHON_DEFAULT_VERSION)' : '[^0-9]*\([0-9]\+\).').$(shell expr '(' '$(DEB_PYTHON_DEFAULT_VERSION)' : '[^0-9]*[0-9]\+.\([0-9]\+\)' ')' + 1)
35
# Common build options
36
DEB_PYTHON_SETUP_CMD = setup.py
37
DEB_PYTHON_CLEAN_ARGS = -a
38
DEB_PYTHON_BUILD_ARGS = --build-base="$(DEB_BUILDDIR)/build"
39
DEB_PYTHON_INSTALL_ARGS_ALL = --no-compile -O0
40
DEB_PYTHON_DESTDIR = debian/$(cdbs_curpkg)
42
# Properly named Python libraries are preferred
43
DEB_PYTHON_VERSIONS = 2.1 2.2 2.3 2.4
44
DEB_PYTHON_REAL_LIB_PACKAGES := $(strip $(filter $(patsubst %,python%%,$(DEB_PYTHON_VERSIONS)),$(DEB_ALL_PACKAGES)))
46
# Alternatively package simpler packages using default Python
47
DEB_PYTHON_SIMPLE_PACKAGES := $(strip $(filter python-%,$(DEB_ALL_PACKAGES)))
48
# Force using a non-default Python for simpler packages
49
DEB_PYTHON_COMPILE_VERSION =