Skip to content

Commit

Permalink
databases/py-asyncmy: Fix cf0d933
Browse files Browse the repository at this point in the history
Rename build.py to build_cython.py. Otherwise, it masks PEP517_BUILD_CMD (python -m build ...).
  • Loading branch information
sunpoet committed Apr 18, 2023
1 parent 2e70c5d commit c4b4f39
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions databases/py-asyncmy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=0:devel/py-poetry-core@${PY_F
USES= python:3.7+
USE_PYTHON= autoplist concurrent cython pep517

post-patch:
@${MV} ${WRKSRC}/build.py ${WRKSRC}/build_cython.py

post-install:
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +

Expand Down
19 changes: 19 additions & 0 deletions databases/py-asyncmy/files/patch-pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- pyproject.toml.orig 2023-02-15 05:35:05 UTC
+++ pyproject.toml
@@ -3,7 +3,6 @@ authors = ["long2ice <long2ice@gmail.com>"]
description = "A fast asyncio MySQL driver"
documentation = "https://github.com/long2ice/asyncmy"
homepage = "https://github.com/long2ice/asyncmy"
-include = ["CHANGELOG.md", "LICENSE", "README.md"]
keywords = ["driver", "asyncio", "mysql"]
license = "Apache-2.0"
name = "asyncmy"
@@ -40,7 +39,7 @@ uvloop = { version = "*", markers = "sys_platform != '
[tool.poetry.build]
generate-setup-file = true
-script = "build.py"
+script = "build_cython.py"

[build-system]
build-backend = "poetry.core.masonry.api"
11 changes: 11 additions & 0 deletions databases/py-asyncmy/files/patch-setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- setup.py.orig 1970-01-01 00:00:00 UTC
+++ setup.py
@@ -21,7 +21,7 @@ setup_kwargs = {
'package_data': package_data,
'python_requires': '>=3.7,<4.0',
}
-from build import *
+from build_cython import *
build(setup_kwargs)

setup(**setup_kwargs)

0 comments on commit c4b4f39

Please sign in to comment.