Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 744619 - dev-python/grpcio: add prefix support
Summary: dev-python/grpcio: add prefix support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-25 11:38 UTC by Benda Xu
Modified: 2020-09-26 08:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
grpcio.patch (grpcio.patch,1.77 KB, patch)
2020-09-25 11:40 UTC, Benda Xu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benda Xu gentoo-dev 2020-09-25 11:38:26 UTC
Hi Georgy,

This is a patch to add prefix support to grpcio.  Please have a review.

Yours,
Benda

Reproducible: Always
Comment 1 Benda Xu gentoo-dev 2020-09-25 11:40:28 UTC
Created attachment 662359 [details, diff]
grpcio.patch

Here is an additional diff against the previous ebuild.  Thanks!

--- grpcio-1.28.1.ebuild        2020-09-25 19:33:28.965829717 +0800
+++ grpcio-1.28.1-r1.ebuild     2020-09-25 19:33:47.610335653 +0800
@@ -4,7 +4,7 @@
 EAPI=7 
        
 PYTHON_COMPAT=( python3_{6..9} )
-inherit distutils-r1 multiprocessing                                                                                                                                                                           
+inherit distutils-r1 multiprocessing prefix
 
 DESCRIPTION="High-performance RPC framework (python libraries)"
 HOMEPAGE="https://grpc.io"
@@ -12,7 +12,7 @@
 
 LICENSE="Apache-2.0"
 SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
 
 RDEPEND=">=dev-libs/openssl-1.0.2:0=[-bindist]
        >=dev-python/cython-0.28.3[${PYTHON_USEDEP}]
@@ -27,6 +27,13 @@
 
 PATCHES=( "${FILESDIR}/setup.py-respect-cc.patch" )
 
+python_prepare_all() {
+       distutils-r1_python_prepare_all
+
+       # Prefixify hard-coded system library locations.
+       hprefixify setup.py
+}
+
 python_configure_all() {
        export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1
        export GRPC_PYTHON_BUILD_SYSTEM_CARES=1
Comment 2 Georgy Yakovlev archtester gentoo-dev 2020-09-25 22:20:49 UTC
thanks, will bump today to new version and will try to include patch.
Comment 3 Larry the Git Cow gentoo-dev 2020-09-25 22:55:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31fe4f98334024bbb8f99fc16c75ac442f179a22

commit 31fe4f98334024bbb8f99fc16c75ac442f179a22
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-09-25 22:36:55 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-09-25 22:55:06 +0000

    dev-python/grpcio: bump to 1.32.0
    
    Bug: https://bugs.gentoo.org/744619
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-python/grpcio/Manifest                         |  1 +
 ...up.py-respect-CC-variable-in-latomic-test.patch | 28 ++++++++++++++
 dev-python/grpcio/grpcio-1.32.0.ebuild             | 43 ++++++++++++++++++++++
 3 files changed, 72 insertions(+)
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-09-25 22:57:01 UTC
works fine =)

if you need it added to older versions - feel free to commit your patch without revbump and close the bug. but grpcio-tools also needs  it, those are sister packages.
Comment 5 Benda Xu gentoo-dev 2020-09-26 08:55:21 UTC
Thank you Georgy!  I just do not have enough expertise to bump the version :)

The new ebuild is perfect!