aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar zaufi <i.zaufi@gmail.com> 2013-12-13 15:44:20 +0400
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2013-12-29 20:04:18 +0000
commit590c6a9c55f27d1cebc72462cc0797d62a004952 (patch)
tree812d6de3c7d6cef7b1886896047e5bad15c165b0 /python
parentff990637e2397690ce911a762d1ce089acd602ad (diff)
downloadpaludis-590c6a9c55f27d1cebc72462cc0797d62a004952.tar.gz
paludis-590c6a9c55f27d1cebc72462cc0797d62a004952.tar.xz
Use `sphinx` (which is Pythons 2 and 3 compatible) to build Python API documentation instead of Python 2 only `epydoc`.
Diffstat (limited to 'python')
-rw-r--r--python/action.cc4
-rw-r--r--python/dep_spec.cc8
-rw-r--r--python/metadata_key.cc8
-rw-r--r--python/name.cc4
-rw-r--r--python/paludis_python.hh2
-rw-r--r--python/slot_requirement.cc16
-rw-r--r--python/version_spec.cc12
7 files changed, 27 insertions, 27 deletions
diff --git a/python/action.cc b/python/action.cc
index bbc5ffb09..d4a81fd5b 100644
--- a/python/action.cc
+++ b/python/action.cc
@@ -344,7 +344,7 @@ void expose_action()
(
"ConfigAction",
"A ConfigAction is used via PackageID::perform_action to execute\n"
- "post-install configuration (for example, via 'paludis --config')\n"
+ "post-install configuration (for example, via :command:`cave perform config`)\n"
"on a PackageID.",
bp::init<ConfigActionOptions>("__init__(ConfigActionOptions)")
);
@@ -356,7 +356,7 @@ void expose_action()
(
"InfoAction",
"An InfoAction is used via PackageID::perform_action to execute\n"
- "additional information (for example, via 'paludis --info')\n"
+ "additional information (for example, via :command:`cave info`)\n"
"on a PackageID.",
bp::init<InfoActionOptions>("__init__(InfoActionOptions)")
);
diff --git a/python/dep_spec.cc b/python/dep_spec.cc
index e01880a59..2bee02bf0 100644
--- a/python/dep_spec.cc
+++ b/python/dep_spec.cc
@@ -1076,7 +1076,7 @@ void expose_dep_spec()
ExceptionRegister::get_instance()->add_exception<GotASetNotAPackageDepSpec>
("GotASetNotAPackageDepSpec", "BaseException",
- "Thrown by parse_user_package_dep_spec if options includes THROW_IF_SET"
+ "Thrown by parse_user_package_dep_spec if options includes ``THROW_IF_SET``"
" and we're given a set.");
/**
@@ -1229,7 +1229,7 @@ void expose_dep_spec()
(
"PackageDepSpec",
"A PackageDepSpec represents a package name (for example, 'app-editors/vim'),"
- " possibly with associated version and SLOT restrictions.",
+ " possibly with associated version and ``SLOT`` restrictions.",
bp::no_init
)
@@ -1291,7 +1291,7 @@ void expose_dep_spec()
bp::class_<PythonPlainTextDepSpec, bp::bases<PythonStringDepSpec> >
(
"PlainTextDepSpec",
- "A PlainTextDepSpec represents a plain text entry (for example, a RESTRICT keyword).",
+ "A PlainTextDepSpec represents a plain text entry (for example, a ``RESTRICT`` keyword).",
bp::init<const std::string &>("__init__(string)")
)
.def("__str__", &PythonPlainTextDepSpec::text)
@@ -1390,7 +1390,7 @@ void expose_dep_spec()
(
"BlockDepSpec",
"A BlockDepSpec represents a block on a package name (for example, 'app-editors/vim'), \n"
- "possibly with associated version and SLOT restrictions.",
+ "possibly with associated version and ``SLOT`` restrictions.",
bp::init<std::string, std::shared_ptr<const PythonPackageDepSpec> >("__init__(string, PackageDepSpec)")
)
.add_property("blocking", &PythonBlockDepSpec::blocking,
diff --git a/python/metadata_key.cc b/python/metadata_key.cc
index a5f0a6a3a..196ae127a 100644
--- a/python/metadata_key.cc
+++ b/python/metadata_key.cc
@@ -916,8 +916,8 @@ void expose_metadata_key()
"- A raw name. This is in a repository-defined format designed to closely\n"
" represent the internal name. For example, ebuilds and VDB IDs use\n"
- " raw names like 'DESCRIPTION' and 'KEYWORDS', whereas CRAN uses names\n"
- " like 'Title' and 'BundleDescription'. The raw name is unique in a\n"
+ " raw names like ``DESCRIPTION`` and ``KEYWORDS``, whereas CRAN uses names\n"
+ " like ``Title`` and ``BundleDescription``. The raw name is unique in a\n"
" PackageID.\n\n"
"- A human name. This is the name that should be used when outputting\n"
@@ -1057,7 +1057,7 @@ void expose_metadata_key()
bp::bases<MetadataKey>, boost::noncopyable>
(
"MetadataTimeKey",
- "A MetadataTimeKey is a MetadataKey that has a int(time_t) as its value.\n\n"
+ "A MetadataTimeKey is a MetadataKey that has a ``int(time_t)`` as its value.\n\n"
"This class can be subclassed in Python.",
bp::init<>(
@@ -1080,7 +1080,7 @@ void expose_metadata_key()
bp::bases<MetadataKey>, boost::noncopyable>
(
"MetadataFSPathKey",
- "A MetadataFSPathKey is a MetadataKey that has an string(FSPath) as its value.\n\n"
+ "A MetadataFSPathKey is a MetadataKey that has an ``string(FSPath)`` as its value.\n\n"
"This class can be subclassed in Python.",
bp::init<>(
diff --git a/python/name.cc b/python/name.cc
index 32a22fc1c..9ee178f45 100644
--- a/python/name.cc
+++ b/python/name.cc
@@ -104,7 +104,7 @@ void expose_name()
class_wrapped_value<SlotName>
(
"SlotName",
- "Holds a string that is a valid name for a SLOT."
+ "Holds a string that is a valid name for a ``SLOT``."
);
/**
@@ -123,7 +123,7 @@ void expose_name()
class_wrapped_value<KeywordName>
(
"KeywordName",
- "Holds a string that is a valid name for a KEYWORD."
+ "Holds a string that is a valid name for a ``KEYWORD``."
);
/**
diff --git a/python/paludis_python.hh b/python/paludis_python.hh
index feed60328..5cac703ab 100644
--- a/python/paludis_python.hh
+++ b/python/paludis_python.hh
@@ -89,7 +89,7 @@ namespace paludis
{
std::string e_name_up(toupper(stringify(e)));
enum_.value(e_name_up.c_str(), e);
- doc += "\n\t" + e_name_up;
+ doc += "\n\t* ``" + e_name_up + "``";
}
PyTypeObject * pto = reinterpret_cast<PyTypeObject *>(enum_.ptr());
PyDict_SetItemString(
diff --git a/python/slot_requirement.cc b/python/slot_requirement.cc
index 527621e04..3317b56e8 100644
--- a/python/slot_requirement.cc
+++ b/python/slot_requirement.cc
@@ -107,7 +107,7 @@ void expose_slot_requirement()
(
"SlotRequirement",
"A SlotRequirement represents a PackageDepSpec's slot requirement, "
- "such as :3 , :* , := or :=3 .",
+ "such as ``:3``, ``:*``, ``:=`` or ``:=3``.",
bp::no_init
)
@@ -123,7 +123,7 @@ void expose_slot_requirement()
(
"SlotExactPartialRequirement",
"A SlotExactPartialRequirement is a SlotRequirement for exact slot requirements, "
- "such as :3 or :=3 .",
+ "such as ``:3`` or ``:=3``.",
bp::no_init
)
@@ -142,7 +142,7 @@ void expose_slot_requirement()
(
"SlotExactFullRequirement",
"A SlotExactFullRequirement is a SlotRequirement for exact slot requirements, "
- "such as :3/3 or :=3/3 .",
+ "such as ``:3/3`` or ``:=3/3``.",
bp::no_init
)
;
@@ -155,7 +155,7 @@ void expose_slot_requirement()
bp::class_<SlotAnyAtAllLockedRequirement, std::shared_ptr<SlotAnyAtAllLockedRequirement>, bp::bases<SlotRequirement>, boost::noncopyable>
(
"SlotAnyAtAllLockedRequirement",
- "A SlotAnyAtAllLockedRequirement is a SlotRequirement for := slot requirements.",
+ "A SlotAnyAtAllLockedRequirement is a SlotRequirement for ``:=`` slot requirements.",
bp::no_init
)
;
@@ -168,7 +168,7 @@ void expose_slot_requirement()
bp::class_<SlotAnyPartialLockedRequirement, std::shared_ptr<SlotAnyPartialLockedRequirement>, bp::bases<SlotRequirement>, boost::noncopyable>
(
"SlotAnyPartialLockedRequirement",
- "A SlotAnyPartialLockedRequirement is a SlotRequirement for :3= slot requirements.",
+ "A SlotAnyPartialLockedRequirement is a SlotRequirement for ``:3=`` slot requirements.",
bp::no_init
)
;
@@ -181,7 +181,7 @@ void expose_slot_requirement()
bp::class_<SlotAnyUnlockedRequirement, std::shared_ptr<SlotAnyUnlockedRequirement>, bp::bases<SlotRequirement>, boost::noncopyable>
(
"SlotAnyUnlockedRequirement",
- "A SlotAnyUnlockedRequirement is a SlotRequirement for :* slot requirements.",
+ "A SlotAnyUnlockedRequirement is a SlotRequirement for ``:*`` slot requirements.",
bp::no_init
)
;
@@ -195,9 +195,9 @@ void expose_slot_requirement()
(
"SlotUnknownRewrittenRequirement",
"A SlotUnknownRewrittenRequirement is a SlotRequirement for the "
- "maybe_original_requirement_if_written() method of :3/3.1= slot "
+ "maybe_original_requirement_if_written() method of ``:3/3.1= slot`` "
"requirements that do not indicate whether they were originally "
- "of := or :3= type.",
+ "of ``:=`` or ``:3=`` type.",
bp::no_init
)
;
diff --git a/python/version_spec.cc b/python/version_spec.cc
index 1619a6c3d..e1676c3bd 100644
--- a/python/version_spec.cc
+++ b/python/version_spec.cc
@@ -53,9 +53,9 @@ void expose_version_spec()
bp::class_<VersionSpec>
(
"VersionSpec",
- "A VersionSpec represents a version number (for example, 1.2.3b-r1).\n\n"
+ "A VersionSpec represents a version number (for example, ``1.2.3b-r1``).\n\n"
- "See U{example_version_spec<###EX###example_version_spec.html>}",
+ "See :doc:`example_version_spec`",
bp::no_init
)
.def("__init__",
@@ -66,8 +66,8 @@ void expose_version_spec()
.def("bump", &VersionSpec::bump,
"bump() -> VersionSpec\n"
"This is used by the ~> operator. It returns a VersionSpec where the next to last number "
- "is one greater (e.g. 5.3.1 => 5.4).\n"
- "Any non number parts are stripped (e.g. 1.2.3_alpha4-r5 => 1.3)."
+ "is one greater (e.g. ``5.3.1`` => ``5.4``).\n"
+ "Any non number parts are stripped (e.g. ``1.2.3_alpha4-r5`` => ``1.3``)."
)
.add_property("is_scm", &VersionSpec::is_scm,
@@ -77,12 +77,12 @@ void expose_version_spec()
.add_property("has_scm_part", &VersionSpec::has_scm_part,
"[ro] bool\n"
- "Do we have an -scm part?"
+ "Do we have an ``-scm`` part?"
)
.add_property("has_try_part", &VersionSpec::has_try_part,
"[ro] bool\n"
- "Do we have a -try part?"
+ "Do we have a ``-try`` part?"
)
.def("remove_revision", &VersionSpec::remove_revision,