diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3610ec6b9..b9663c4b3 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: | diff --git a/.gitignore b/.gitignore index 1158c454c..a64cb5ed8 100644 --- a/.gitignore +++ b/.gitignore @@ -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 ab0e3c27e..92e1802ad 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 716e17087..3ae0b8719 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 65e6f64d1..a65a3af16 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 index 4817386d2..83276c062 160000 --- a/pyembroidery +++ b/pyembroidery @@ -1 +1 @@ -Subproject commit 4817386d269a2724bf0c9a87d91a5103c6dffc78 +Subproject commit 83276c06291c624bfd320a33417da4e42ac05a2f