diff options
| author | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2021-01-17 23:35:33 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [master] <gitlab@liguros.net> | 2021-01-17 23:35:33 +0000 |
| commit | 8e8120eabdd28020aa69c7a60505cce2edd20adc (patch) | |
| tree | 061bf0acdc672720e0bc3a2d575f67d25aedb2d8 /dev-python/cython-python2 | |
| parent | c16790af2c9b4cbc38e565d4311252193ff85484 (diff) | |
| download | baldeagleos-repo-21.1.2.tar.gz baldeagleos-repo-21.1.2.tar.xz baldeagleos-repo-21.1.2.zip | |
Updating liguros repo21.1.2
Diffstat (limited to 'dev-python/cython-python2')
6 files changed, 151 insertions, 0 deletions
diff --git a/dev-python/cython-python2/Manifest b/dev-python/cython-python2/Manifest new file mode 100644 index 000000000000..a5e08409004e --- /dev/null +++ b/dev-python/cython-python2/Manifest @@ -0,0 +1 @@ +DIST cython-0.29.21.gh.tar.gz 2088511 BLAKE2B 7a4ddabb65a519d3c71454ac8417438a3a9c46b47489c18e7c7e82ffcb5d5f2f0c5246d0b364f8317d374c53f0c83844c73c7d2ef6b9f75f10707aaf2931ce41 SHA512 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679 diff --git a/dev-python/cython-python2/cython-python2-0.29.21-r2.ebuild b/dev-python/cython-python2/cython-python2-0.29.21-r2.ebuild new file mode 100644 index 000000000000..a80cedc13829 --- /dev/null +++ b/dev-python/cython-python2/cython-python2-0.29.21-r2.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python2_7 python3_{6,7,8,9,10} ) +PYTHON_REQ_USE="threads(+)" + +DISTUTILS_USE_SETUPTOOLS=manual +inherit distutils-r1 toolchain-funcs elisp-common + +MY_PN=cython +MY_P=$MY_PN-$PV + +DESCRIPTION="A Python to C compiler" +HOMEPAGE="https://cython.org https://pypi.org/project/Cython/ + https://github.com/cython/cython" +SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${MY_P}.gh.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" +IUSE="emacs" +RESTRICT="test" + +RDEPEND=" + !dev-python/cython[python_targets_python2_7] + emacs? ( >=app-editors/emacs-23.1:* ) +" +BDEPEND=" + dev-python/setuptools-python2[${PYTHON_USEDEP}] + ${RDEPEND}" + +PATCHES=( + "${FILESDIR}/cython-0.29.14-sphinx-update.patch" +) + +S="${WORKDIR}/${MY_PN}-${PV}" + +SITEFILE=50cython-gentoo.el + +python_compile() { + # Python gets confused when it is in sys.path before build. + local -x PYTHONPATH= + + distutils-r1_python_compile +} + +python_compile_all() { + use emacs && elisp-compile Tools/cython-mode.el +} + +python_test() { + tc-export CC + # https://github.com/cython/cython/issues/1911 + local -x CFLAGS="${CFLAGS} -fno-strict-overflow" + "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \ + || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt ) + distutils-r1_python_install_all + + if use emacs; then + elisp-install ${PN} Tools/cython-mode.* + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi + rm -r ${D}/usr/share + rm -r ${D}/usr/bin +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-python/cython-python2/files/50cython-gentoo.el b/dev-python/cython-python2/files/50cython-gentoo.el new file mode 100644 index 000000000000..e6dcc6a6d7fb --- /dev/null +++ b/dev-python/cython-python2/files/50cython-gentoo.el @@ -0,0 +1,11 @@ +;;; site-lisp configuration for cython-mode + +(add-to-list 'load-path "@SITELISP@") + +(autoload 'cython-mode "cython-mode" "Major mode for editing Cython files" t) +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode)) +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode)) +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.pxi\\'" . cython-mode)) diff --git a/dev-python/cython-python2/files/cython-0.29.14-sphinx-update.patch b/dev-python/cython-python2/files/cython-0.29.14-sphinx-update.patch new file mode 100644 index 000000000000..3f426754f6f1 --- /dev/null +++ b/dev-python/cython-python2/files/cython-0.29.14-sphinx-update.patch @@ -0,0 +1,13 @@ +diff --git a/docs/conf.py b/docs/conf.py +index 10662e28c..a84e0b928 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -41,7 +41,7 @@ highlight_language = 'cython' + extensions = [ + 'ipython_console_highlighting', + 'cython_highlighting', +- 'sphinx.ext.pngmath', ++ 'sphinx.ext.imgmath', + 'sphinx.ext.todo', + 'sphinx.ext.intersphinx', + 'sphinx.ext.autodoc' diff --git a/dev-python/cython-python2/files/cython-0.29.21-spawn-multiprocessing.patch b/dev-python/cython-python2/files/cython-0.29.21-spawn-multiprocessing.patch new file mode 100644 index 000000000000..0aa7212b9a34 --- /dev/null +++ b/dev-python/cython-python2/files/cython-0.29.21-spawn-multiprocessing.patch @@ -0,0 +1,29 @@ +Needed to prevent a loop while calling cythonize on macOS - or any platform +defaulting to the 'spawn' method, as Python 3.8 does on Darwin. + +https://github.com/cython/cython/pull/3263 +From 15ae78bb74a856836dd64828326f4f0812d36520 Mon Sep 17 00:00:00 2001 +From: Marcel Bargull <marcel.bargull@udo.edu> +Date: Fri, 6 Dec 2019 18:21:19 +0100 +Subject: [PATCH] Disable parallel cythonization for "spawn" start method. + +--- + Cython/Build/Dependencies.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py +index 593e00a6ef..f9b9c15bc5 100644 +--- a/Cython/Build/Dependencies.py ++++ b/Cython/Build/Dependencies.py +@@ -1073,6 +1073,11 @@ def copy_to_build_dir(filepath, root=os.getcwd()): + + if N <= 1: + nthreads = 0 ++ if nthreads: ++ import multiprocessing ++ if multiprocessing.get_start_method() == 'spawn': ++ print('Disabling parallel cythonization for "spawn" process start method.') ++ nthreads = 0 + if nthreads: + import multiprocessing + pool = multiprocessing.Pool( diff --git a/dev-python/cython-python2/metadata.xml b/dev-python/cython-python2/metadata.xml new file mode 100644 index 000000000000..a729c7c60421 --- /dev/null +++ b/dev-python/cython-python2/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>python@gentoo.org</email> + <name>Python</name> + </maintainer> + <longdescription lang="en"> + Cython is a language that makes writing C extensions for the Python + language as easy as Python itself. It's based on Pyrex, but supports + more cutting edge functionality and optimizations. + </longdescription> + <upstream> + <remote-id type="pypi">Cython</remote-id> + <remote-id type="github">cython/cython</remote-id> + </upstream> + <origin>calculatelinux-overlay</origin> +</pkgmetadata> |
