diff options
author | jaseg <git@jaseg.de> | 2021-02-06 00:20:40 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-02-06 00:20:40 +0100 |
commit | 06c2d5295db88243b88c6644d2c57f9a121670ee (patch) | |
tree | 5885a62367e84499ea0affa1c1c0b0f54eba027d /setup.py | |
parent | 1d58b4d5845ba09808325219fa34f34dd4bbfdb6 (diff) | |
download | gerbolyze-06c2d5295db88243b88c6644d2c57f9a121670ee.tar.gz gerbolyze-06c2d5295db88243b88c6644d2c57f9a121670ee.tar.bz2 gerbolyze-06c2d5295db88243b88c6644d2c57f9a121670ee.zip |
Remove usvg auto-install from setup.py
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 40 |
1 files changed, 0 insertions, 40 deletions
@@ -53,50 +53,10 @@ def has_usvg(): else: return False -def install_usvg(): - try: - subprocess.run(['cargo'], check=True, capture_output=True) - - except subprocess.CalledProcessError as e: - if b'no default toolchain set' in e.stderr: - print('No rust installation found. Calling rustup.') - - try: - subprocess.run(['rustup', 'install', 'stable'], check=True) - subprocess.run(['rustup', 'default', 'stable'], check=True) - - except subprocess.FileNotFoundError as e: - print('Cannot find rustup executable. svg-flatten needs usvg, which we install via rustup. Please install rustup or install usvg manually.', file=sys.stderr) - sys.exit(1) - - except subprocess.CalledProcessError as e: - print('Error installing usvg:', e.returncode, file=sys.stderr) - sys.exit(1) - - else: - print('Error installing usvg:', e.returncode, file=sys.stderr) - print(e.stdout.decode()) - print(e.stderr.decode()) - sys.exit(1) - - except subprocess.FileNotFoundError as e: - print('Cannot find cargo executable. svg-flatten needs usvg, which we install via cargo. Please install cargo or install usvg manually.', file=sys.stderr) - sys.exit(1) - - try: - subprocess.run(['cargo', 'install', 'usvg'], check=True) - - except subprocess.CalledProcessError as e: - print('Error installing usvg:', e.returncode, file=sys.stderr) - sys.exit(1) - class CustomInstall(install): """Custom handler for the 'install' command.""" def run(self): compile_and_install_svgflatten() - if not has_usvg(): - print('usvg not found. Installing.') - install_usvg() super().run() setup( |