kopia lustrzana https://github.com/inkstitch/inkstitch
Update shapely (#2471)
* update shapely * pin pyinstaller to 5.13.2 (issues with macOS) (rejbasket) * macOS: do not install shapely from binary, but remove .dylibs folder (breaks notarizazion) (rejbasket)pull/2529/head
rodzic
bbd7391b18
commit
2f966ce4de
|
@ -72,7 +72,7 @@ jobs:
|
||||||
python -m pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/wxPython-4.2.1-cp38-cp38-linux_x86_64.whl
|
python -m pip install https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/wxPython-4.2.1-cp38-cp38-linux_x86_64.whl
|
||||||
|
|
||||||
python -m pip install -r requirements.txt
|
python -m pip install -r requirements.txt
|
||||||
python -m pip install pyinstaller
|
python -m pip install pyinstaller==5.13.2
|
||||||
|
|
||||||
# scipy gives us a ELF error when stripped
|
# scipy gives us a ELF error when stripped
|
||||||
sudo apt-get install gcc g++ gfortran python3-dev libopenblas-dev liblapack-dev
|
sudo apt-get install gcc g++ gfortran python3-dev libopenblas-dev liblapack-dev
|
||||||
|
@ -116,8 +116,9 @@ jobs:
|
||||||
# Numpy and Scipy version for older cpu compatibility
|
# Numpy and Scipy version for older cpu compatibility
|
||||||
python -m pip install numpy==1.23.1
|
python -m pip install numpy==1.23.1
|
||||||
python -m pip install scipy==1.9.0
|
python -m pip install scipy==1.9.0
|
||||||
|
pip install wxPython
|
||||||
python -m pip install -r requirements.txt
|
python -m pip install -r requirements.txt
|
||||||
python -m pip install pyinstaller
|
python -m pip install pyinstaller==5.13.2
|
||||||
|
|
||||||
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
|
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
|
||||||
- shell: bash
|
- shell: bash
|
||||||
|
@ -163,8 +164,9 @@ jobs:
|
||||||
git config --system core.longpaths true
|
git config --system core.longpaths true
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
python -m pip install wheel
|
python -m pip install wheel
|
||||||
|
pip install wxPython
|
||||||
python -m pip install -r requirements.txt
|
python -m pip install -r requirements.txt
|
||||||
python -m pip install pyinstaller
|
python -m pip install pyinstaller==5.13.2
|
||||||
|
|
||||||
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
|
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
|
||||||
- shell: bash
|
- shell: bash
|
||||||
|
@ -198,7 +200,7 @@ jobs:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.8.x'
|
python-version: '3.9.x'
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '16.x'
|
node-version: '16.x'
|
||||||
|
@ -207,7 +209,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
brew update
|
brew update
|
||||||
|
|
||||||
brew install gtk+3 pkg-config gobject-introspection geos libffi gettext || true
|
brew install gtk+3 pkg-config gobject-introspection geos libffi gettext jq gnu-getopt || true
|
||||||
|
|
||||||
export LDFLAGS="-L/usr/local/opt/libffi/lib"
|
export LDFLAGS="-L/usr/local/opt/libffi/lib"
|
||||||
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
|
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
|
||||||
|
@ -221,13 +223,9 @@ jobs:
|
||||||
pip --version
|
pip --version
|
||||||
pip install wheel
|
pip install wheel
|
||||||
pip install PyGObject
|
pip install PyGObject
|
||||||
pip install wxpython==4.1.1
|
pip install wxPython
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
# with --no-binary argument may fix notary issues as well shapely speedups error issue
|
pip install pyinstaller==5.13.2
|
||||||
pip install -U lxml --no-binary lxml
|
|
||||||
pip uninstall --yes shapely
|
|
||||||
pip install -v -U Shapely==1.8.5 --no-binary Shapely
|
|
||||||
pip install pyinstaller
|
|
||||||
|
|
||||||
echo "${{ env.pythonLocation }}/bin" >> $GITHUB_PATH
|
echo "${{ env.pythonLocation }}/bin" >> $GITHUB_PATH
|
||||||
- shell: bash
|
- shell: bash
|
||||||
|
|
|
@ -8,6 +8,8 @@ if [ "$BUILD" = "osx" ]; then
|
||||||
# adding version to Info.plist
|
# adding version to Info.plist
|
||||||
plutil -replace CFBundleShortVersionString -string ${VERSION} dist/inkstitch.app/Contents/Info.plist
|
plutil -replace CFBundleShortVersionString -string ${VERSION} dist/inkstitch.app/Contents/Info.plist
|
||||||
rm -rf dist/inkstitch/
|
rm -rf dist/inkstitch/
|
||||||
|
# this removes the extra dylibs that cause notary to fail.
|
||||||
|
rm -rf dist/inkstitch.app/Contents/MacOS/shapely/.dylibs
|
||||||
# Install location for pkgbuild
|
# Install location for pkgbuild
|
||||||
PKG_INSTALL_PATH="/tmp/inkstitch/"
|
PKG_INSTALL_PATH="/tmp/inkstitch/"
|
||||||
# Checking arch of macos and setting path of electron for arm64 or intel
|
# Checking arch of macos and setting path of electron for arm64 or intel
|
||||||
|
@ -70,11 +72,23 @@ if [ "$BUILD" = "osx" ]; then
|
||||||
--team-id '929A568N58' \
|
--team-id '929A568N58' \
|
||||||
--password "${NOTARY_PASSWORD}"
|
--password "${NOTARY_PASSWORD}"
|
||||||
echo "Invoking notary process"
|
echo "Invoking notary process"
|
||||||
xcrun notarytool submit --wait \
|
xcrun notarytool submit -f json --wait \
|
||||||
--keychain-profile "inkstitch-profile" \
|
--keychain-profile "inkstitch-profile" \
|
||||||
artifacts/inkstitch-${VERSION}-${OS}.pkg
|
artifacts/inkstitch-${VERSION}-${OS}.pkg 2>&1 | tee /tmp/notarization_info.json
|
||||||
echo "Stapling the pkg for release"
|
echo "Stapling the pkg for release"
|
||||||
xcrun stapler staple artifacts/inkstitch-${VERSION}-${OS}.pkg
|
xcrun stapler staple artifacts/inkstitch-${VERSION}-${OS}.pkg
|
||||||
|
echo "Fetching the Notary Log"
|
||||||
|
# code snippet is from https://github.com/ddev/signing_tools/blob/master/macos_notarize.sh
|
||||||
|
status=$(jq -r .status </tmp/notarization_info.json)
|
||||||
|
id=$(jq -r .id </tmp/notarization_info.json)
|
||||||
|
echo "status=${status} id=${id}"
|
||||||
|
xcrun notarytool log --apple-id "${NOTARY_ACCOUNT}" --team-id '929A568N58' --password "${NOTARY_PASSWORD}" ${id} -f json >/tmp/notarization_log.json
|
||||||
|
issues=$(jq -r .issues </tmp/notarization_log.json)
|
||||||
|
if [ "$issues" != "null" ]; then
|
||||||
|
printf "There are issues with the notarization (${issues})\n"
|
||||||
|
printf "=== Log output === \n$(cat /tmp/notarization_log.json)\n"
|
||||||
|
exit 7;
|
||||||
|
fi;
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# local builds will not be signed or notarized
|
# local builds will not be signed or notarized
|
||||||
|
|
|
@ -380,13 +380,10 @@ def process_travel_edges(graph, fill_stitch_graph, shape, travel_edges):
|
||||||
|
|
||||||
edge = (p1.as_tuple(), p2.as_tuple(), 'travel')
|
edge = (p1.as_tuple(), p2.as_tuple(), 'travel')
|
||||||
|
|
||||||
for segment in strtree.query(ls):
|
for segment in strtree.query(ls, predicate='crosses'):
|
||||||
# It seems like the STRTree only gives an approximate answer of
|
segment_geom = strtree.geometries.take(segment)
|
||||||
# segments that _might_ intersect ls. Refining the result is
|
start = segment_geom.coords[0]
|
||||||
# necessary but the STRTree still saves us a ton of time.
|
end = segment_geom.coords[-1]
|
||||||
if segment.crosses(ls):
|
|
||||||
start = segment.coords[0]
|
|
||||||
end = segment.coords[-1]
|
|
||||||
fill_stitch_graph[start][end]['segment']['underpath_edges'].append(edge)
|
fill_stitch_graph[start][end]['segment']['underpath_edges'].append(edge)
|
||||||
|
|
||||||
# The weight of a travel edge is the length of the line segment.
|
# The weight of a travel edge is the length of the line segment.
|
||||||
|
|
|
@ -268,7 +268,7 @@ def intersect_region_with_grating_guideline(shape, line, row_spacing, num_stagge
|
||||||
stitched_line = apply_stitches(offset_line, max_stitch_length, num_staggers, row_spacing, row)
|
stitched_line = apply_stitches(offset_line, max_stitch_length, num_staggers, row_spacing, row)
|
||||||
intersection = shape.intersection(stitched_line)
|
intersection = shape.intersection(stitched_line)
|
||||||
|
|
||||||
if shape_envelope.intersects(stitched_line):
|
if not intersection.is_empty and shape_envelope.intersects(stitched_line):
|
||||||
for segment in take_only_line_strings(intersection).geoms:
|
for segment in take_only_line_strings(intersection).geoms:
|
||||||
rows.append(segment.coords[:])
|
rows.append(segment.coords[:])
|
||||||
row += direction
|
row += direction
|
||||||
|
|
|
@ -7,7 +7,7 @@ wxPython>=4.1.1
|
||||||
|
|
||||||
backports.functools_lru_cache
|
backports.functools_lru_cache
|
||||||
networkx
|
networkx
|
||||||
shapely==1.8.5
|
shapely
|
||||||
lxml
|
lxml
|
||||||
appdirs
|
appdirs
|
||||||
numpy
|
numpy
|
||||||
|
@ -26,3 +26,4 @@ diskcache
|
||||||
flask-cors
|
flask-cors
|
||||||
pywinutils ; sys_platform == 'win32'
|
pywinutils ; sys_platform == 'win32'
|
||||||
pywin32 ; sys_platform == 'win32'
|
pywin32 ; sys_platform == 'win32'
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue