Add more helpful error when importing without libomp installed

Also use non-shallow clones in ci
pull/16/head
Andrew Cassidy 2 years ago
parent 3fdfc3ecaa
commit a881a0a36b

@ -13,9 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
# Whether to checkout submodules: `true` to checkout submodules or `recursive` to
# recursively checkout submodules.
submodules: 'true'
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3.1.1
@ -58,9 +56,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
# Whether to checkout submodules: `true` to checkout submodules or `recursive` to
# recursively checkout submodules.
submodules: 'true'
fetch-depth: 0
- name: Install libomp
if: runner.os == 'macOS'
@ -97,11 +93,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Whether to checkout submodules: `true` to checkout submodules or `recursive` to
# recursively checkout submodules.
submodules: 'true'
- uses: actions/checkout@v3 # just need the changelog
- name: Set up Python
uses: actions/setup-python@v3.1.1

@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file
## Unreleased
### Fixed
- Fixed quicktex not compiling for python 3.10 on Windows
### Changed
- Reworked CI job, adding wheels for ARM macOS, ARM Linux, and x86 musl Linux.
- Added a more useful error message when importing quicktex on macOS when libomp.dylib isnt installed
## 0.1.2 - 2022-03-27
### Fixed

@ -1,2 +1,8 @@
from _quicktex import *
from _quicktex import __version__
try:
from _quicktex import *
from _quicktex import __version__
except ImportError as e:
if 'libomp.dylib' in e.msg:
print('\033[41m\033[01mERROR: LIBOMP NOT FOUND! PLEASE INSTALL IT WITH \033[04m`brew install libomp`\033[0m')
print('original error message:')
raise e

Loading…
Cancel
Save