Skip to content

Commit

Permalink
Add Shapely (emscripten-forge#1130)
Browse files Browse the repository at this point in the history
* add first build and recipe

* add flag for custom geos

* remove_build_geos

re

* Create test_shapely.py

* Update recipe.yaml

* Update recipe.yaml

* Update recipe.yaml

---------

Co-authored-by: Thorsten Beier <[email protected]>
  • Loading branch information
2 people authored and luizirber committed Jul 31, 2024
1 parent 8274ee9 commit e1bc549
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 0 deletions.
3 changes: 3 additions & 0 deletions recipes/recipes_emscripten/shapely/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

${PYTHON} -m pip install . -vv --no-binary shapely
55 changes: 55 additions & 0 deletions recipes/recipes_emscripten/shapely/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
context:
name: shapely
version: 2.0.4

package:
name: ${{ name }}
version: ${{ version }}

source:
url: https://pypi.io/packages/source/S/Shapely/shapely-${{ version }}.tar.gz
sha256: 5dc736127fac70009b8d309a0eeb74f3e08979e530cf7017f2f507ef62e6cfb8

build:
number: 0

requirements:
build:
- python
- pip
- cross-python_${{ target_platform }}
- cython
- numpy<2
- ${{ compiler('c') }}
host:
- python
- pip
#- cython
- numpy <2
- geos
run:
- geos
- python
- numpy

tests:
- script: pytester
requirements:
build:
- pytester
run:
- pytester-run
files:
recipe:
- test_shapely.py


about:
homepage: https://github.com/shapely/shapely
license: BSD-3-Clause
license_file: LICENSE.txt
summary: Python package for manipulation and analysis of geometric objects in the Cartesian plane

extra:
recipe-maintainers:
- KGB99
11 changes: 11 additions & 0 deletions recipes/recipes_emscripten/shapely/test_shapely.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest


def test_import():
import shapely

def test_basics():
from shapely import Polygon
c = Polygon([[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]).minimum_clearance
c == pytest.approx(1.0)

0 comments on commit e1bc549

Please sign in to comment.