diff options
Diffstat (limited to 'dev-python/celery')
| -rw-r--r-- | dev-python/celery/Manifest | 7 | ||||
| -rw-r--r-- | dev-python/celery/celery-5.5.3.ebuild | 110 | ||||
| -rw-r--r-- | dev-python/celery/celery-5.6.2.ebuild | 112 | ||||
| -rw-r--r-- | dev-python/celery/files/celery.confd-r2 | 51 | ||||
| -rw-r--r-- | dev-python/celery/files/celery.initd-r2 | 204 | ||||
| -rw-r--r-- | dev-python/celery/metadata.xml | 13 |
6 files changed, 497 insertions, 0 deletions
diff --git a/dev-python/celery/Manifest b/dev-python/celery/Manifest new file mode 100644 index 000000000000..068e9eada673 --- /dev/null +++ b/dev-python/celery/Manifest @@ -0,0 +1,7 @@ +AUX celery.confd-r2 1442 BLAKE2B df6ab3585c12fef2272979ad3412f08827f59e9306b7b997642ee8bd0d4c84b168f32fd9b6427be3c889af411806d37673853588999d366b549908891491bd6e SHA512 ba3172e56a18df963b5886497c51b8aaf5298b5f3055214217561c8c691678b44c762d4f68f96e597807630af4d9185b7a9d557d13f7ffe25fc0092abcd09354 +AUX celery.initd-r2 4293 BLAKE2B 8b19a9e6d41b6691b01f55cb35ba4e8d4d917e2f207e28d692764afb356f1ba1e7e50e89b384739193cc7b9fdead875900e26ea470df81c3bd32139786903f15 SHA512 69d0ab39a4235f5582b89cfe98f4820baafde33f36f4c4ef8850175c626c0c9e1b49f9d59515a153b658f49e22212a85e7a1d8f0f1209f4b794f86546bf00eb8 +DIST celery-5.5.3.gh.tar.gz 1685343 BLAKE2B 8dd1af1d58e473882170257d57e358bd5dea8f9f2d9d3e7fb5922847581d66b6f7f66fc8130e220c61f57a243882e6ca9a5dccc8cec1d85b9101bdb8b134d911 SHA512 0442d32a627ffb6a73eb622150d157a9b25324caec7ce9f1751ce0939bcf56e5e97d73c0e36b273cfeda7f70315210cbfba540f6bdb23764e6c24ab4eb7d6dff +DIST celery-5.6.2.gh.tar.gz 1743092 BLAKE2B 0654e05eee0c6e27f472d9fa0a0e5bdc0c34eb07df8005eb293141562c800c859d267840154fd95e30dca1eead46d1f20028ebdb93426b15d9092a66795a67df SHA512 cccd4bf500f85f737a2399b8ea02b8abc6bc48e38720901165f3e6a5dfe995312f171a2e2d6e142bcd8a5a8858305ac4af9e114d78a21aa9f2b9b193ab75bf2b +EBUILD celery-5.5.3.ebuild 3472 BLAKE2B ff6282f43fdbd8083e073c0667075ff2a0b179ed50415213972435fa3360c3dac2731f1c09cb824b62e7a3700247791cebf0739f57f07b9faf5d29287b4ad52e SHA512 b592512cff159c45c7fcd85bac9a82908c2aea173a567041fca07f3682c5ec62e77c93511d12d5ef82bdb87e5e6e91300065b84111498e9e04b40675986cd06d +EBUILD celery-5.6.2.ebuild 3526 BLAKE2B 4bb8024e0c22f7db3c216346cb5ae79fa568a7ec75b1f0f4a6ce82d86c38651eca66f310cf59c3383b192660ecb7dce48e9164ae4852b8473b92c9d8ff84b038 SHA512 0986388117deefbe6b3c2b5f0b369c6928159256aaec33567e3c823e2877bbc9415d9488cf66760e6cb90871a6b2837a0383dc35eee3c2128e62c2c89ef2d2f1 +MISC metadata.xml 439 BLAKE2B 96a85f59de6c6e175080209273f5bb7635ed0799a80412b327a5586abd983ef15be94716882bb926bdd683b8d3e5779c33c40d518d057c343df9794d0a7f36c3 SHA512 4b3fc6a37fcb4c09ef21fd8ba7b6a8f9139e143a9517fdc521a768c3a79c85e4dcc485ad2c2ea6874ab10a930fe2206beaa482f24d7f16b590e2a77c246e069f diff --git a/dev-python/celery/celery-5.5.3.ebuild b/dev-python/celery/celery-5.5.3.ebuild new file mode 100644 index 000000000000..c1402bc44a9d --- /dev/null +++ b/dev-python/celery/celery-5.5.3.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit bash-completion-r1 distutils-r1 optfeature + +MY_PV="${PV/_/}" +DESCRIPTION="Asynchronous task queue/job queue based on distributed message passing" +HOMEPAGE=" + https://celeryproject.org/ + https://pypi.org/project/celery/ + https://github.com/celery/celery +" +SRC_URI="https://github.com/celery/celery/archive/v${MY_PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="examples" + +RDEPEND=" + >=dev-python/billiard-4.2.1[${PYTHON_USEDEP}] + <dev-python/billiard-5.0.0[${PYTHON_USEDEP}] + >=dev-python/click-8.1.2[${PYTHON_USEDEP}] + <dev-python/click-9.0.0[${PYTHON_USEDEP}] + >=dev-python/click-didyoumean-0.3.0[${PYTHON_USEDEP}] + >=dev-python/click-plugins-1.1.1[${PYTHON_USEDEP}] + >=dev-python/click-repl-0.2.0[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}] + >=dev-python/kombu-5.5.2[${PYTHON_USEDEP}] + <dev-python/kombu-5.6[${PYTHON_USEDEP}] + >=dev-python/pytz-2022.7[${PYTHON_USEDEP}] + >=dev-python/vine-5.1.0[${PYTHON_USEDEP}] + <dev-python/vine-6.0.0[${PYTHON_USEDEP}] +" + +BDEPEND=" + test? ( + $(python_gen_impl_dep 'ncurses(+)') + >=dev-python/boto3-1.26.143[${PYTHON_USEDEP}] + >=dev-python/cryptography-44.0.2[${PYTHON_USEDEP}] + dev-python/elasticsearch[${PYTHON_USEDEP}] + dev-python/elastic-transport[${PYTHON_USEDEP}] + dev-python/greenlet[${PYTHON_USEDEP}] + dev-python/moto[${PYTHON_USEDEP}] + >=dev-python/msgpack-1.1.0[${PYTHON_USEDEP}] + >=dev-python/python-memcached-1.61[${PYTHON_USEDEP}] + >=dev-python/pymongo-4.0.2[${PYTHON_USEDEP}] + <dev-python/pymongo-4.12.0[${PYTHON_USEDEP}] + >=dev-python/pytest-celery-1.2.0[${PYTHON_USEDEP}] + <dev-python/pytest-celery-1.3.0[${PYTHON_USEDEP}] + dev-python/pytest-click[${PYTHON_USEDEP}] + >=dev-python/pytest-order-1.2.1[${PYTHON_USEDEP}] + >=dev-python/pytest-subtests-0.12.1[${PYTHON_USEDEP}] + >=dev-python/pytest-timeout-2.3.1[${PYTHON_USEDEP}] + >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}] + dev-python/redis[${PYTHON_USEDEP}] + dev-python/tblib[${PYTHON_USEDEP}] + sci-astronomy/pyephem[${PYTHON_USEDEP}] + ) + doc? ( + dev-python/docutils[${PYTHON_USEDEP}] + >=dev-python/sphinx-celery-2.1.1[${PYTHON_USEDEP}] + >=dev-python/sphinx-click-6.0.0[${PYTHON_USEDEP}] + dev-python/jinja2[${PYTHON_USEDEP}] + dev-python/sqlalchemy[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest +distutils_enable_sphinx docs --no-autodoc + +EPYTEST_IGNORE=( + # Disable backends + t/unit/backends/test_gcs.py + t/unit/backends/test_azureblockblob.py +) + +python_install_all() { + # Main celeryd init.d and conf.d + newinitd "${FILESDIR}/celery.initd-r2" celery + newconfd "${FILESDIR}/celery.confd-r2" celery + + if use examples; then + docinto examples + dodoc -r examples/. + docompress -x "/usr/share/doc/${PF}/examples" + fi + + newbashcomp extra/bash-completion/celery.bash "${PN}" + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "msgpack support" dev-python/msgpack + optfeature "redis support" dev-python/redis + optfeature "auth support" dev-python/pyopenssl + optfeature "pyro support" dev-python/Pyro4 + optfeature "yaml support" dev-python/pyyaml + optfeature "memcache support" dev-python/python-memcached + optfeature "mongodb support" dev-python/pymongo + optfeature "sqlalchemy support" dev-python/sqlalchemy + optfeature "sqs support" dev-python/boto +} diff --git a/dev-python/celery/celery-5.6.2.ebuild b/dev-python/celery/celery-5.6.2.ebuild new file mode 100644 index 000000000000..db9e5382d191 --- /dev/null +++ b/dev-python/celery/celery-5.6.2.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) + +inherit bash-completion-r1 distutils-r1 optfeature + +MY_PV="${PV/_/}" +DESCRIPTION="Asynchronous task queue/job queue based on distributed message passing" +HOMEPAGE=" + https://celeryproject.org/ + https://pypi.org/project/celery/ + https://github.com/celery/celery +" +SRC_URI="https://github.com/celery/celery/archive/v${MY_PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/${PN}-${MY_PV}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="examples" + +RDEPEND=" + >=dev-python/billiard-4.2.1[${PYTHON_USEDEP}] + <dev-python/billiard-5.0.0[${PYTHON_USEDEP}] + >=dev-python/click-8.1.2[${PYTHON_USEDEP}] + <dev-python/click-9.0.0[${PYTHON_USEDEP}] + >=dev-python/click-didyoumean-0.3.0[${PYTHON_USEDEP}] + >=dev-python/click-plugins-1.1.1[${PYTHON_USEDEP}] + >=dev-python/click-repl-0.2.0[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}] + >=dev-python/kombu-5.6.0[${PYTHON_USEDEP}] + >=dev-python/pytz-2022.7[${PYTHON_USEDEP}] + >=dev-python/vine-5.1.0[${PYTHON_USEDEP}] + <dev-python/vine-6.0.0[${PYTHON_USEDEP}] + dev-python/tzlocal[${PYTHON_USEDEP}] +" + +BDEPEND=" + test? ( + $(python_gen_impl_dep 'ncurses(+)') + >=dev-python/boto3-1.26.143[${PYTHON_USEDEP}] + >=dev-python/cryptography-46.0.3[${PYTHON_USEDEP}] + dev-python/elasticsearch[${PYTHON_USEDEP}] + dev-python/elastic-transport[${PYTHON_USEDEP}] + dev-python/greenlet[${PYTHON_USEDEP}] + dev-python/moto[${PYTHON_USEDEP}] + >=dev-python/msgpack-1.1.0[${PYTHON_USEDEP}] + >=dev-python/pycurl-7.45.4[${PYTHON_USEDEP}] + >=dev-python/python-memcached-1.61[${PYTHON_USEDEP}] + >=dev-python/pymongo-4.1.1[${PYTHON_USEDEP}] + >=dev-python/pytest-celery-1.2.0[${PYTHON_USEDEP}] + <dev-python/pytest-celery-1.3.0[${PYTHON_USEDEP}] + dev-python/pytest-click[${PYTHON_USEDEP}] + >=dev-python/pytest-order-1.2.1[${PYTHON_USEDEP}] + >=dev-python/pytest-rerunfailures-15.0[${PYTHON_USEDEP}] + >=dev-python/pytest-subtests-0.14.1[${PYTHON_USEDEP}] + >=dev-python/pytest-timeout-2.4.0[${PYTHON_USEDEP}] + >=dev-python/pyyaml-3.10[${PYTHON_USEDEP}] + dev-python/redis[${PYTHON_USEDEP}] + dev-python/tblib[${PYTHON_USEDEP}] + sci-astronomy/pyephem[${PYTHON_USEDEP}] + ) + doc? ( + dev-python/docutils[${PYTHON_USEDEP}] + dev-python/jinja2[${PYTHON_USEDEP}] + <dev-python/sphinx-9[${PYTHON_USEDEP}] + dev-python/sqlalchemy[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest +distutils_enable_sphinx docs \ + '>=dev-python/sphinx-celery-2.1.1' \ + '>=dev-python/sphinx-click-6.0.0' + +EPYTEST_IGNORE=( + # Disable backends + t/unit/backends/test_gcs.py + t/unit/backends/test_azureblockblob.py +) + +python_install_all() { + # Main celeryd init.d and conf.d + newinitd "${FILESDIR}/celery.initd-r2" celery + newconfd "${FILESDIR}/celery.confd-r2" celery + + if use examples; then + docinto examples + dodoc -r examples/. + docompress -x "/usr/share/doc/${PF}/examples" + fi + + newbashcomp extra/bash-completion/celery.bash "${PN}" + + distutils-r1_python_install_all +} + +pkg_postinst() { + optfeature "msgpack support" dev-python/msgpack + optfeature "redis support" dev-python/redis + optfeature "auth support" dev-python/pyopenssl + optfeature "pyro support" dev-python/Pyro4 + optfeature "yaml support" dev-python/pyyaml + optfeature "memcache support" dev-python/python-memcached + optfeature "mongodb support" dev-python/pymongo + optfeature "sqlalchemy support" dev-python/sqlalchemy + optfeature "sqs support" dev-python/boto +} diff --git a/dev-python/celery/files/celery.confd-r2 b/dev-python/celery/files/celery.confd-r2 new file mode 100644 index 000000000000..d5ba2f7c9951 --- /dev/null +++ b/dev-python/celery/files/celery.confd-r2 @@ -0,0 +1,51 @@ +# /etc/conf.d/celery + +############################################################################## +# GLOBAL CONFIGURATION + +# User and group +#CELERY_USER="celery" +#CELERY_GROUP="celery" + +# This is generaly a good idea to set the environment correctly +# because a lot of python package try to use HOME on init +#export HOME="/var/lib/myproject" + +# Full path to the python project directory. +#CELERY_PROJDIR="/var/lib/myproject" + +############################################################################## +# CELERYD + +# Start the Celery worker daemon +#CELERYD_ENABLED="yes" + +# celeryd notes +#CELERYD_NODES="celery" + +# celeryd options +# Example: set a 5 minute hard time limit for tasks, disable queue process prefetching and specify an app module from CELERY_PROJDIR +#CELERYD_OPTS="--time-limit=300 -Ofair -A celeryapp" + +# Location and level of the celeryd log file +#CELERYD_LOG_FILE=/var/log/celery/celeryd@%n.log +#CELERYD_LOG_LEVEL="INFO" + +# Location of the celeryd pid file +#CELERYD_PID_FILE=/run/celery/celeryd@%n.pid + +############################################################################## +# CELERYBEAT + +# Start the Celery task scheduler daemon +#CELERYBEAT_ENABLED="yes" + +# celerybeat options +#CELERYBEAT_OPTS="" + +# Location and level of the celerybeat log file +#CELERYBEAT_LOG_FILE=/var/log/celery/celerybeat.log +#CELERYBEAT_LOG_LEVEL="INFO" + +# Location of the celerybeat pid file +#CELERYBEAT_PID_FILE=/run/celery/celerybeat.pid diff --git a/dev-python/celery/files/celery.initd-r2 b/dev-python/celery/files/celery.initd-r2 new file mode 100644 index 000000000000..422904d8d9c2 --- /dev/null +++ b/dev-python/celery/files/celery.initd-r2 @@ -0,0 +1,204 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the BSD license + +extra_started_commands="reload" + +depend() { + use rabbitmq redis logger dns +} + +CELERYD_ENABLED=${CELERYD_ENABLED:-"no"} +CELERYD_PID_FILE=${CELERYD_PID_FILE:-"/run/celery/celeryd@%n.pid"} +CELERYD_LOG_FILE=${CELERYD_LOG_FILE:-"/var/log/celery/celeryd@%n.log"} +CELERYD_LOG_LEVEL=${CELERYD_LOG_LEVEL:-"INFO"} +CELERYD_NODES=${CELERYD_NODES:-"celery"} + +CELERYBEAT_ENABLED=${CELERYBEAT_ENABLED:-"no"} +CELERYBEAT_PID_FILE=${CELERYBEAT_PID_FILE:-"/run/celery/celerybeat.pid"} +CELERYBEAT_LOG_FILE=${CELERYBEAT_LOG_FILE:-"/var/log/celery/celerybeat.log"} +CELERYBEAT_LOG_LEVEL=${CELERYBEAT_LOG_LEVEL:-"INFO"} + +export CELERY_LOADER + +CELERYD_MULTI=${CELERYD_MULTI:-"celery multi"} +CELERYCTL=${CELERYCTL:-"celery"} +CELERYBEAT=${CELERYBEAT:-"celery beat"} + +CELERYD_OPTS="${CELERYD_OPTS}" +CELERYBEAT_OPTS="${CELERYBEAT_OPTS} -f ${CELERYBEAT_LOG_FILE} -l ${CELERYBEAT_LOG_LEVEL}" + +create_dirs() { + local logfile="${1}" + local pidfile="${2}" + local logdir=$(dirname ${logfile}) + local piddir=$(dirname ${pidfile}) + + checkpath -d -q -m 0750 -o ${CELERY_USER:-"root"}:${CELERY_GROUP:-"root"} ${logdir} ${piddir} +} + +[ -n "${CELERY_USER}" ] && DAEMON_OPTS="${DAEMON_OPTS} --uid=${CELERY_USER}" +[ -n "${CELERY_GROUP}" ] && DAEMON_OPTS="${DAEMON_OPTS} --gid=${CELERY_GROUP}" + +checkconfig() { + if [ ! -c /dev/null ]; then + eerror "/dev/null is not a character device!" + return 1 + fi + + if [ -z "${CELERY_PROJDIR}" ]; then + eerror "Missing CELERY_PROJDIR variable" + return 1 + fi + + yesno "${CELERYD_ENABLED}" && \ + create_dirs "${CELERYD_LOG_FILE}" "${CELERYD_PID_FILE}" + + yesno "${CELERYBEAT_ENABLED}" && \ + create_dirs "${CELERYBEAT_LOG_FILE}" "${CELERYBEAT_PID_FILE}" + + return 0 +} + +celery_chdir() { + [ -n "${CELERY_PROJDIR}" ] && cd "${CELERY_PROJDIR}" +} + +wait_pid () { + local pidfile=${1} + local timeout=${STOPTIMEOUT:-"10"} + local PID=$(cat "${pidfile}" 2>/dev/null) + + while [ -n "${PID}" ] && [ "${timeout}" -ge 1 ]; do + kill -0 ${PID} 2>/dev/null || break + kill -TERM "${PID}" + timeout=$((${timeout} - 1)) + sleep 0.5 + done + + [ "${timeout}" -lt 1 ] && return 1 + [ -f ${pidfile} ] && rm -f ${pidfile} + return 0 +} + +# celeryd +start_workers() { + yesno "${CELERYD_ENABLED}" || return 0 + + ${CELERYD_MULTI} start ${CELERYD_NODES} ${DAEMON_OPTS} \ + --pidfile="${CELERYD_PID_FILE}" \ + --logfile="${CELERYD_LOG_FILE}" \ + --loglevel="${CELERYD_LOG_LEVEL}" \ + ${CELERYD_OPTS} +} + +stop_workers() { + yesno "${CELERYD_ENABLED}" || return 0 + + local timeout=${STOPTIMEOUT:-"10"} + + ${CELERYD_MULTI} stop ${CELERYD_NODES} --pidfile="${CELERYD_PID_FILE}" || return 1 + + # Wait for each node + for node in ${CELERYD_NODES}; do + local pidfile=${CELERYD_PID_FILE/\%n/${node}} + local PID=$(cat "${pidfile}" 2>/dev/null) + while [ -n "${PID}" ] && [ "${timeout}" -ge 1 ]; do + kill -0 ${PID} 2>/dev/null || break + timeout=$((${timeout} - 1)) + sleep 0.5 + done + done + + [ "${timeout}" -lt 1 ] && return 1 + return 0 +} + +restart_workers() { + yesno "${CELERYD_ENABLED}" || return 0 + + ${CELERYD_MULTI} restart ${CELERYD_NODES} ${DAEMON_OPTS} \ + --pidfile="${CELERYD_PID_FILE}" \ + --logfile="${CELERYD_LOG_FILE}" \ + --loglevel="${CELERYD_LOG_LEVEL}" \ + ${CELERYD_OPTS} +} + +# celerybeat +start_beat() { + yesno "${CELERYBEAT_ENABLED}" || return 0 + + ebegin "Starting celerybeat" + ${CELERYBEAT} ${CELERYBEAT_OPTS} ${DAEMON_OPTS} --detach \ + --pidfile="${CELERYBEAT_PID_FILE}" + eend ${?} +} + + +stop_beat() { + yesno "${CELERYBEAT_ENABLED}" || return 0 + + ebegin "Stopping celerybeat" + if [ -f "${CELERYBEAT_PID_FILE}" ]; then + wait_pid "${CELERYBEAT_PID_FILE}" + else + ewarn "not running" + fi + eend ${?} +} + + +start() { + local cr=0 + + checkconfig || return 1 + + ebegin "Starting ${SVCNAME}" + eindent + + celery_chdir && \ + start_workers && \ + start_beat || cr=1 + + eoutdent + eend ${cr} +} + +stop() { + local cr=0 + + checkconfig || return 1 + + ebegin "Stopping ${SVCNAME}" + eindent + + celery_chdir + stop_workers || cr=1 + stop_beat || cr=1 + + eoutdent + eend ${cr} +} + +reload() { + local cr=0 + + checkconfig || return 1 + + ebegin "Restarting ${SVCNAME}" + eindent + + celery_chdir + restart_workers || cr=1 + stop_beat && start_beat || cr=1 + + eoutdent + eend ${cr} +} + +status() { + checkconfig || return 1 + + celery_chdir && \ + ${CELERYCTL} status +} diff --git a/dev-python/celery/metadata.xml b/dev-python/celery/metadata.xml new file mode 100644 index 000000000000..44a58c661e3d --- /dev/null +++ b/dev-python/celery/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marcin.deranek@slonko.net</email> + <name>Marcin Deranek</name> + </maintainer> + <upstream> + <remote-id type="cpe">cpe:/a:celeryproject:celery</remote-id> + <bugs-to>https://github.com/celery/celery/issues</bugs-to> + </upstream> + <origin>baldeagleos-repo</origin> +</pkgmetadata> |
