_mksource() {
	pushd "${startdir:-.}" >/dev/null
	if [[ -z $_DO_NOT_RUN_MKSOURCE && $0 =~ ^makepkg ]]; then
		local flags=(-o)
		(( EUID )) || flags+=(--asroot)
		_DO_NOT_RUN_MKSOURCE=true "${0}" "${flags[@]}"
	fi
	popd >/dev/null
}

_get_depends() {
	_mksource 1>&2
	if [[ -f "${srcdir:-${startdir:-.}/src}/parabolaweb/requirements_prod.txt" ]]; then
		pushd "${srcdir:-src}" >/dev/null
		< parabolaweb/requirements_prod.txt sed -r \
			-e 's/.*/\L&/' -e 's/==/>=/' \
			-e 's/^(python2?-)?/python2-/' \
			-e 's/python2-django/django/'
		popd >/dev/null
	fi
}

_get_depends_nover() {
	_get_depends | sed 's/[<>=].*//'
}