Browse Source

Merge pull request #2336 from enkore/issue/2335

Remove Python API docs
enkore 8 years ago
parent
commit
83de89d186
4 changed files with 9 additions and 146 deletions
  1. 0 99
      docs/api.rst
  2. 3 9
      docs/development.rst
  3. 6 3
      docs/faq.rst
  4. 0 35
      setup.py

+ 0 - 99
docs/api.rst

@@ -1,99 +0,0 @@
-
-API Documentation
-=================
-
-.. automodule:: borg.archiver
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.archive
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.repository
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.remote
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.cache
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.key
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.keymanager
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.nonces
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.item
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.constants
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.logger
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.helpers
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.locking
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.shellpattern
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.lrucache
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.fuse
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.selftest
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.xattr
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.platform.base
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.platform.linux
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.hashindex
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.compress
-    :members: get_compressor, Compressor, CompressorBase
-    :undoc-members:
-
-.. automodule:: borg.chunker
-    :members:
-    :undoc-members:
-
-.. automodule:: borg.crypto
-    :members:
-    :undoc-members:

+ 3 - 9
docs/development.rst

@@ -217,12 +217,6 @@ However, we prefer to do this as part of our :ref:`releasing`
 preparations, so it is generally not necessary to update these when
 preparations, so it is generally not necessary to update these when
 submitting patches that change something about the command line.
 submitting patches that change something about the command line.
 
 
-The code documentation (which is currently not part of the released
-docs) also uses a generated file (``docs/api.rst``), that needs to be
-updated when a module is added or removed::
-
-  python setup.py build_api
-
 Building the docs with Sphinx
 Building the docs with Sphinx
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -300,9 +294,9 @@ Checklist:
 - update ``CHANGES.rst``, based on ``git log $PREVIOUS_RELEASE..``
 - update ``CHANGES.rst``, based on ``git log $PREVIOUS_RELEASE..``
 - check version number of upcoming release in ``CHANGES.rst``
 - check version number of upcoming release in ``CHANGES.rst``
 - verify that ``MANIFEST.in`` and ``setup.py`` are complete
 - verify that ``MANIFEST.in`` and ``setup.py`` are complete
-- ``python setup.py build_api ; python setup.py build_usage ; python
-  setup.py build_man`` and commit (be sure to build with Python 3.4 as
-  Python 3.6 added `more guaranteed hashing algorithms
+- ``python setup.py build_usage ; python setup.py build_man`` and
+  commit (be sure to build with Python 3.4 or 3.5 as Python 3.6 added `more
+  guaranteed hashing algorithms
   <https://github.com/borgbackup/borg/issues/2123>`_)
   <https://github.com/borgbackup/borg/issues/2123>`_)
 - tag the release::
 - tag the release::
 
 

+ 6 - 3
docs/faq.rst

@@ -353,9 +353,12 @@ How can I restore huge file(s) over a unstable connection?
 If you can not manage to extract the whole big file in one go, you can extract
 If you can not manage to extract the whole big file in one go, you can extract
 all the part files (see above) and manually concatenate them together.
 all the part files (see above) and manually concatenate them together.
 
 
-Can i backup my root partition (/) with borg?
---------------------------------------------
-Backing up your entire root partition works just fine, but remember to exclude directories that make no sense to backup, such as /dev, /proc, /sys, /tmp and /run.
+Can I backup my root partition (/) with Borg?
+---------------------------------------------
+
+Backing up your entire root partition works just fine, but remember to
+exclude directories that make no sense to backup, such as /dev, /proc,
+/sys, /tmp and /run.
 
 
 If it crashes with a UnicodeError, what can I do?
 If it crashes with a UnicodeError, what can I do?
 -------------------------------------------------
 -------------------------------------------------

+ 0 - 35
setup.py

@@ -567,43 +567,8 @@ class build_man(Command):
             write(option.ljust(padding), desc)
             write(option.ljust(padding), desc)
 
 
 
 
-class build_api(Command):
-    description = "generate a basic api.rst file based on the modules available"
-
-    user_options = [
-        ('output=', 'O', 'output directory'),
-    ]
-
-    def initialize_options(self):
-        pass
-
-    def finalize_options(self):
-        pass
-
-    def run(self):
-        print("auto-generating API documentation")
-        with open("docs/api.rst", "w") as doc:
-            doc.write("""
-.. IMPORTANT: this file is auto-generated by "setup.py build_api", do not edit!
-
-
-API Documentation
-=================
-""")
-            for mod in sorted(glob('src/borg/*.py') + glob('src/borg/*.pyx')):
-                print("examining module %s" % mod)
-                mod = mod.replace('.pyx', '').replace('.py', '').replace('/', '.')
-                if "._" not in mod:
-                    doc.write("""
-.. automodule:: %s
-    :members:
-    :undoc-members:
-""" % mod)
-
-
 cmdclass = {
 cmdclass = {
     'build_ext': build_ext,
     'build_ext': build_ext,
-    'build_api': build_api,
     'build_usage': build_usage,
     'build_usage': build_usage,
     'build_man': build_man,
     'build_man': build_man,
     'sdist': Sdist
     'sdist': Sdist