Bläddra i källkod

Revert "use build_py to fix build on RTD", disables docs build

This reverts commit 86487d192a9a5ab7ff4eedb92d793485b4c30268.

We will instead commit the generated `.rst` usage and API files
directly into git. The setup commands remain to generate them when the
usage or API changes, but as things are the hoops required to generate
those RST files are way too complicated to justify simply build docs.

See #384.

Conflicts:
	setup.py
Antoine Beaupré 9 år sedan
förälder
incheckning
f52fb410a5
1 ändrade filer med 0 tillägg och 31 borttagningar
  1. 0 31
      setup.py

+ 0 - 31
setup.py

@@ -6,8 +6,6 @@ from glob import glob
 
 
 from distutils.command.build import build
 from distutils.command.build import build
 from distutils.core import Command
 from distutils.core import Command
-from distutils import log
-from setuptools.command.build_py import build_py
 
 
 min_python = (3, 2)
 min_python = (3, 2)
 my_python = sys.version_info
 my_python = sys.version_info
@@ -203,39 +201,10 @@ API Documentation
 """ % mod)
 """ % mod)
 
 
 
 
-class build_py_custom(build_py):
-    """override build_py to also build our stuff
-
-    it is unclear why this is necessary, but in some environments
-    (Readthedocs.org, specifically), the above
-    ``build.sub_commands.append()`` doesn't seem to have an effect:
-    our custom build commands seem to be ignored when running
-    ``setup.py install``.
-
-    This class overrides the ``build_py`` target by forcing it to run
-    our custom steps as well.
-
-    See also the `bug report on RTD
-    <https://github.com/rtfd/readthedocs.org/issues/1740>`_.
-    """
-    def run(self):
-        super().run()
-        self.announce('calling custom build steps', level=log.INFO)
-        self.run_command('build_ext')
-        if on_rtd:
-            # only build these files if running on readthedocs, but not
-            # for a normal production install. It requires "mock" and we
-            # do not have that as a build dependency. Also, for really
-            # building the docs, it would also require sphinx, etc.
-            self.run_command('build_api')
-            self.run_command('build_usage')
-
-
 cmdclass = {
 cmdclass = {
     'build_ext': build_ext,
     'build_ext': build_ext,
     'build_api': build_api,
     'build_api': build_api,
     'build_usage': build_usage,
     'build_usage': build_usage,
-    'build_py': build_py_custom,
     'sdist': Sdist
     'sdist': Sdist
 }
 }