Skip to content

Minimal working shapely package with pygeos code included#1237

Merged
jorisvandenbossche merged 3 commits intoshapely:mainfrom
jorisvandenbossche:merge-python-packages
Dec 1, 2021
Merged

Minimal working shapely package with pygeos code included#1237
jorisvandenbossche merged 3 commits intoshapely:mainfrom
jorisvandenbossche:merge-python-packages

Conversation

@jorisvandenbossche
Copy link
Copy Markdown
Member

@jorisvandenbossche jorisvandenbossche commented Dec 1, 2021

After merging in the https://github.com/pygeos/pygeos repo into Shapely, this are some minimal changes to get a the shapely package in a "working state":

  • First commit: move /pygeos/* directory into /shapely/*. The only conflict is strtree.py, so the pygeos version is temporarily named strtree_pygeos.py (and in a follow-up we need to merge both strtree files)
  • Second commit: replacing "pygeos" with "shapely" in the package source and tests (not yet in docs, CI, etc, also not yet in docstring examples (for doctests))
  • Third commit: minimal changes to get a working package:
    • minimal setup.py (I kept the old one as setup_shapely.py for now, we can in a follow-up consolidate the setup files (the exact setup arguments, author, maintainer, description, etc)
    • renamed geometry.py to _geometry.py, because it otherwise conflicts with geometry/__init__.py submodule (and therefore also renamed _geometry.pyx to _geometry_helpers.pyx). If there are other suggestions for names, that's certainly welcome.

With those changes, building and installing the new shapely package works (python setup.py build_ext -i / python setup.py develop / pip install -e . --no-build-isolation), and the package is in a working state: it imports, most functionality works, the tests run (but there are still a bunch of failures)

(it's probably easiest to check the commits separately)

cc @sgillies @caspervdw

@caspervdw
Copy link
Copy Markdown
Collaborator

Looks good @jorisvandenbossche !

@jorisvandenbossche
Copy link
Copy Markdown
Member Author

Since this blocks other PRs, and is mostly some moving things around and renaming, going to merge this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants