diff options
| author | Marshall Brewer (Gentoo Key) <tomboy64@sina.cn> | 2016-04-17 21:25:41 +0200 |
|---|---|---|
| committer | Ian Delaney <idella4@gentoo.org> | 2016-04-21 17:51:59 +0800 |
| commit | f47f7012a3efc785a9672d5197ed16f4038a0291 (patch) | |
| tree | 3a1c3d1668dca4690950391e7861e657cc7d38be /dev-python/protobuf-python/files | |
| parent | 88c7324a377aa965facacc0b8a2704d59bf76cf4 (diff) | |
| download | gentoo-f47f7012a3efc785a9672d5197ed16f4038a0291.tar.gz gentoo-f47f7012a3efc785a9672d5197ed16f4038a0291.tar.bz2 gentoo-f47f7012a3efc785a9672d5197ed16f4038a0291.zip | |
dev-python/protobuf-python: initial version, 3.0.0_beta2
- outsourced python implementation of dev-libs/protobuf
- added PYTHON_COMPAT for python 3.* and pypy{,3}
Package-Manager: portage-2.2.28
RepoMan-Options: --ignore-arches
Closes: https://github.com/gentoo/gentoo/pull/1295
Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'dev-python/protobuf-python/files')
| -rw-r--r-- | dev-python/protobuf-python/files/protobuf-3.0.0_beta2-link-against-installed-lib.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/dev-python/protobuf-python/files/protobuf-3.0.0_beta2-link-against-installed-lib.patch b/dev-python/protobuf-python/files/protobuf-3.0.0_beta2-link-against-installed-lib.patch new file mode 100644 index 000000000000..3d419ba3d194 --- /dev/null +++ b/dev-python/protobuf-python/files/protobuf-3.0.0_beta2-link-against-installed-lib.patch @@ -0,0 +1,32 @@ +diff -Naur python/setup.py python/setup.py +--- python/setup.py 2015-12-30 22:21:46.000000000 +0100 ++++ python/setup.py 2016-04-18 00:51:49.490809789 +0200 +@@ -169,14 +169,26 @@ + extra_compile_args.append('-Werror') + sys.argv.remove(warnings_as_errors) + ++ inclD = ['.', '../src'] ++ libD = [] ++ try: ++ subprocess.check_call(['pkg-config', '--exists', 'protobuf']) ++ inclD += subprocess.check_output(['pkg-config','--variable=includedir','protobuf']).split() ++ libD = subprocess.check_output(['pkg-config','--variable=libdir','protobuf']).split() ++ except OSError as osex: ++ if osex.errno == errno.ENOENT: ++ info('pkg-config not found') ++ else: ++ warn("Running pkg-config failed - %s." % osexception) ++ libD = ['../src/.libs'] + # C++ implementation extension + ext_module_list.append( + Extension( + "google.protobuf.pyext._message", + glob.glob('google/protobuf/pyext/*.cc'), +- include_dirs=[".", "../src"], ++ include_dirs=inclD, + libraries=['protobuf'], +- library_dirs=['../src/.libs'], ++ library_dirs=libD, + extra_compile_args=extra_compile_args, + ) + ) |
