diff options
Diffstat (limited to 'dev-python/sympy')
-rw-r--r-- | dev-python/sympy/Manifest | 2 | ||||
-rw-r--r-- | dev-python/sympy/files/sympy-1.12-c99.patch | 48 | ||||
-rw-r--r-- | dev-python/sympy/sympy-1.12-r1.ebuild | 116 |
3 files changed, 166 insertions, 0 deletions
diff --git a/dev-python/sympy/Manifest b/dev-python/sympy/Manifest index d6f41792667c..1b44e6b3d8f9 100644 --- a/dev-python/sympy/Manifest +++ b/dev-python/sympy/Manifest @@ -1,4 +1,6 @@ +AUX sympy-1.12-c99.patch 1666 BLAKE2B 3b60410c635cd55935108776e827cca2cafc2b16b2a1bb8a43a1a811829b7a3d1e9f72ed5c7bb312c0200d1d27b2a14a41633983a31a89af35c0b7491e9a01b1 SHA512 d4377b544183cf44e3942fcbcc8e0b474a75eb8892df94c6ed5c8f3fd3aae52972ce07ab5ec501476860bef806bf8358a95fd28ccddf942f33d5520a3c9bc2fe AUX sympy-1.12-py312.patch 1543 BLAKE2B 786e7f2934adf9d30c21f5fa807910507bddebbffc2c2d91a80e48b9767d340490f459df08a61c2b9f7d5d48342a24ac2c40673ed63a531d0c83ddea1773985c SHA512 e6359b32f9949b8412e9af1183e7cf2c7e888a83a15876f0fb370a3e671b993ef0b524e103aa6eff29e11a33b0ce44fc8e3d2e53c61042924130738678188bab DIST sympy-1.12.gh.tar.gz 7212937 BLAKE2B 1d37a019e7a6700e69e16d6ca7fdc563711165fc226ac6ec745d20fa6dc689ee9ea01a92549d851aacff763230872c2d1d0cb5bde581c4f960f5de515ffb5f06 SHA512 96a89b88f6912d70c56f5bd1903dd3c518963118ff25d033cdcb7da2f260b8ee209d3ab4a4394dd2b5dc0b4585b71ccd55d55c8e5c6e28024cccbedf07ee4360 +EBUILD sympy-1.12-r1.ebuild 3230 BLAKE2B 7ac1dece54ff23a56deec0f2f7e621fe47c329dccb34b991dd440fedc292b53cb221c7a8868088b25e61b0f6a17b3e4615bff0af8ea3f618424ad239d07e4415 SHA512 071b3070669f85c0b09eaadc92643f723780150643ab9ab723d2589ec32e5eaef897627e942f67ff70c343b227ccd3c9767e10a2e0b1393ac00a0a910a33f26f EBUILD sympy-1.12.ebuild 3191 BLAKE2B 128a3e1077d22fb5b10f1ef98ac7110f4a795aa619e77e81a92baec02cc9de10d9af808b5d264634ca5870ff5e5134e37fdfd515166f9bbf2bd0944308bfefc4 SHA512 6b4f8413246d003ce4053b17f3b2e02296ee940678e7b6bda016b57d9c73ccd11ad39f5cac150fc958a8556db0f5de99aefdfab4a483bf7456f56055a224c485 MISC metadata.xml 1722 BLAKE2B 09837a8e4ed0d70cf62a2e5028d480ffd7d15d821220c771dec04380e9707da56625651a49ac656a7de27ee3e8f395091abe763d2d3c59cfe32bf363cdba60cf SHA512 fad83c852dd953709e20056b0da38a0f0504bc70a99d9a9fbf295d98ed462811ee6fcf755d5ad1aeb515fd62fafe35a609f6d2892af2ed921870b6f5c38edc5f diff --git a/dev-python/sympy/files/sympy-1.12-c99.patch b/dev-python/sympy/files/sympy-1.12-c99.patch new file mode 100644 index 000000000000..311311cfcea3 --- /dev/null +++ b/dev-python/sympy/files/sympy-1.12-c99.patch @@ -0,0 +1,48 @@ +https://github.com/sympy/sympy/pull/25968 + +From 2251ba15d33656fce53668d789c390923eeae919 Mon Sep 17 00:00:00 2001 +From: Jerry James <loganjerry@gmail.com> +Date: Fri, 8 Dec 2023 15:12:26 -0700 +Subject: [PATCH] Avoid incompatible pointer type error with GCC 14 + +--- a/sympy/utilities/autowrap.py ++++ b/sympy/utilities/autowrap.py +@@ -714,7 +714,11 @@ def binary_function(symfunc, expr, **kwargs): + _ufunc_outcalls = Template("*((double *)out${outnum}) = ${funcname}(${call_args});") + + _ufunc_body = Template("""\ ++#ifdef NPY_1_19_API_VERSION ++static void ${funcname}_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data) ++#else + static void ${funcname}_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data) ++#endif + { + npy_intp i; + npy_intp n = dimensions[0]; +--- a/sympy/utilities/tests/test_autowrap.py ++++ b/sympy/utilities/tests/test_autowrap.py +@@ -284,7 +284,11 @@ def test_ufuncify_source(): + {NULL, NULL, 0, NULL} + }; + ++#ifdef NPY_1_19_API_VERSION ++static void test_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data) ++#else + static void test_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data) ++#endif + { + npy_intp i; + npy_intp n = dimensions[0]; +@@ -378,7 +382,11 @@ def test_ufuncify_source_multioutput(): + {NULL, NULL, 0, NULL} + }; + ++#ifdef NPY_1_19_API_VERSION ++static void multitest_ufunc(char **args, const npy_intp *dimensions, const npy_intp* steps, void* data) ++#else + static void multitest_ufunc(char **args, npy_intp *dimensions, npy_intp* steps, void* data) ++#endif + { + npy_intp i; + npy_intp n = dimensions[0]; + diff --git a/dev-python/sympy/sympy-1.12-r1.ebuild b/dev-python/sympy/sympy-1.12-r1.ebuild new file mode 100644 index 000000000000..42a6e4905c75 --- /dev/null +++ b/dev-python/sympy/sympy-1.12-r1.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( pypy3 python3_{10..12} ) + +inherit distutils-r1 virtualx + +DESCRIPTION="Computer Algebra System in pure Python" +HOMEPAGE=" + https://www.sympy.org/ + https://github.com/sympy/sympy/ + https://pypi.org/project/sympy/ +" +SRC_URI=" + https://github.com/sympy/sympy/archive/${P}.tar.gz -> ${P}.gh.tar.gz +" +S="${WORKDIR}/${PN}-${P}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="aesara examples imaging ipython latex mathml opengl pdf png pyglet symengine texmacs" + +RDEPEND=" + dev-python/mpmath[${PYTHON_USEDEP}] + dev-python/pexpect[${PYTHON_USEDEP}] + aesara? ( + $(python_gen_cond_dep ' + dev-python/aesara[${PYTHON_USEDEP}] + ' python3_{10..11}) + ) + imaging? ( dev-python/pillow[${PYTHON_USEDEP}] ) + ipython? ( dev-python/ipython[${PYTHON_USEDEP}] ) + latex? ( + virtual/latex-base + dev-texlive/texlive-fontsextra + png? ( app-text/dvipng ) + pdf? ( app-text/ghostscript-gpl ) + ) + mathml? ( dev-python/lxml[${PYTHON_USEDEP}] ) + opengl? ( dev-python/pyopengl[${PYTHON_USEDEP}] ) + pyglet? ( dev-python/pyglet[${PYTHON_USEDEP}] ) + symengine? ( dev-python/symengine[${PYTHON_USEDEP}] ) + texmacs? ( app-office/texmacs ) +" + +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}/${P}-py312.patch" + "${FILESDIR}/${PN}-1.12-c99.patch" +) + +src_test() { + virtx distutils-r1_src_test +} + +python_test() { + local EPYTEST_DESELECT=( + # require old version of antlr4 + sympy/parsing/tests/test_autolev.py + sympy/parsing/tests/test_latex.py + # crash due to assertions in sys-devel/llvm[debug] + sympy/parsing/tests/test_c_parser.py + + # TODO: pytest? + sympy/solvers/ode/tests/test_systems.py::test_linear_3eq_order1_type4_long_check + sympy/solvers/ode/tests/test_systems.py::test_linear_3eq_order1_type4_long_dsolve_dotprodsimp + + # either very slow or hanging + sympy/solvers/ode/tests/test_systems.py::test_linear_new_order1_type2_de_lorentz_slow_check + sympy/integrals/tests/test_failing_integrals.py::test_issue_15227 + sympy/matrices/tests/test_matrices.py::test_pinv_rank_deficient_when_diagonalization_fails + sympy/solvers/ode/tests/test_systems.py::test_nonlinear_3eq_order1_type1 + sympy/solvers/ode/tests/test_systems.py::test_nonlinear_3eq_order1_type3 + ) + + case ${EPYTHON} in + pypy3) + if has_version "<dev-python/pypy3_10-exe-7.3.13_p2" || + has_version "<dev-python/pypy3_10-exe-bin-7.3.13_p2" + then + EPYTEST_DESELECT+=( + # https://foss.heptapod.net/pypy/pypy/-/issues/4032 + sympy/tensor/array/tests/test_array_comprehension.py::test_arraycomprehensionmap + ) + fi + ;; + esac + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + nonfatal epytest --veryquickcheck || + die -n "Tests failed with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( AUTHORS README.md ) + + if use examples; then + dodoc -r examples + docompress -x /usr/share/doc/${PF}/examples + fi + + distutils-r1_python_install_all + + if use texmacs; then + exeinto /usr/libexec/TeXmacs/bin/ + doexe data/TeXmacs/bin/tm_sympy + insinto /usr/share/TeXmacs/plugins/sympy/ + doins -r data/TeXmacs/progs + fi +} |