|
|
@ -2,7 +2,7 @@ |
|
|
# Distributed under the terms of the GNU General Public License v2 |
|
|
# Distributed under the terms of the GNU General Public License v2 |
|
|
|
|
|
|
|
|
EAPI=6 |
|
|
EAPI=6 |
|
|
PYTHON_COMPAT=( python{2_7,3_{6..10}} ) |
|
|
|
|
|
|
|
|
PYTHON_COMPAT=( python3_{8..10} ) |
|
|
|
|
|
|
|
|
inherit check-reqs autotools eutils python-r1 udev user \ |
|
|
inherit check-reqs autotools eutils python-r1 udev user \ |
|
|
readme.gentoo-r1 systemd versionator flag-o-matic toolchain-funcs |
|
|
readme.gentoo-r1 systemd versionator flag-o-matic toolchain-funcs |
|
|
@ -64,6 +64,7 @@ COMMON_DEPEND=" |
|
|
lttng? ( dev-util/lttng-ust:= ) |
|
|
lttng? ( dev-util/lttng-ust:= ) |
|
|
${PYTHON_DEPS} |
|
|
${PYTHON_DEPS} |
|
|
" |
|
|
" |
|
|
|
|
|
BDEPEND="dev-lang/python:2.7" |
|
|
DEPEND="${COMMON_DEPEND} |
|
|
DEPEND="${COMMON_DEPEND} |
|
|
dev-python/cython[${PYTHON_USEDEP}] |
|
|
dev-python/cython[${PYTHON_USEDEP}] |
|
|
app-arch/cpio |
|
|
app-arch/cpio |
|
|
@ -86,7 +87,7 @@ RDEPEND="${COMMON_DEPEND} |
|
|
dev-python/requests[${PYTHON_USEDEP}] |
|
|
dev-python/requests[${PYTHON_USEDEP}] |
|
|
" |
|
|
" |
|
|
REQUIRED_USE=" |
|
|
REQUIRED_USE=" |
|
|
$(python_gen_useflags 'python2*') |
|
|
|
|
|
|
|
|
|| ( $(python_gen_useflags 'python3*') ) |
|
|
${PYTHON_REQUIRED_USE} |
|
|
${PYTHON_REQUIRED_USE} |
|
|
^^ ( nss cryptopp ) |
|
|
^^ ( nss cryptopp ) |
|
|
?? ( jemalloc tcmalloc ) |
|
|
?? ( jemalloc tcmalloc ) |
|
|
@ -152,18 +153,6 @@ emake_python_bindings() { |
|
|
__emake_python_bindings_do_impl() { |
|
|
__emake_python_bindings_do_impl() { |
|
|
ceph_run_econf "${EPYTHON}" |
|
|
ceph_run_econf "${EPYTHON}" |
|
|
emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}" |
|
|
emake "${params[@]}" PYTHON="${EPYTHON}" "${binding}-pybind-${action}" |
|
|
|
|
|
|
|
|
# these don't work and aren't needed on python3 |
|
|
|
|
|
if [[ ${EBUILD_PHASE} == install ]]; then |
|
|
|
|
|
for module in "${S}"/src/pybind/*.py; do |
|
|
|
|
|
module_basename="$(basename "${module}")" |
|
|
|
|
|
if [[ ${module_basename} == ceph_volume_client.py ]] && ! use cephfs; then |
|
|
|
|
|
continue |
|
|
|
|
|
elif [[ ! -e "${ED}/$(python_get_sitedir)/${module_basename}" ]]; then |
|
|
|
|
|
python_domodule ${module} |
|
|
|
|
|
fi |
|
|
|
|
|
done |
|
|
|
|
|
fi |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
pushd "${S}/src" |
|
|
pushd "${S}/src" |
|
|
@ -233,8 +222,7 @@ src_configure() { |
|
|
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
|
|
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
# we can only use python2.7 for building at the moment |
|
|
|
|
|
ceph_run_econf "python2*" |
|
|
|
|
|
|
|
|
ceph_run_econf "python3*" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
ceph_run_econf() { |
|
|
ceph_run_econf() { |
|
|
@ -298,7 +286,7 @@ src_install() { |
|
|
|
|
|
|
|
|
readme.gentoo_create_doc |
|
|
readme.gentoo_create_doc |
|
|
|
|
|
|
|
|
python_setup 'python2*' |
|
|
|
|
|
|
|
|
python_setup 'python3*' |
|
|
python_fix_shebang "${ED}"/usr/{,s}bin/ |
|
|
python_fix_shebang "${ED}"/usr/{,s}bin/ |
|
|
|
|
|
|
|
|
# python_fix_shebang apparently is not idempotent |
|
|
# python_fix_shebang apparently is not idempotent |
|
|
|