diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2022-07-08 07:33:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-08 07:33:45 +0200 |
| commit | 28534cf1a8d692687d9f40c3be622e0945b5a2ee (patch) | |
| tree | fe2707c884cdd359232d5cca47fdd1aa0f4208dc | |
| parent | 8d9a469ae2c289d2fde46c64d6d6d37e27dc9520 (diff) | |
linux scipy/linalg libraries: ELF (#1714)
* do not strip any scipy library for linux
* apply settings to debug formats
* use fixed pyembroidery
Co-authored-by: Lex Neva
| -rw-r--r-- | .github/workflows/build.yml | 7 | ||||
| -rw-r--r-- | .gitignore | 3 | ||||
| -rwxr-xr-x | bin/build-python | 10 | ||||
| -rwxr-xr-x | lib/inx/inputs.py | 2 | ||||
| -rw-r--r-- | lib/output.py | 5 | ||||
| m--------- | pyembroidery | 0 |
6 files changed, 14 insertions, 13 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3610ec6b..b9663c4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -74,7 +74,12 @@ jobs: python -m pip install -r requirements.txt python -m pip install pyinstaller - + + # scipy gives us a ELF error when stripped + sudo apt-get install gcc g++ gfortran python3-dev libopenblas-dev liblapack-dev + python -m pip uninstall --yes scipy + python -m pip install scipy --no-binary scipy + echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH - shell: bash run: | @@ -19,3 +19,6 @@ locales/ /src/ .DS_STORE .DS_Store +/PROFILE +/profile_stats +/profile_stats.prof diff --git a/bin/build-python b/bin/build-python index ab0e3c27..92e1802a 100755 --- a/bin/build-python +++ b/bin/build-python @@ -66,16 +66,6 @@ if [ "$BUILD" = "windows" ]; then pyinstaller_args+="--i electron/build/icons/win/inkstitch.ico " pyinstaller_args+="--version-file installer_scripts/file_version_info.txt " python -m PyInstaller $pyinstaller_args inkstitch.py -elif [ "$BUILD" = "linux" ]; then - # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of - # wxpython's shared libraries - LD_LIBRARY_PATH="${site_packages}/wx" python -m PyInstaller $pyinstaller_args inkstitch.py; - - # We've found that stripping the _fblas library in scipy/linalg causes a bizarre - # error: - # - # ELF load command address/offset not properly aligned - find dist/inkstitch -type f | grep -E '\.so($|\.)' | grep -v _fblas | grep -v _flapack | xargs strip else LD_LIBRARY_PATH="${site_packages}/wx" python -m PyInstaller $pyinstaller_args --strip inkstitch.py; fi diff --git a/lib/inx/inputs.py b/lib/inx/inputs.py index 716e1708..3ae0b871 100755 --- a/lib/inx/inputs.py +++ b/lib/inx/inputs.py @@ -10,7 +10,7 @@ from .utils import build_environment, write_inx_file def pyembroidery_input_formats(): for format in pyembroidery.supported_formats(): - if 'reader' in format and format['category'] in ['embroidery', 'color', 'stitch']: + if 'reader' in format and format['category'] in ['embroidery', 'color', 'stitch', 'debug']: yield format['extension'], format['description'] diff --git a/lib/output.py b/lib/output.py index 65e6f64d..a65a3af1 100644 --- a/lib/output.py +++ b/lib/output.py @@ -57,7 +57,7 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}): scale = 10 / PIXELS_PER_MM origin = get_origin(svg, stitch_plan.bounding_box) - origin = origin * scale + # origin = origin * scale pattern = pyembroidery.EmbPattern() stitch = Stitch(0, 0) @@ -86,6 +86,9 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}): "full_jump": True, }) + if not file_path.endswith(('.col', '.edr', '.inf')): + settings['encode'] = True + if file_path.endswith('.csv'): # Special treatment for CSV: instruct pyembroidery not to do any post- # processing. This will allow the user to match up stitch numbers seen diff --git a/pyembroidery b/pyembroidery -Subproject 4817386d269a2724bf0c9a87d91a5103c6dffc7 +Subproject 83276c06291c624bfd320a33417da4e42ac05a2 |
