Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Shapely to 2.0.6 #1274

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update Shapely to 2.0.6 #1274

wants to merge 2 commits into from

Conversation

rbebb
Copy link
Contributor

@rbebb rbebb commented Oct 23, 2024

This updates Shapely to the latest version! Please let me know if I missed any steps!

Closes #1269

@rbebb rbebb changed the title Update Shapely to 2.0.6 #1269 Update Shapely to 2.0.6 Oct 23, 2024
@rbebb rbebb changed the title #1269 Update Shapely to 2.0.6 Update Shapely to 2.0.6 Oct 23, 2024
@mhsmith
Copy link
Member

mhsmith commented Oct 23, 2024

I think the main step you missed was to actually test your changes. cython doesn't have a version number, so there's no way this recipe could work.

The build-wheel tool now installs build-system requirements from pyproject.toml files, so in many cases the cython requirements can now be removed from the meta.yaml files.

Also, unless there's a specific reason, which should be explained with a comment, the NumPy versions should follow the same pattern as the other packages that use it, such as Pandas and Matplotlib.

@rbebb
Copy link
Contributor Author

rbebb commented Nov 4, 2024

I had updated numpy since there's a more up-to-date copy available in the Chaquopy package index. I can revert that change though!

- Revert numpy version change
- Remove build requirements now that the build-wheel tool can install build-system requirements from a pyproject.toml file
@rbebb
Copy link
Contributor Author

rbebb commented Nov 4, 2024

@mhsmith, updated the PR. I reverted the numpy change and removed the cython requirement.

@mhsmith
Copy link
Member

mhsmith commented Nov 9, 2024

I had updated numpy since there's a more up-to-date copy available in the Chaquopy package index

Building against a library at compile time means that you must use that version or newer at runtime. So to give as much flexibility as possible, it's better to build against older versions where feasible.

@mhsmith
Copy link
Member

mhsmith commented Nov 9, 2024

@mhsmith, updated the PR. I reverted the numpy change and removed the cython requirement.

The build still doesn't work, because the patch doesn't apply to the new version:

(pypi) smith@chaquo:~/git/chaquo/chaquopy/server/pypi$ ./build-wheel.py --python 3.8 --abi arm64-v8a shapely
build-wheel: mkdir -p /home/smith/git/chaquo/chaquopy/server/pypi/packages/shapely/build/2.0.6
build-wheel: cd /home/smith/git/chaquo/chaquopy/server/pypi/packages/shapely/build/2.0.6
build-wheel: mkdir -p /home/smith/git/chaquo/chaquopy/server/pypi/packages/shapely/build/2.0.6/cp38-cp38-android_24_arm64_v8a
build-wheel: Searching PyPI
/home/smith/.venv/pypi/lib/python3.8/site-packages/pypi_simple/classes.py:275: UnexpectedRepoVersionWarning: Repository's version (1.3) has greater minor component than supported version (1.1)
  page = RepositoryPage.from_html(html, base_url, from_encoding)
build-wheel: Downloading https://files.pythonhosted.org/packages/4a/89/0d20bac88016be35ff7d3c0c2ae64b477908f1b1dfa540c5d69ac7af07fe/shapely-2.0.6.tar.gz
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 276k/276k [00:00<00:00, 5.77MB/s]
build-wheel: tar -C /tmp/build-wheel-s2375jd4 -xf Shapely-2.0.6.tar.gz
build-wheel: mv /tmp/build-wheel-s2375jd4/shapely-2.0.6 /home/smith/git/chaquo/chaquopy/server/pypi/packages/shapely/build/2.0.6/cp38-cp38-android_24_arm64_v8a/src
build-wheel: rm -rf /tmp/build-wheel-s2375jd4
build-wheel: cd /home/smith/git/chaquo/chaquopy/server/pypi/packages/shapely/build/2.0.6/cp38-cp38-android_24_arm64_v8a/src
build-wheel: patch -p1 -i /home/smith/git/chaquo/chaquopy/server/pypi/packages/shapely/patches/chaquopy.patch
patching file setup.py
Hunk #1 FAILED at 135.
Hunk #2 FAILED at 251.
Hunk #3 FAILED at 320.
Hunk #4 FAILED at 337.
Hunk #5 FAILED at 358.
Hunk #6 FAILED at 382.
6 out of 6 hunks FAILED -- saving rejects to file setup.py.rej
build-wheel: Error: Command '['patch', '-p1', '-i', '/home/smith/git/chaquo/chaquopy/server/pypi/packages/shapely/patches/chaquopy.patch']' returned non-zero exit status 1.

In all GitHub projects, you are expected to test PRs before submitting them. Please follow the instructions in server/pypi/README.md to build and test the new Shapely version, and update the recipe as necessary. You don't have to cover all combinations of Python version and ABI, but you do have to get at least one working, and let me know what it was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Shapely
2 participants