diff options
author | 2010-12-29 00:59:37 +0000 | |
---|---|---|
committer | 2011-01-01 03:57:52 +0000 | |
commit | d3dcce377a01c5b3ae0414e9e4dd67eaddc4ef0e (patch) | |
tree | 7d81deba8b41b103f927572df149c98941ed515c /python | |
parent | eba9fcb1d71dd48458d09c1328ba11ea06fbb40b (diff) | |
download | paludis-d3dcce377a01c5b3ae0414e9e4dd67eaddc4ef0e.tar.gz paludis-d3dcce377a01c5b3ae0414e9e4dd67eaddc4ef0e.tar.xz |
Tinker with labels
Diffstat (limited to 'python')
-rw-r--r-- | python/dep_label.cc | 23 | ||||
-rwxr-xr-x | python/dep_label_TEST.py | 16 |
2 files changed, 20 insertions, 19 deletions
diff --git a/python/dep_label.cc b/python/dep_label.cc index 11099d633..95b05c19d 100644 --- a/python/dep_label.cc +++ b/python/dep_label.cc @@ -23,6 +23,7 @@ #include <paludis/dep_label.hh> #include <paludis/util/return_literal_function.hh> +#include <paludis/always_enabled_dependency_label.hh> using namespace paludis; using namespace paludis::python; @@ -31,9 +32,9 @@ namespace bp = boost::python; namespace { template <typename T_> - T_ * make_concrete_dependencies_label(const std::string & t, const bool b) + T_ * make_concrete_dependencies_label(const std::string & t) { - return new T_(t, return_literal_function(b)); + return new T_(t); } } @@ -67,7 +68,7 @@ struct class_concrete_dependencies_label : { def("__init__", bp::make_constructor(&make_concrete_dependencies_label<L_>), - "__init__(String, bool)" + "__init__(String)" ); bp::implicitly_convertible<std::shared_ptr<L_>, std::shared_ptr<DependenciesLabel> >(); @@ -125,12 +126,12 @@ void expose_dep_label() /** * ConcreteDependenciesLabels */ - class_concrete_dependencies_label<DependenciesBuildLabel>("DependenciesBuildLabel"); - class_concrete_dependencies_label<DependenciesRunLabel>("DependenciesRunLabel"); - class_concrete_dependencies_label<DependenciesPostLabel>("DependenciesPostLabel"); - class_concrete_dependencies_label<DependenciesCompileAgainstLabel>("DependenciesCompileAgainstLabel"); - class_concrete_dependencies_label<DependenciesInstallLabel>("DependenciesInstallLabel"); - class_concrete_dependencies_label<DependenciesFetchLabel>("DependenciesFetchLabel"); - class_concrete_dependencies_label<DependenciesSuggestionLabel>("DependenciesSuggestionLabel"); - class_concrete_dependencies_label<DependenciesRecommendationLabel>("DependenciesRecommendationLabel"); + class_concrete_dependencies_label<AlwaysEnabledDependencyLabel<DependenciesBuildLabelTag> >("DependenciesBuildLabel"); + class_concrete_dependencies_label<AlwaysEnabledDependencyLabel<DependenciesRunLabelTag> >("DependenciesRunLabel"); + class_concrete_dependencies_label<AlwaysEnabledDependencyLabel<DependenciesPostLabelTag> >("DependenciesPostLabel"); + class_concrete_dependencies_label<AlwaysEnabledDependencyLabel<DependenciesCompileAgainstLabelTag> >("DependenciesCompileAgainstLabel"); + class_concrete_dependencies_label<AlwaysEnabledDependencyLabel<DependenciesInstallLabelTag> >("DependenciesInstallLabel"); + class_concrete_dependencies_label<AlwaysEnabledDependencyLabel<DependenciesFetchLabelTag> >("DependenciesFetchLabel"); + class_concrete_dependencies_label<AlwaysEnabledDependencyLabel<DependenciesSuggestionLabelTag> >("DependenciesSuggestionLabel"); + class_concrete_dependencies_label<AlwaysEnabledDependencyLabel<DependenciesRecommendationLabelTag> >("DependenciesRecommendationLabel"); } diff --git a/python/dep_label_TEST.py b/python/dep_label_TEST.py index e46925652..eaf183725 100755 --- a/python/dep_label_TEST.py +++ b/python/dep_label_TEST.py @@ -49,14 +49,14 @@ class TestCase_01_URILabels(unittest.TestCase): class TestCase_02_DependenciesLabels(unittest.TestCase): def setUp(self): self.list = [] - self.list.append((DependenciesBuildLabel("foo", True), DependenciesLabel)) - self.list.append((DependenciesRunLabel("foo", True), DependenciesLabel)) - self.list.append((DependenciesPostLabel("foo", True), DependenciesLabel)) - self.list.append((DependenciesCompileAgainstLabel("foo", True), DependenciesLabel)) - self.list.append((DependenciesInstallLabel("foo", True), DependenciesLabel)) - self.list.append((DependenciesFetchLabel("foo", True), DependenciesLabel)) - self.list.append((DependenciesSuggestionLabel("foo", True), DependenciesLabel)) - self.list.append((DependenciesRecommendationLabel("foo", True), DependenciesLabel)) + self.list.append((DependenciesBuildLabel("foo"), DependenciesLabel)) + self.list.append((DependenciesRunLabel("foo"), DependenciesLabel)) + self.list.append((DependenciesPostLabel("foo"), DependenciesLabel)) + self.list.append((DependenciesCompileAgainstLabel("foo"), DependenciesLabel)) + self.list.append((DependenciesInstallLabel("foo"), DependenciesLabel)) + self.list.append((DependenciesFetchLabel("foo"), DependenciesLabel)) + self.list.append((DependenciesSuggestionLabel("foo"), DependenciesLabel)) + self.list.append((DependenciesRecommendationLabel("foo"), DependenciesLabel)) def test_01_no_create(self): self.assertRaises(Exception, DependenciesLabel) |