Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated and unused ApiDocs command from setup.py #1925

Merged
merged 2 commits into from
Aug 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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