1 |
commit: 20edee675a7688b6c022160112a098a0fe828b0d |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 8 00:35:08 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 8 00:39:13 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20edee67 |
7 |
|
8 |
dev-python/sqlalchemy: disable greenlet dependency conditionally |
9 |
|
10 |
We should try pull it in on arches where it's possible |
11 |
but we shouldn't hard require it given most things |
12 |
work fine without it. |
13 |
|
14 |
Some applications do need it though, so do this |
15 |
conditionally so they can depend on it rather |
16 |
than ending up being broken by depcleans |
17 |
or requiring people to put it in world files. |
18 |
|
19 |
Closes: https://bugs.gentoo.org/828482 |
20 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
21 |
|
22 |
.../files/sqlalchemy-1.4.27-drop-greenlet.patch | 49 ++++++++++++++++++++++ |
23 |
....4.27-r2.ebuild => sqlalchemy-1.4.27-r3.ebuild} | 12 +++++- |
24 |
2 files changed, 59 insertions(+), 2 deletions(-) |
25 |
|
26 |
diff --git a/dev-python/sqlalchemy/files/sqlalchemy-1.4.27-drop-greenlet.patch b/dev-python/sqlalchemy/files/sqlalchemy-1.4.27-drop-greenlet.patch |
27 |
new file mode 100644 |
28 |
index 000000000000..07184b843c9e |
29 |
--- /dev/null |
30 |
+++ b/dev-python/sqlalchemy/files/sqlalchemy-1.4.27-drop-greenlet.patch |
31 |
@@ -0,0 +1,49 @@ |
32 |
+Not available on all arches we support and is only needed for |
33 |
+a few consumers. |
34 |
+ |
35 |
+https://bugs.gentoo.org/828482 |
36 |
+ |
37 |
+From: Sam James <sam@g.o> |
38 |
+Date: Wed, 8 Dec 2021 00:31:01 +0000 |
39 |
+Subject: [PATCH] Drop greenlet dependency |
40 |
+ |
41 |
+--- a/setup.cfg |
42 |
++++ b/setup.cfg |
43 |
+@@ -36,11 +36,8 @@ package_dir = |
44 |
+ =lib |
45 |
+ install_requires = |
46 |
+ importlib-metadata;python_version<"3.8" |
47 |
+- greenlet != 0.4.17;python_version>='3' and (platform_machine=='aarch64' or (platform_machine=='ppc64le' or (platform_machine=='x86_64' or (platform_machine=='amd64' or (platform_machine=='AMD64' or (platform_machine=='win32' or platform_machine=='WIN32')))))) |
48 |
+ |
49 |
+ [options.extras_require] |
50 |
+-asyncio = |
51 |
+- greenlet!=0.4.17;python_version>="3" |
52 |
+ mypy = |
53 |
+ mypy >= 0.910;python_version>="3" |
54 |
+ sqlalchemy2-stubs |
55 |
+diff --git a/setup.cfg b/setup.cfg |
56 |
+index b7f69e9..91993f7 100644 |
57 |
+--- a/setup.cfg |
58 |
++++ b/setup.cfg |
59 |
+@@ -57,7 +57,6 @@ oracle = |
60 |
+ postgresql = psycopg2>=2.7 |
61 |
+ postgresql_pg8000 = pg8000>=1.16.6 |
62 |
+ postgresql_asyncpg = |
63 |
+- %(asyncio)s |
64 |
+ asyncpg;python_version>="3" |
65 |
+ postgresql_psycopg2binary = psycopg2-binary |
66 |
+ postgresql_psycopg2cffi = psycopg2cffi |
67 |
+@@ -65,13 +64,10 @@ pymysql = |
68 |
+ pymysql;python_version>="3" |
69 |
+ pymysql<1;python_version<"3" |
70 |
+ aiomysql = |
71 |
+- %(asyncio)s |
72 |
+ aiomysql;python_version>="3" |
73 |
+ asyncmy = |
74 |
+- %(asyncio)s |
75 |
+ asyncmy>=0.2.3;python_version>="3" |
76 |
+ aiosqlite = |
77 |
+- %(asyncio)s |
78 |
+ aiosqlite;python_version>="3" |
79 |
+ typing_extensions!=3.10.0.1 |
80 |
+ sqlcipher = |
81 |
|
82 |
diff --git a/dev-python/sqlalchemy/sqlalchemy-1.4.27-r2.ebuild b/dev-python/sqlalchemy/sqlalchemy-1.4.27-r3.ebuild |
83 |
similarity index 84% |
84 |
rename from dev-python/sqlalchemy/sqlalchemy-1.4.27-r2.ebuild |
85 |
rename to dev-python/sqlalchemy/sqlalchemy-1.4.27-r3.ebuild |
86 |
index 24bcfe77ce84..21f126d011c4 100644 |
87 |
--- a/dev-python/sqlalchemy/sqlalchemy-1.4.27-r2.ebuild |
88 |
+++ b/dev-python/sqlalchemy/sqlalchemy-1.4.27-r3.ebuild |
89 |
@@ -19,10 +19,10 @@ S="${WORKDIR}/${MY_P}" |
90 |
LICENSE="MIT" |
91 |
SLOT="0" |
92 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" |
93 |
-IUSE="examples +sqlite test" |
94 |
+IUSE="asyncio examples +sqlite test" |
95 |
|
96 |
# greenlet for bug #823794 |
97 |
-RDEPEND="virtual/python-greenlet[${PYTHON_USEDEP}]" |
98 |
+RDEPEND="asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] )" |
99 |
BDEPEND=" |
100 |
test? ( |
101 |
$(python_gen_impl_dep sqlite) |
102 |
@@ -36,6 +36,14 @@ EPYTEST_IGNORE=( |
103 |
test/aaa_profiling |
104 |
) |
105 |
|
106 |
+src_prepare() { |
107 |
+ if ! use asyncio ; then |
108 |
+ eapply "${FILESDIR}"/${PN}-1.4.27-drop-greenlet.patch |
109 |
+ fi |
110 |
+ |
111 |
+ distutils-r1_src_prepare |
112 |
+} |
113 |
+ |
114 |
python_install_all() { |
115 |
if use examples; then |
116 |
docompress -x "/usr/share/doc/${PF}/examples" |