mirror of
https://github.com/beetbox/beets.git
synced 2026-01-10 18:07:00 +01:00
setup.py sdist: Allow make man failure
This should let us run Tox on Windows, where Make isn't available.
This commit is contained in:
parent
168678cc3f
commit
2f7f037e8e
1 changed files with 9 additions and 2 deletions
11
setup.py
11
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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue