From dd056f8901582aa9bb9770c6ee34a3cf4acd2f4b Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Fri, 28 Dec 2012 10:58:34 +0100 Subject: [PATCH] Move "constants" to a new consts module Signed-off-by: Niels Thykier --- britney.py | 24 +++--------------------- consts.py | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 21 deletions(-) create mode 100644 consts.py diff --git a/britney.py b/britney.py index ff86896..b942ed6 100755 --- a/britney.py +++ b/britney.py @@ -213,31 +213,13 @@ from migrationitem import MigrationItem, HintItem from hints import HintCollection from britney import buildSystem from britney_util import same_source +from consts import (VERSION, SECTION, BINARIES, MAINTAINER, FAKESRC, + SOURCE, SOURCEVER, ARCHITECTURE, DEPENDS, CONFLICTS, + PROVIDES, RDEPENDS, RCONFLICTS) __author__ = 'Fabio Tranchitella and the Debian Release Team' __version__ = '2.0' -# source package -VERSION = 0 -SECTION = 1 -BINARIES = 2 -MAINTAINER = 3 -FAKESRC = 4 - -# binary package -SOURCE = 2 -SOURCEVER = 3 -ARCHITECTURE = 4 -# PREDEPENDS = 5 - No longer used by the python code -# - The C-code needs it for alignment reasons and still check it -# but ignore it if it is None (so keep it None). -DEPENDS = 6 -CONFLICTS = 7 -PROVIDES = 8 -RDEPENDS = 9 -RCONFLICTS = 10 - - class Britney(object): """Britney, the Debian testing updater script diff --git a/consts.py b/consts.py new file mode 100644 index 0000000..47670b2 --- /dev/null +++ b/consts.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- + +# Constants from britney.py +# +# Assuming constants are copyrightable, then they are: +# Copyright (C) 2001-2008 Anthony Towns +# Andreas Barth +# Fabio Tranchitella +# Copyright (C) 2010-2012 Adam D. Barratt + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# source package +VERSION = 0 +SECTION = 1 +BINARIES = 2 +MAINTAINER = 3 +FAKESRC = 4 + +# binary package +SOURCE = 2 +SOURCEVER = 3 +ARCHITECTURE = 4 +# PREDEPENDS = 5 - No longer used by the python code +# - The C-code needs it for alignment reasons and still check it +# but ignore it if it is None (so keep it None). +DEPENDS = 6 +CONFLICTS = 7 +PROVIDES = 8 +RDEPENDS = 9 +RCONFLICTS = 10