forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Michał Górny <[email protected]>
- Loading branch information
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
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 | ||
DIST cython-0.29.18.gh.tar.gz 2083532 BLAKE2B 7e10a32f15542ed0d7d381223f6f20ec75d7ec39979ca58192cc0f95407cece31fb053776072b49e447ffb0ab5ad1918c6b53ad8cb277df08fabe0eab8ccf958 SHA512 5a1430345fbe42235a58fd44dd4e4ce17c68485349295af6c4e9a01a06117e18ee7700c34fb5974759f012acd5cf8400ed014ef16397539272c38881e905234a | ||
DIST cython-0.29.19.gh.tar.gz 2083634 BLAKE2B 47ed2c8b8c4d56889f4414b974edac878a454c2cefff77bb3ac5cb51f926c19e3466949e0c9f470d896589e881afa32d8873c71d54b3999d221ae94f2b2d4588 SHA512 402f95f82099db0ae99ca2f849a9aef97558c9c6be62d3b3c66c346ecc94efbbe824ffc77f3cc6dd1d7054a2fb0332b10fe855ca1b054095f2df2ee297fd96a7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |