Skip to content

Commit

Permalink
devel/py-jellyfish: Prepare for py-maturin >= 1.x
Browse files Browse the repository at this point in the history
* Relax version requirements and add the additional directive
  "modulename" to point newer versions of py-maturin to the symbols of
  the binary module.  Otherwise it emits following warning and leads to
  runtime errors:

  [...]
  Warning: Couldn't find the symbol `PyInit_jellyfish` in the native
  library. Python will fail to import this module. If you're using pyo3,
  check that `#[pymodule]` uses `jellyfish` as module name
  [...]

* No PORTREVISION bump as the package doesn't change.

PR:		272570
Approved by:	portmgr (buildfix blanket)
  • Loading branch information
knobix committed Aug 10, 2023
1 parent 40e2e9a commit 44ddc34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion devel/py-jellyfish/Makefile
Expand Up @@ -13,7 +13,7 @@ WWW= https://github.com/jamesturk/jellyfish
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}maturin>=0.13<0.15:devel/py-maturin@${PY_FLAVOR}
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}maturin>=0.13<2:devel/py-maturin@${PY_FLAVOR}

USES= cargo python
USE_PYTHON= autoplist concurrent pep517
Expand Down
7 changes: 6 additions & 1 deletion devel/py-jellyfish/files/patch-pyproject.toml
Expand Up @@ -3,7 +3,12 @@
@@ -1,5 +1,5 @@
[build-system]
-requires = ["maturin>=0.14,<0.15"]
+requires = ["maturin>=0.13,<0.15"]
+requires = ["maturin>=0.13,<2"]
build-backend = "maturin"

[project]
@@ -24,3 +24,4 @@ python-source = "python"
[tool.maturin]
features = ["pyo3/extension-module", "python"]
python-source = "python"
+module-name = "jellyfish._rustyfish"

0 comments on commit 44ddc34

Please sign in to comment.