Skip to content

Fix maturin bundling for rust-python code #200

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

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

kylebarron
Copy link
Contributor

Change list

  • Move Python code into python/ directory. This is suggested by the maturin docs here (See note that this structure is recommended to avoid a common ImportError pitfall).
  • Rename internal rust library from pgstacrs to pypgstac.pgstacrs
  • Update import

Now this includes the rust binary (see pypgstac/pgstacrs.abi3.so).

> maturin build -o dist
> unzip -l dist/pypgstac-0.7.10.dev0-cp38-abi3-macosx_11_0_arm64.whl
Archive:  dist/pypgstac-0.7.10.dev0-cp38-abi3-macosx_11_0_arm64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
     2311  08-16-2023 17:40   pypgstac-0.7.10.dev0.dist-info/METADATA
      102  08-16-2023 17:40   pypgstac-0.7.10.dev0.dist-info/WHEEL
       49  08-16-2023 17:40   pypgstac-0.7.10.dev0.dist-info/entry_points.txt
     8931  08-16-2023 17:40   pypgstac/db.py
       42  08-16-2023 17:40   pypgstac/version.py
       92  08-16-2023 17:40   pypgstac/__init__.py
     5601  08-16-2023 17:40   pypgstac/hydration.py
        0  08-16-2023 17:40   pypgstac/py.typed
    25857  08-16-2023 17:40   pypgstac/load.py
     5453  08-16-2023 17:40   pypgstac/migrate.py
     3443  08-16-2023 17:40   pypgstac/pypgstac.py
   889350  08-16-2023 17:40   pypgstac/pgstacrs.abi3.so
     1010  08-16-2023 17:40   pypgstac-0.7.10.dev0.dist-info/RECORD
---------                     -------
   942241                     13 files

@kylebarron kylebarron changed the title Fix maturin bundling Fix maturin bundling for rust-python code Aug 16, 2023
@bitner bitner merged commit 982ab25 into stac-utils:rusthydrate Aug 16, 2023
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