Skip to content

Commit

Permalink
Docs: Replacing system with subprocess.call to try to catch retcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
martingalloar committed Jul 20, 2022
1 parent 709a46c commit c0678dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

# Standard imports
from sys import exit
from os import system
from glob import glob
from subprocess import call
from setuptools import setup, Extension, Command
# Custom imports
import pysap
Expand All @@ -42,7 +42,7 @@ def finalize_options(self):
def run(self):
"""Runs Sphinx
"""
exit(system("cd docs && make html"))
exit(call("cd docs && make html", shell=True))


class PreExecuteNotebooksCommand(Command):
Expand Down Expand Up @@ -70,7 +70,7 @@ def finalize_options(self):
def run(self):
"""Pre executes notebooks."""
for notebook in self.notebooks:
system("jupyter nbconvert --inplace --to notebook --execute {}".format(notebook))
exit(call("jupyter nbconvert --inplace --to notebook --execute {}".format(notebook), shell=True))


sapcompress_macros = [
Expand Down

0 comments on commit c0678dd

Please sign in to comment.