diff options
author | Guillaume Horel | 2021-01-12 23:05:44 -0500 |
---|---|---|
committer | Guillaume Horel | 2021-01-12 23:05:44 -0500 |
commit | ec601d5a80270167981d417e58a1d6c54f3462a3 (patch) | |
tree | 5468f02c76a617aa71498aa86ea280a75b346ece | |
parent | 4f3c4c2033e8cfe3438bda18f01586ba983af918 (diff) | |
download | aur-ec601d5a80270167981d417e58a1d6c54f3462a3.tar.gz |
bump to 3.0.2
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | cython.patch | 37 |
3 files changed, 64 insertions, 22 deletions
@@ -1,18 +1,17 @@ pkgbase = python-lineprofiler pkgdesc = Line-by-line profiler - pkgver = 2.1.2 - pkgrel = 3 + pkgver = 3.0.2 + pkgrel = 1 url = https://pypi.python.org/pypi/line_profiler - arch = i686 arch = x86_64 license = BSD makedepends = cython depends = python-setuptools depends = ipython - source = https://files.pythonhosted.org/packages/14/fc/ecf4e238bb601ff829068e5a72cd1bd67b0ee0ae379db172eb6a0779c6b6/line_profiler-2.1.2.tar.gz - source = line_profiler.patch - md5sums = 141cb6996f0e3188ca05bfddcb403e36 - md5sums = fd05a4246f3bb741bbf9b51ca3e14d34 + source = line_profiler-3.0.2.tar.gz::https://github.com/pyutils/line_profiler/archive/3.0.2.tar.gz + source = cython.patch + sha256sums = 8eb9683b339083220adec19f391006435efb47ef63fc1200b965a88b48068f26 + sha256sums = e275bc6da60b49fa778d53a91acb8b9a866f80cf7dc2ff47b42c78e661b256c7 pkgname = python-lineprofiler @@ -1,35 +1,41 @@ -# Maintainer: Rich Li <rich at dranek com> +# Maintainer: Guillaume HOrel <guillaume.horel@gmail.com> +# Contributor: Rich Li <rich at dranek com> # Contributor: lestb <tkhdlstfl dot l plus aur at gmail dot com> # Contributor: Sebastien Binet <binet@lblbox> pkgname=python-lineprofiler -pkgver=2.1.2 -pkgrel=3 +_pkgname=line_profiler +pkgver=3.0.2 +pkgrel=1 pkgdesc="Line-by-line profiler" url="https://pypi.python.org/pypi/line_profiler" -arch=('i686' 'x86_64') +arch=('x86_64') license=('BSD') depends=('python-setuptools' 'ipython') makedepends=('cython') -source=(https://files.pythonhosted.org/packages/14/fc/ecf4e238bb601ff829068e5a72cd1bd67b0ee0ae379db172eb6a0779c6b6/line_profiler-${pkgver}.tar.gz line_profiler.patch) -md5sums=('141cb6996f0e3188ca05bfddcb403e36' 'fd05a4246f3bb741bbf9b51ca3e14d34') +source=("$_pkgname-$pkgver.tar.gz::https://github.com/pyutils/line_profiler/archive/$pkgver.tar.gz" + "cython.patch") -build() { - cd "${srcdir}" - patch -s -p0 < line_profiler.patch +sha256sums=('8eb9683b339083220adec19f391006435efb47ef63fc1200b965a88b48068f26' + 'e275bc6da60b49fa778d53a91acb8b9a866f80cf7dc2ff47b42c78e661b256c7') + +prepare() { + cd "$_pkgname-$pkgver" + patch -p1 -i ../cython.patch +} - cd "${srcdir}/line_profiler-${pkgver}" - cython _line_profiler.pyx +build() { + cd "$_pkgname-$pkgver" python setup.py build } check() { - cd "${srcdir}/line_profiler-${pkgver}" - py_ver=$(python -c 'import sys; print("{0.major}.{0.minor}".format(sys.version_info))') - PYTHONPATH="./build/lib.linux-${CARCH}-${py_ver}" python -m unittest discover -v tests + cd "$_pkgname-${pkgver}" + python setup.py build_ext --inplace + python -m unittest discover -v tests } package() { - cd "${srcdir}/line_profiler-${pkgver}" + cd "line_profiler-${pkgver}" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 install -d "${pkgdir}/usr/share/licenses/${pkgname}" diff --git a/cython.patch b/cython.patch new file mode 100644 index 000000000000..d94683e36a89 --- /dev/null +++ b/cython.patch @@ -0,0 +1,37 @@ +--- a/setup.py 2020-01-12 15:51:13.000000000 -0500 ++++ b/setup.py 2021-01-12 22:54:31.181954242 -0500 +@@ -150,7 +150,7 @@ + return mb_tag + + +-USE_SKBUILD = True ++USE_SKBUILD = False + if USE_SKBUILD: + + if '--universal' in sys.argv: +@@ -181,6 +181,7 @@ + try: + from Cython.Distutils import build_ext ++ from Cython.Build import cythonize + cmdclass = dict(build_ext=build_ext) + line_profiler_source = '_line_profiler.pyx' + except ImportError: + cmdclass = {} +@@ -196,12 +197,13 @@ + setupkw = dict( + cmdclass=cmdclass, + ext_modules=[ +- Extension('_line_profiler', +- sources=[line_profiler_source, 'timers.c', 'unset_trace.c'], +- depends=['python25.pxd']), ++ Extension('line_profiler._line_profiler', ++ sources=["line_profiler/_line_profiler.pyx", 'line_profiler/timers.c', 'line_profiler/unset_trace.c'], ++ depends=['python25.pxd'], ++ extra_compile_args=["-DHAVE_GETTIMEOFDAY"]), + ], + ) +- ++setupkw["ext_modules"] = cythonize(setupkw["ext_modules"]) + long_description = """\ + line_profiler will profile the time individual lines of code take to execute. + The profiler is implemented in C via Cython in order to reduce the overhead of |