kopia lustrzana https://github.com/inkstitch/inkstitch
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 Nevapull/1721/head
rodzic
8d9a469ae2
commit
28534cf1a8
|
@ -74,7 +74,12 @@ jobs:
|
||||||
|
|
||||||
python -m pip install -r requirements.txt
|
python -m pip install -r requirements.txt
|
||||||
python -m pip install pyinstaller
|
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
|
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
|
||||||
- shell: bash
|
- shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -19,3 +19,6 @@ locales/
|
||||||
/src/
|
/src/
|
||||||
.DS_STORE
|
.DS_STORE
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
/PROFILE
|
||||||
|
/profile_stats
|
||||||
|
/profile_stats.prof
|
||||||
|
|
|
@ -66,16 +66,6 @@ if [ "$BUILD" = "windows" ]; then
|
||||||
pyinstaller_args+="--i electron/build/icons/win/inkstitch.ico "
|
pyinstaller_args+="--i electron/build/icons/win/inkstitch.ico "
|
||||||
pyinstaller_args+="--version-file installer_scripts/file_version_info.txt "
|
pyinstaller_args+="--version-file installer_scripts/file_version_info.txt "
|
||||||
python -m PyInstaller $pyinstaller_args inkstitch.py
|
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
|
else
|
||||||
LD_LIBRARY_PATH="${site_packages}/wx" python -m PyInstaller $pyinstaller_args --strip inkstitch.py;
|
LD_LIBRARY_PATH="${site_packages}/wx" python -m PyInstaller $pyinstaller_args --strip inkstitch.py;
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -10,7 +10,7 @@ from .utils import build_environment, write_inx_file
|
||||||
|
|
||||||
def pyembroidery_input_formats():
|
def pyembroidery_input_formats():
|
||||||
for format in pyembroidery.supported_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']
|
yield format['extension'], format['description']
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}):
|
||||||
scale = 10 / PIXELS_PER_MM
|
scale = 10 / PIXELS_PER_MM
|
||||||
|
|
||||||
origin = get_origin(svg, stitch_plan.bounding_box)
|
origin = get_origin(svg, stitch_plan.bounding_box)
|
||||||
origin = origin * scale
|
# origin = origin * scale
|
||||||
|
|
||||||
pattern = pyembroidery.EmbPattern()
|
pattern = pyembroidery.EmbPattern()
|
||||||
stitch = Stitch(0, 0)
|
stitch = Stitch(0, 0)
|
||||||
|
@ -86,6 +86,9 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}):
|
||||||
"full_jump": True,
|
"full_jump": True,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if not file_path.endswith(('.col', '.edr', '.inf')):
|
||||||
|
settings['encode'] = True
|
||||||
|
|
||||||
if file_path.endswith('.csv'):
|
if file_path.endswith('.csv'):
|
||||||
# Special treatment for CSV: instruct pyembroidery not to do any post-
|
# Special treatment for CSV: instruct pyembroidery not to do any post-
|
||||||
# processing. This will allow the user to match up stitch numbers seen
|
# processing. This will allow the user to match up stitch numbers seen
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4817386d269a2724bf0c9a87d91a5103c6dffc78
|
Subproject commit 83276c06291c624bfd320a33417da4e42ac05a2f
|
Ładowanie…
Reference in New Issue