Skip to content

Commit

Permalink
Avoid install_helpers on RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmatthews committed Feb 19, 2015
1 parent 52d4e1c commit 2050c77
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@

cmd_class = versioneer.get_cmdclass()

# on_rtd is whether we are on readthedocs.org, this line of code grabbed from
# docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'


class custom_build(cmd_build):
def run(self):
Expand Down Expand Up @@ -82,7 +86,9 @@ def run(self):
# 'bdist_egg' (called automatically by 'install') to include 'install_helpers'
class custom_bdist_egg(bdist_egg):
def run(self):
self.run_command('install_helpers')
# Don't bother installing helper tools on readthedocs.org
if not on_rtd:
self.run_command('install_helpers')
bdist_egg.run(self)

cmd_class['build'] = custom_build
Expand Down

0 comments on commit 2050c77

Please sign in to comment.