# Template file for 'python3-ipython'
pkgname=python3-ipython
version=9.16.0
revision=1
build_style=python3-pep517
# pexpect module does not find IPython when launching new interpreter
make_check_args="
 --deselect tests/test_debugger.py::test_ignore_module_basic_functionality
 --deselect tests/test_debugger.py::test_ignore_module_all_commands
 --deselect tests/test_cve.py::test_cve_2022_21699
"
hostmakedepends="python3-setuptools python3-wheel"
depends="python3-jedi python3-decorator python3-pickleshare
 python3-traitlets python3-prompt_toolkit python3-Pygments python3-backcall
 python3-matplotlib-inline python3-pexpect python3-stack_data
 python3-ipython-pygments-lexers python3-psutil"
checkdepends="$depends python3-pytest-asyncio python3-testpath python3-curio
 python3-jupyter_nbformat python3-matplotlib python3-numpy python3-pandas
 python3-trio"
short_desc="Enhanced interactive Python3 shell"
maintainer="Andrew J. Hesford <ajh@sideband.org>"
license="BSD-3-Clause"
homepage="https://ipython.org/"
changelog="https://github.com/ipython/ipython/raw/main/docs/source/whatsnew/version9.rst"
distfiles="${PYPI_SITE}/i/ipython/ipython-${version}.tar.gz"
checksum=d2f92587b1ef51d84f934dffe05fabb9255f0038ed0a21426f2ea761e39ad09a
conflicts="python-ipython<=5.8.0_2"
make_check_pre="env PYTHONPATH=."

if [ "${XBPS_TARGET_MACHINE%-musl}" = i686 ]; then
	# these tests fail in i686
	make_check_args+="
	 --deselect IPython/extensions/tests/test_deduperreload.py::DecoratorPatchingSuite::test_function_decorator_from_other_module
	 --deselect IPython/extensions/tests/test_deduperreload.py::DecoratorPatchingSuite::test_function_decorators
	 --deselect IPython/extensions/tests/test_deduperreload.py::DecoratorPatchingSuite::test_method_decorator
	"
fi

post_install() {
	# remove iptest
	rm -f ${DESTDIR}/usr/bin/iptest*

	vlicense COPYING.rst LICENSE
}
