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 -r requirements.txt
|
||||
python -m pip install pyinstaller
|
||||
python -m pip install pyinstaller==5.13.2
|
||||
|
||||
# scipy gives us a ELF error when stripped
|
||||
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
|
||||
python -m pip install numpy==1.23.1
|
||||
python -m pip install scipy==1.9.0
|
||||
pip install wxPython
|
||||
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
|
||||
- shell: bash
|
||||
|
@ -163,8 +164,9 @@ jobs:
|
|||
git config --system core.longpaths true
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install wheel
|
||||
pip install wxPython
|
||||
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
|
||||
- shell: bash
|
||||
|
@ -198,7 +200,7 @@ jobs:
|
|||
submodules: recursive
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8.x'
|
||||
python-version: '3.9.x'
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.x'
|
||||
|
@ -207,7 +209,7 @@ jobs:
|
|||
run: |
|
||||
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 PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
|
||||
|
@ -221,13 +223,9 @@ jobs:
|
|||
pip --version
|
||||
pip install wheel
|
||||
pip install PyGObject
|
||||
pip install wxpython==4.1.1
|
||||
pip install wxPython
|
||||
pip install -r requirements.txt
|
||||
# with --no-binary argument may fix notary issues as well shapely speedups error issue
|
||||
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
|
||||
pip install pyinstaller==5.13.2
|
||||
|
||||
echo "${{ env.pythonLocation }}/bin" >> $GITHUB_PATH
|
||||
- shell: bash
|
||||
|
|
|
@ -8,6 +8,8 @@ if [ "$BUILD" = "osx" ]; then
|
|||
# adding version to Info.plist
|
||||
plutil -replace CFBundleShortVersionString -string ${VERSION} dist/inkstitch.app/Contents/Info.plist
|
||||
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
|
||||
PKG_INSTALL_PATH="/tmp/inkstitch/"
|
||||
# Checking arch of macos and setting path of electron for arm64 or intel
|
||||
|
@ -70,11 +72,23 @@ if [ "$BUILD" = "osx" ]; then
|
|||
--team-id '929A568N58' \
|
||||
--password "${NOTARY_PASSWORD}"
|
||||
echo "Invoking notary process"
|
||||
xcrun notarytool submit --wait \
|
||||
xcrun notarytool submit -f json --wait \
|
||||
--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"
|
||||
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
|
||||
else
|
||||
# local builds will not be signed or notarized
|
||||
|
|
|
@ -380,14 +380,11 @@ def process_travel_edges(graph, fill_stitch_graph, shape, travel_edges):
|
|||
|
||||
edge = (p1.as_tuple(), p2.as_tuple(), 'travel')
|
||||
|
||||
for segment in strtree.query(ls):
|
||||
# It seems like the STRTree only gives an approximate answer of
|
||||
# segments that _might_ intersect ls. Refining the result is
|
||||
# necessary but the STRTree still saves us a ton of time.
|
||||
if segment.crosses(ls):
|
||||
start = segment.coords[0]
|
||||
end = segment.coords[-1]
|
||||
fill_stitch_graph[start][end]['segment']['underpath_edges'].append(edge)
|
||||
for segment in strtree.query(ls, predicate='crosses'):
|
||||
segment_geom = strtree.geometries.take(segment)
|
||||
start = segment_geom.coords[0]
|
||||
end = segment_geom.coords[-1]
|
||||
fill_stitch_graph[start][end]['segment']['underpath_edges'].append(edge)
|
||||
|
||||
# The weight of a travel edge is the length of the line segment.
|
||||
weight = p1.distance(p2)
|
||||
|
|
|
@ -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)
|
||||
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:
|
||||
rows.append(segment.coords[:])
|
||||
row += direction
|
||||
|
|
|
@ -7,7 +7,7 @@ wxPython>=4.1.1
|
|||
|
||||
backports.functools_lru_cache
|
||||
networkx
|
||||
shapely==1.8.5
|
||||
shapely
|
||||
lxml
|
||||
appdirs
|
||||
numpy
|
||||
|
@ -26,3 +26,4 @@ diskcache
|
|||
flask-cors
|
||||
pywinutils ; sys_platform == 'win32'
|
||||
pywin32 ; sys_platform == 'win32'
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue