Skip to content

Commit

Permalink
dev-python/cython: Bump to 0.29.17
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Apr 28, 2020
1 parent 027e39e commit e85c0e3
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-python/cython/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST cython-0.29.14.gh.tar.gz 2075030 BLAKE2B 12bbc2979c34fee9b498f5425d2cea5cedebda474e3f4ee6c9eb3185a4e33fc84df6c16454830316548e36cd9fb7c47f0925b0d6e16b325cbd81f8747c7e492a SHA512 fa1575fc5ec7ee19de34f91a15bdd45d889f54217dbe2a9654604ada90d8d86fe7bceb86449c41b68d6b65459769916a0d7d5f5da21c5597aedc876cde4e37df
DIST cython-0.29.15.gh.tar.gz 2075879 BLAKE2B e6322656c819c6b09e235c32d2b520e8fe917c864047d028dd67041e70251025f14accbd76499b7b9290d0424989adf89321f251526e66a892bdc243ba80ba7f SHA512 bd0872359d31a41750353bb0d7f03c2a40aa2bf6e492148e693321cef15b02ae4f8d5f5a00efde7216f09a6ac06f2bb3ded9d00e27ad0cfc53605f3a9ef55af8
DIST cython-0.29.17.gh.tar.gz 2080768 BLAKE2B f53f8593f4ab9ef87c8fff47a031d365a748b617b7ee41872768a6a649ca3c6a6f9a338f115881117cbb4ffe1811047ac5fdcac745d6387eee29487c9da4c297 SHA512 f722e4feb0fcd0de7b882d0ba7cd78c37b6aaa4438619607665ea269b207a482fab6ca65cf12bab54d94b5929776c973a270c0748ed35b0f88a72811bf90d4df
80 changes: 80 additions & 0 deletions dev-python/cython/cython-0.29.17.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

PYTHON_COMPAT=( python2_7 python3_{6,7,8} pypy3 )
PYTHON_REQ_USE="threads(+)"

inherit distutils-r1 toolchain-funcs elisp-common

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 -> ${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 ~x86-macos ~x64-solaris ~x86-solaris"
IUSE="emacs test"
RESTRICT="!test? ( test )"

RDEPEND="
emacs? ( >=app-editors/emacs-23.1:* )
"
BDEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
$(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \
'python3*')
)"

PATCHES=(
"${FILESDIR}/cython-0.29.14-sphinx-update.patch"
)

SITEFILE=50cython-gentoo.el

distutils_enable_sphinx docs

python_compile() {
if ! python_is_python3; then
local CFLAGS="${CFLAGS} -fno-strict-aliasing"
local CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
fi

# 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
}

pkg_postinst() {
use emacs && elisp-site-regen
}

pkg_postrm() {
use emacs && elisp-site-regen
}

0 comments on commit e85c0e3

Please sign in to comment.