From 2f7f037e8eaaafd98bf380c48ddd469a43242a67 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Tue, 14 Apr 2015 10:02:09 -0700 Subject: [PATCH] setup.py sdist: Allow `make man` failure This should let us run Tox on Windows, where Make isn't available. --- setup.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 39ac6bfa8..4698a37f1 100755 --- a/setup.py +++ b/setup.py @@ -28,14 +28,15 @@ def _read(fn): return open(path).read() -# Build manpages if we're making a source distribution tarball. -if 'sdist' in sys.argv: +def build_manpages(): # Go into the docs directory and build the manpage. docdir = os.path.join(os.path.dirname(__file__), 'docs') curdir = os.getcwd() os.chdir(docdir) try: subprocess.check_call(['make', 'man']) + except OSError: + print("Could not build manpages (make man failed)!", file=sys.stderr) finally: os.chdir(curdir) @@ -45,6 +46,12 @@ if 'sdist' in sys.argv: shutil.rmtree(mandir) shutil.copytree(os.path.join(docdir, '_build', 'man'), mandir) + +# Build manpages if we're making a source distribution tarball. +if 'sdist' in sys.argv: + build_manpages() + + setup( name='beets', version='1.3.12',