aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-14 20:18:11 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-14 20:18:11 +0000
commit02e9be5fde009ecec19d21edd654d1e3ff2577d8 (patch)
tree9043c15996b3a18b9f1663867e44179e0e23bceb
parent620f158cb6307705b1b02ac1c89e5598d6f6303c (diff)
downloadpaludis-02e9be5fde009ecec19d21edd654d1e3ff2577d8.tar.gz
paludis-02e9be5fde009ecec19d21edd654d1e3ff2577d8.tar.xz
Really fix python
-rw-r--r--python/exception.cc1
-rw-r--r--python/paludis_python.hh22
-rw-r--r--python/paludis_python_so.cc24
-rwxr-xr-xpython/repository_TEST.py2
4 files changed, 26 insertions, 23 deletions
diff --git a/python/exception.cc b/python/exception.cc
index 5a87f5f..1915c25 100644
--- a/python/exception.cc
+++ b/python/exception.cc
@@ -20,6 +20,7 @@
#include "exception.hh"
#include <paludis/util/private_implementation_pattern-impl.hh>
#include <paludis/util/instantiation_policy-impl.hh>
+#include <python/paludis_python.hh>
#include <map>
using namespace paludis;
diff --git a/python/paludis_python.hh b/python/paludis_python.hh
index 7bbfb9e..14aca88 100644
--- a/python/paludis_python.hh
+++ b/python/paludis_python.hh
@@ -23,6 +23,7 @@
#include <python/mutex.hh>
#include <paludis/util/tr1_memory.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/attributes.hh>
#include <boost/python.hpp>
@@ -156,4 +157,25 @@ namespace paludis
} // namespace paludis::python
} // namespace paludis
+void expose_action() PALUDIS_VISIBLE;
+void expose_contents() PALUDIS_VISIBLE;
+void expose_dep_list() PALUDIS_VISIBLE;
+void expose_dep_spec() PALUDIS_VISIBLE;
+void expose_dep_tag() PALUDIS_VISIBLE;
+void expose_environment() PALUDIS_VISIBLE;
+void expose_exception() PALUDIS_VISIBLE;
+void expose_fs_entry() PALUDIS_VISIBLE;
+void expose_log() PALUDIS_VISIBLE;
+void expose_mask() PALUDIS_VISIBLE;
+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_query() PALUDIS_VISIBLE;
+void expose_repository() PALUDIS_VISIBLE;
+void expose_version_operator() PALUDIS_VISIBLE;
+void expose_version_requirements() PALUDIS_VISIBLE;
+void expose_version_spec() PALUDIS_VISIBLE;
+
#endif
diff --git a/python/paludis_python_so.cc b/python/paludis_python_so.cc
index f7b413b..0090441 100644
--- a/python/paludis_python_so.cc
+++ b/python/paludis_python_so.cc
@@ -19,28 +19,7 @@
#include <boost/python.hpp>
#include <boost/version.hpp>
-#include <paludis/util/attributes.hh>
-
-void expose_action() PALUDIS_VISIBLE;
-void expose_contents() PALUDIS_VISIBLE;
-void expose_dep_list() PALUDIS_VISIBLE;
-void expose_dep_spec() PALUDIS_VISIBLE;
-void expose_dep_tag() PALUDIS_VISIBLE;
-void expose_environment() PALUDIS_VISIBLE;
-void expose_exception() PALUDIS_VISIBLE;
-void expose_fs_entry() PALUDIS_VISIBLE;
-void expose_log() PALUDIS_VISIBLE;
-void expose_mask() PALUDIS_VISIBLE;
-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_query() PALUDIS_VISIBLE;
-void expose_repository() PALUDIS_VISIBLE;
-void expose_version_operator() PALUDIS_VISIBLE;
-void expose_version_requirements() PALUDIS_VISIBLE;
-void expose_version_spec() PALUDIS_VISIBLE;
+#include <python/paludis_python.hh>
BOOST_PYTHON_MODULE(paludis)
{
@@ -69,3 +48,4 @@ BOOST_PYTHON_MODULE(paludis)
expose_repository();
expose_qa();
}
+
diff --git a/python/repository_TEST.py b/python/repository_TEST.py
index f223db7..0920e54 100755
--- a/python/repository_TEST.py
+++ b/python/repository_TEST.py
@@ -220,7 +220,7 @@ class TestCase_02_RepositoryInterfaces(unittest.TestCase):
qr = PyQAR()
qi.check_qa(qr, QACheckProperties(), QACheckProperties(), QAMessageLevel.DEBUG, "")
- self.assertEquals(qr.messages, 1)
+ self.assertEquals(qr.messages > 0, True)
class TestCase_03_FakeRepository(unittest.TestCase):
def setUp(self):