Skip to content

Commit

Permalink
Merge pull request #1925 from Kami/simpplify_setup_py
Browse files Browse the repository at this point in the history
Remove deprecated and unused ApiDocs command from setup.py
  • Loading branch information
Kami authored Aug 1, 2023
2 parents 72d331c + ae71ed4 commit 24a455f
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,10 @@
import re
import sys
import fnmatch
from distutils.core import Command

import setuptools
from setuptools import setup

try:
import epydoc # NOQA

has_epydoc = True
except ImportError:
has_epydoc = False

# NOTE: Those functions are intentionally moved in-line to prevent setup.py dependening on any
# Libcloud code which depends on libraries such as typing, enum, requests, etc.
# START: Taken From Twisted Python which licensed under MIT license
Expand Down Expand Up @@ -250,31 +242,6 @@ def forbid_publish():
sys.exit(1)


class ApiDocsCommand(Command):
description = "generate API documentation"
user_options = []

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
if not has_epydoc:
raise RuntimeError('Missing "epydoc" package!')

os.system(
"pydoctor"
" --add-package=libcloud"
" --project-name=libcloud"
" --make-html"
' --html-viewsource-base="%s"'
" --project-base-dir=`pwd`"
' --project-url="%s"' % (HTML_VIEWSOURCE_BASE, PROJECT_BASE_DIR)
)


forbid_publish()

needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv)
Expand Down Expand Up @@ -302,9 +269,6 @@ def run(self):
url="https://libcloud.apache.org/",
setup_requires=pytest_runner,
tests_require=TEST_REQUIREMENTS,
cmdclass={
"apidocs": ApiDocsCommand,
},
zip_safe=False,
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down

0 comments on commit 24a455f

Please sign in to comment.