diff options
author | 2009-10-20 22:10:36 +0100 | |
---|---|---|
committer | 2009-10-20 22:10:36 +0100 | |
commit | 9f94ffc79bbebf2523b987840eb40a69d30cc9f0 (patch) | |
tree | 4f63e61b98228a91e7085cf19f902e09a483523c /python | |
parent | 9986c514a1f13287b3f36804a9aa3092229050ee (diff) | |
download | paludis-9f94ffc79bbebf2523b987840eb40a69d30cc9f0.tar.gz paludis-9f94ffc79bbebf2523b987840eb40a69d30cc9f0.tar.xz |
Kill QA, qualudis
Pretty much a lost cause on Gentoo, and for Exherbo we'll do this
differently.
Diffstat (limited to 'python')
-rw-r--r-- | python/Makefile.am | 17 | ||||
-rw-r--r-- | python/paludis_python.hh | 1 | ||||
-rw-r--r-- | python/paludis_python_so.cc | 3 | ||||
-rw-r--r-- | python/qa.cc | 123 | ||||
-rwxr-xr-x | python/qa_TEST.py | 77 | ||||
-rw-r--r-- | python/repository.cc | 27 |
6 files changed, 0 insertions, 248 deletions
diff --git a/python/Makefile.am b/python/Makefile.am index 444de40ea..da35e11ab 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -48,9 +48,6 @@ IF_PYTHON_TESTS = \ version_requirements_TEST.py \ version_spec_TEST.py -IF_PYTHON_QA_TESTS = \ - qa_TEST.py - IF_PYTHON_SOURCES = \ paludis_python.hh \ options.hh \ @@ -89,11 +86,7 @@ IF_PYTHON_SOURCES = \ BUILT_SOURCES = \ nice_names-nn.hh nice_names-nn.cc -IF_PYTHON_QA_SOURCES = \ - qa.cc - EXTRA_DIST = $(IF_PYTHON_TESTS) $(IF_PYTHON_SOURCES) \ - $(IF_PYTHON_QA_TESTS) $(IF_PYTHON_QA_SOURCES) \ paludis_python_so.cc \ additional_tests_so.cc \ choices_TEST_setup.sh choices_TEST_cleanup.sh \ @@ -126,7 +119,6 @@ TESTS_ENVIRONMENT = env \ PALUDIS_SUFFIXES_FILE="$(top_srcdir)/paludis/repositories/e/ebuild_entries_suffixes.conf" \ PALUDIS_DISTRIBUTIONS_DIR="$(top_srcdir)/paludis/distributions/" \ PALUDIS_DISTRIBUTION="gentoo" \ - PALUDIS_QA_DATA_DIR="$(top_srcdir)/paludis/repositories/e/qa/" \ PALUDIS_REPOSITORY_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/repositories`" \ PALUDIS_ENVIRONMENT_SO_DIR="`$(top_srcdir)/paludis/repositories/e/ebuild/utils/canonicalise $(top_builddir)/paludis/environments`" \ PALUDIS_ENABLE_VIRTUALS_REPOSITORY="$(PALUDIS_ENABLE_VIRTUALS_REPOSITORY_VALUE)" \ @@ -170,18 +162,9 @@ additional_tests_so.o : additional_tests_so.cc $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) -I$(PYTHON_INCLUDE_DIR) -c \ -o $@ $(srcdir)/additional_tests_so.cc ; then ln -fs .libs/addtional_tests_so.o $@ ; else rm -f $@ ; exit 1 ; fi -if ENABLE_QA - -libpaludispython_@PALUDIS_PC_SLOT@_la_SOURCES = $(IF_PYTHON_SOURCES) $(IF_PYTHON_QA_SOURCES) -TESTS = $(IF_PYTHON_TESTS) $(IF_PYTHON_QA_TESTS) - -else - libpaludispython_@PALUDIS_PC_SLOT@_la_SOURCES = $(IF_PYTHON_SOURCES) TESTS = $(IF_PYTHON_TESTS) -endif - libpaludispython_@PALUDIS_PC_SLOT@_la_LIBADD = \ $(top_builddir)/paludis/libpaludis_@PALUDIS_PC_SLOT@.la \ $(top_builddir)/paludis/util/libpaludisutil_@PALUDIS_PC_SLOT@.la diff --git a/python/paludis_python.hh b/python/paludis_python.hh index 01b53d305..39e1891e0 100644 --- a/python/paludis_python.hh +++ b/python/paludis_python.hh @@ -193,7 +193,6 @@ void expose_metadata_key() PALUDIS_VISIBLE; void expose_name() PALUDIS_VISIBLE; void expose_package_database() PALUDIS_VISIBLE; void expose_package_id() PALUDIS_VISIBLE; -void expose_qa() PALUDIS_VISIBLE; void expose_repository() PALUDIS_VISIBLE; void expose_selection() PALUDIS_VISIBLE; void expose_version_operator() PALUDIS_VISIBLE; diff --git a/python/paludis_python_so.cc b/python/paludis_python_so.cc index 6c8798916..adccaf935 100644 --- a/python/paludis_python_so.cc +++ b/python/paludis_python_so.cc @@ -56,8 +56,5 @@ BOOST_PYTHON_MODULE(paludis) expose_generator(); expose_selection(); expose_choices(); -#ifdef ENABLE_QA - expose_qa(); -#endif } diff --git a/python/qa.cc b/python/qa.cc deleted file mode 100644 index f28645561..000000000 --- a/python/qa.cc +++ /dev/null @@ -1,123 +0,0 @@ -/* vim: set sw=4 sts=4 et foldmethod=syntax : */ - -/* - * Copyright (c) 2007 Piotr Jaroszyński - * - * This file is part of the Paludis package manager. Paludis is free software; - * you can redistribute it and/or modify it under the terms of the GNU General - * Public License version 2, as published by the Free Software Foundation. - * - * Paludis 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. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include <python/paludis_python.hh> -#include <python/exception.hh> -#include <python/options.hh> - -#include <paludis/qa.hh> -#include <paludis/util/fs_entry.hh> - -using namespace paludis; -using namespace paludis::python; -namespace bp = boost::python; - -struct QAReporterWrapper : - QAReporter, - bp::wrapper<QAReporter> -{ - void message(const QAMessage & msg) - { - Lock l(get_mutex()); - - if (bp::override f = get_override("message")) - f(msg); - else - throw PythonMethodNotImplemented("QAReporter", "message"); - } - - void status(const std::string & msg) - { - Lock l(get_mutex()); - - if (bp::override f = get_override("status")) - f(msg); - else - throw PythonMethodNotImplemented("QAReporter", "status"); - } -}; - -void expose_qa() -{ - /** - * Enums - */ - enum_auto("QAMessageLevel", last_qaml, - "The importance of a QA notice."); - enum_auto("QACheckProperty", last_qacp, - "Properties of a QA check."); - - /** - * Options - */ - class_options<QACheckProperties>("QACheckProperties", "QACheckProperty", - "A collection of properties for a QA check."); - - /** - * QAMessage - */ - bp::class_<QAMessage> - ( - "QAMessage", - "NEED_DOC", - bp::init<const FSEntry &, const QAMessageLevel, const std::string &, const std::string &>() - ) - - .add_property("entry", - &named_values_getter<QAMessage, n::entry, FSEntry, &QAMessage::entry>, - &named_values_setter<QAMessage, n::entry, FSEntry, &QAMessage::entry>, - "[rw] FSEntry" - ) - - .add_property("level", - &named_values_getter<QAMessage, n::level, QAMessageLevel, &QAMessage::level>, - "[ro] QAMessageLevel" - ) - - .add_property("name", - &named_values_getter<QAMessage, n::name, std::string, &QAMessage::name>, - "[ro] String" - ) - - .add_property("message", - &named_values_getter<QAMessage, n::message, std::string, &QAMessage::message>, - "[ro] String" - ) - ; - - /** - * QAReporter - */ - bp::class_<QAReporterWrapper, boost::noncopyable> - ( - "QAReporter", - "NEED_DOC", - bp::init<>() - ) - .def("message", bp::pure_virtual(&QAReporter::message), - "message(QAMessage)\n" - "NEED_DOC" - ) - .def("status", bp::pure_virtual(&QAReporter::status), - "status(str)\n" - "NEED_DOC" - ) - ; -} - diff --git a/python/qa_TEST.py b/python/qa_TEST.py deleted file mode 100755 index 07a86f337..000000000 --- a/python/qa_TEST.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python -# vim: set fileencoding=utf-8 sw=4 sts=4 et : - -# -# Copyright (c) 2007 Piotr Jaroszyński -# -# This file is part of the Paludis package manager. Paludis is free software; -# you can redistribute it and/or modify it under the terms of the GNU General -# Public License version 2, as published by the Free Software Foundation. -# -# Paludis 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. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place, Suite 330, Boston, MA 02111-1307 USA -# - -from paludis import * -import unittest - -class TestCase_01_QACheckProperties(unittest.TestCase): - def test_01_create(self): - QACheckProperties() - - def test_02_set(self): - qcp = QACheckProperties() - - self.assert_(qcp.none) - - qcp += QACheckProperty.NEEDS_BUILD - self.assert_(qcp[QACheckProperty.NEEDS_BUILD]) - qcp += QACheckProperty.NEEDS_NETWORK - self.assert_(qcp[QACheckProperty.NEEDS_NETWORK]) - -class TestCase_02_QAMessage(unittest.TestCase): - def test_01_create(self): - qm = QAMessage("entry", QAMessageLevel.DEBUG, "name", "message") - - def test_02_data_members(self): - qm = QAMessage("entry", QAMessageLevel.DEBUG, "name", "message") - - self.assertEquals(qm.entry, "entry") - self.assertEquals(qm.level, QAMessageLevel.DEBUG) - self.assertEquals(qm.name, "name") - self.assertEquals(qm.message, "message") - -class TestCase_03_QAReporter(unittest.TestCase): - import paludis - if hasattr(paludis, "QAReporter"): - class PyQAR(QAReporter): - def __init__(self): - QAReporter.__init__(self) - - def message(self, msg): - return 1 - - def status(self, str): - return 1 - - def test_01_create(self): - QAReporter() - - def test_02_no_message(self): - self.assertRaises(Exception, QAReporter().message, QAMessageLevel.DEBUG, "foo", "foo") - - def test_03_subclass(self): - self.assert_(isinstance(self.PyQAR(), QAReporter)) - - def test_04_subclass_message(self): - self.assertEquals(self.PyQAR().message(QAMessage("foo", QAMessageLevel.DEBUG, "foo", "foo")), 1) - - -if __name__ == "__main__": - unittest.main() diff --git a/python/repository.cc b/python/repository.cc index 67df17d8a..bca8cc646 100644 --- a/python/repository.cc +++ b/python/repository.cc @@ -27,7 +27,6 @@ #include <paludis/action.hh> #include <paludis/package_id.hh> #include <paludis/environment.hh> -#include <paludis/qa.hh> #include <paludis/util/options.hh> #include <paludis/util/wrapped_forward_iterator.hh> @@ -81,12 +80,6 @@ struct RepositoryWrapper : return self.e_interface(); } - static RepositoryQAInterface * - get_qa_interface(const Repository & self) - { - return self.qa_interface(); - } - static PyObject * find_metadata(const Repository & self, const std::string & key) { @@ -246,11 +239,6 @@ void expose_repository() "[ro] RepositoryEInterface" ) - .add_property("qa_interface", bp::make_function(&RepositoryWrapper::get_qa_interface, - bp::return_internal_reference<>()), - "[ro] RepositoryQAInterface" - ) - .def("format_key", &Repository::format_key, "The format_key, if not None, holds our repository's format" ) @@ -382,21 +370,6 @@ void expose_repository() ; /** - * RepositoryQAInterface - */ - bp::class_<RepositoryQAInterface, boost::noncopyable> - ( - "RepositoryQAInterface", - "Interface for handling QA tasks.", - bp::no_init - ) - .def("check_qa", &RepositoryQAInterface::check_qa, - "check_qa(QAReporter, QACheckProperties, QACheckProperties, QAMessageLevel, path)\n" - "NEED_DOC" - ) - ; - - /** * FakeRepository */ bp::implicitly_convertible<std::tr1::shared_ptr<FakeRepository>, std::tr1::shared_ptr<Repository> >(); |