aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-08-20 19:54:39 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-08-20 19:54:39 +0000
commit120b0dd20cba3d4d9992a84728b12f91accecd10 (patch)
treeea9b3f1bd099431e52e21249ad59c6b11358e0c9
parentffed8310f372885ab6ca93205bf26615879eec6f (diff)
downloadpaludis-120b0dd20cba3d4d9992a84728b12f91accecd10.tar.gz
paludis-120b0dd20cba3d4d9992a84728b12f91accecd10.tar.xz
(python) Libtool fun and rename subclassing_test to additional_tests by the way.
-rw-r--r--python/Makefile.am24
-rw-r--r--python/additional_tests.cc (renamed from python/subclassing_test.cc)4
-rw-r--r--python/additional_tests.hh27
-rw-r--r--python/additional_tests_so.cc26
-rwxr-xr-xpython/environment_TEST.py2
-rwxr-xr-xpython/mask_TEST.py2
-rwxr-xr-xpython/metadata_key_TEST.py2
7 files changed, 74 insertions, 13 deletions
diff --git a/python/Makefile.am b/python/Makefile.am
index 70faaef..59887e3 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -18,7 +18,7 @@ DEFS= \
-DLIBEXECDIR=\"$(libexecdir)\" \
-DLIBDIR=\"$(libdir)\"
-CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.o subclassing_test.so paludis.so .libs/paludis.so
+CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.o paludis.so
MAINTAINERCLEANFILES = Makefile.in
IF_PYTHON_TESTS = \
@@ -120,16 +120,21 @@ lib_LTLIBRARIES = libpaludispython.la
libpaludispython_la_CXXFLAGS = $(AM_CXXFLAGS) -I. -I@PYTHON_INCLUDE_DIR@
libpaludispython_la_LDFLAGS = @BOOST_PYTHON_LIB@
-noinst_LTLIBRARIES = libsubclassingtest.la
+check_LTLIBRARIES = libadditionaltests.la
-libsubclassingtest_la_CXXFLAGS = $(AM_CXXFLAGS) -I. -I@PYTHON_INCLUDE_DIR@
-libsubclassingtest_la_LDFLAGS = @BOOST_PYTHON_LIB@ -rpath /nowhere
+libadditionaltests_la_CXXFLAGS = $(AM_CXXFLAGS) -I. -I@PYTHON_INCLUDE_DIR@
+libadditionaltests_la_LDFLAGS = @BOOST_PYTHON_LIB@ -rpath /nowhere
paludis_python_so.o : paludis_python_so.cc
if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) \
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) -I$(PYTHON_INCLUDE_DIR) -c \
-o $@ $(srcdir)/paludis_python_so.cc ; then ln -fs .libs/paludis_python_so.o $@ ; else rm -f $@ ; exit 1 ; fi
+additional_tests_so.o : additional_tests_so.cc
+ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) \
+ $(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_la_SOURCES = $(IF_PYTHON_SOURCES) $(IF_PYTHON_QA_SOURCES)
@@ -156,10 +161,10 @@ libpaludispython_la_LIBADD = \
$(top_builddir)/paludis/environments/test/libpaludistestenvironment.la \
$(top_builddir)/paludis/environments/libpaludisenvironments.la
-libsubclassingtest_la_SOURCES = subclassing_test.cc
-libsubclassingtest_la_LIBADD = $(libpaludispython_la_LIBADD)
+libadditionaltests_la_SOURCES = additional_tests.cc
+libadditionaltests_la_LIBADD = $(libpaludispython_la_LIBADD)
-check_DATA = .libs/paludis.so .libs/subclassing_test.so
+check_DATA = .libs/paludis.so .libs/additional_tests.so
pythonlibdir = @PYTHON_INSTALL_DIR@
pythonlib_DATA = paludis.so
@@ -182,13 +187,14 @@ paludis.so : libpaludispython.la paludis_python_so.o
.libs/paludis_python_so.o \
-L$(top_builddir)/python/.libs -lpaludispython
-.libs/subclassing_test.so : libsubclassingtest.la
+.libs/additional_tests.so : libadditionaltests.la additional_tests_so.o
$(CXX) -fPIC -shared $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) \
-I@PYTHON_INCLUDE_DIR@ @BOOST_PYTHON_LIB@ $(PTHREAD_LIBS) \
-o $@ \
- -L$(top_builddir)/python/.libs -lsubclassingtest
+ .libs/additional_tests_so.o \
+ -L$(top_builddir)/python/.libs -ladditionaltests
endif
diff --git a/python/subclassing_test.cc b/python/additional_tests.cc
index a332bd8..724178c 100644
--- a/python/subclassing_test.cc
+++ b/python/additional_tests.cc
@@ -17,6 +17,8 @@
* Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "additional_tests.hh"
+
#include <python/paludis_python.hh>
#include <paludis/util/tr1_memory.hh>
@@ -184,7 +186,7 @@ namespace metadata_key
}
-BOOST_PYTHON_MODULE(subclassing_test)
+void expose_additional_tests()
{
/**
* Environemnt tests
diff --git a/python/additional_tests.hh b/python/additional_tests.hh
new file mode 100644
index 0000000..6450792
--- /dev/null
+++ b/python/additional_tests.hh
@@ -0,0 +1,27 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2007 Piotr Jaroszyński <peper@gentoo.org>
+ *
+ * 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
+ */
+
+#ifndef PALUDIS_GUARD_PYTHON_ADDITIONAL_TESTS_HH
+#define PALUDIS_GUARD_PYTHON_ADDITIONAL_TESTS_HH 1
+
+#include <paludis/util/attributes.hh>
+
+void expose_additional_tests() PALUDIS_VISIBLE;
+
+#endif
diff --git a/python/additional_tests_so.cc b/python/additional_tests_so.cc
new file mode 100644
index 0000000..e9c5989
--- /dev/null
+++ b/python/additional_tests_so.cc
@@ -0,0 +1,26 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2007 Piotr Jaroszyński <peper@gentoo.org>
+ *
+ * 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 <boost/python.hpp>
+#include <python/additional_tests.hh>
+
+BOOST_PYTHON_MODULE(additional_tests)
+{
+ expose_additional_tests();
+}
diff --git a/python/environment_TEST.py b/python/environment_TEST.py
index 7f4ea49..a4f07e1 100755
--- a/python/environment_TEST.py
+++ b/python/environment_TEST.py
@@ -26,7 +26,7 @@ slaverepo = os.path.join(os.getcwd(), "environment_TEST_dir/slaverepo")
os.environ["PALUDIS_HOME"] = ph
from paludis import *
-from subclassing_test import *
+from additional_tests import *
import unittest
diff --git a/python/mask_TEST.py b/python/mask_TEST.py
index e1e3856..54106e8 100755
--- a/python/mask_TEST.py
+++ b/python/mask_TEST.py
@@ -23,7 +23,7 @@ import os
os.environ["PALUDIS_HOME"] = os.path.join(os.getcwd(), "mask_TEST_dir/home")
from paludis import *
-from subclassing_test import *
+from additional_tests import *
import unittest
diff --git a/python/metadata_key_TEST.py b/python/metadata_key_TEST.py
index a760a44..d9a13d5 100755
--- a/python/metadata_key_TEST.py
+++ b/python/metadata_key_TEST.py
@@ -24,7 +24,7 @@ repo_path = os.path.join(os.getcwd(), "metadata_key_TEST_dir/testrepo")
irepo_path = os.path.join(os.getcwd(), "metadata_key_TEST_dir/installed")
from paludis import *
-from subclassing_test import *
+from additional_tests import *
import unittest