diff options
author | Fellype do Nascimento <fellype (at) gmail (dot) com> | 2022-04-16 02:19:24 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-04-16 12:12:44 +0700 |
commit | 750b2ddb4dde3f4a345f1d4e315a09f952d36d8f (patch) | |
tree | e3ad97f1c1bdd094fd7e367d8f7813d670c8bcd1 /python | |
parent | 46c7014c045457e4cd7349a595ea55c8e5a1cccb (diff) | |
download | slackbuilds-750b2ddb4dde3f4a345f1d4e315a09f952d36d8f.tar.gz |
python/pygsl: Updated for version 2.3.2.
Change from py2 to py3
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/pygsl/pygsl.SlackBuild | 18 | ||||
-rw-r--r-- | python/pygsl/pygsl.info | 12 | ||||
-rw-r--r-- | python/pygsl/remove_swig_dep_for_gls_wrappers.patch | 50 |
3 files changed, 67 insertions, 13 deletions
diff --git a/python/pygsl/pygsl.SlackBuild b/python/pygsl/pygsl.SlackBuild index 12249a1e55..96c7c6366e 100644 --- a/python/pygsl/pygsl.SlackBuild +++ b/python/pygsl/pygsl.SlackBuild @@ -1,9 +1,9 @@ #!/bin/bash # Slackware build script for PyGSL -# Based on the Slackware 14.2 SlackBuild +# Based on the Slackware 15.0 SlackBuild # -# Copyright 2017-2018, Fellype do Nascimento, Campinas - Brazil +# Copyright 2017-2022, Fellype do Nascimento, Guaratinguetá - Brazil # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pygsl -VERSION=${VERSION:-2.3.0} +VERSION=${VERSION:-2.3.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -80,16 +80,20 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -python setup.py config -python setup.py build -python setup.py install --root=$PKG --prefix=/usr +# Patch setup.py in order to remove (unneeded) dependency on swig to re-generate GSL wrappers +# thanks to FreeBSD ports https://cgit.freebsd.org/ports/tree/math/py-pygsl/files/patch-setup.py +patch -p1 < $CWD/remove_swig_dep_for_gls_wrappers.patch setup.py + +python3 setup.py config +python3 setup.py build +python3 setup.py install --root=$PKG --prefix=/usr find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - ChangeLog COPYING CREDITS README TODO \ + ChangeLog COPYING CREDITS.rst README.rst TODO.rst \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/python/pygsl/pygsl.info b/python/pygsl/pygsl.info index 7c874fc295..768aba27a1 100644 --- a/python/pygsl/pygsl.info +++ b/python/pygsl/pygsl.info @@ -1,10 +1,10 @@ PRGNAM="pygsl" -VERSION="2.3.0" -HOMEPAGE="https://sourceforge.net/projects/pygsl/" -DOWNLOAD="https://download.sourceforge.net/pygsl/pygsl-2.3.0.tar.gz" -MD5SUM="a0348842a2b9bc999cc99752f0487ee9" +VERSION="2.3.2" +HOMEPAGE="https://github.com/pygsl/pygsl/" +DOWNLOAD="https://files.pythonhosted.org/packages/0f/82/8bc81042923e474de30a080a551f11a4a352c098a569e6e126f313322735/pygsl-2.3.2.tar.gz" +MD5SUM="d5b0af1a53cba081977ead7d0cdc221e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="numpy" +REQUIRES="numpy3" MAINTAINER="Fellype do Nascimento" -EMAIL="fellype (at) gmail.com" +EMAIL="fellype (at) gmail (dot) com" diff --git a/python/pygsl/remove_swig_dep_for_gls_wrappers.patch b/python/pygsl/remove_swig_dep_for_gls_wrappers.patch new file mode 100644 index 0000000000..1962d829dd --- /dev/null +++ b/python/pygsl/remove_swig_dep_for_gls_wrappers.patch @@ -0,0 +1,50 @@ +--- pygsl-2.3.2/setup.py 2021-12-07 13:05:38.000000000 -0300 ++++ pygsl-2.3.2/setup.py.new 2022-04-14 22:17:19.153861777 -0300 +@@ -89,8 +89,6 @@ + gsldist_path = os.path.join(pygsldir, "gsl_dist") + sys.path.insert(0, gsldist_path) + +-from wheel.bdist_wheel import bdist_wheel as _bdist_wheel +- + import setuptools + import setuptools.command + import setuptools.command.install +@@ -173,26 +171,6 @@ + del t_file + + +-class CustomInstallCommand(setuptools.command.install.install): +- def run(self): +- # first re-generate GSL wrappers using SWIG +- self.run_command('gsl_wrappers') +- # then configure +- self.run_command('config') +- # then install +- setuptools.command.install.install.run(self) +- #super().run() +- +-class CustomBdistWheelCommand(_bdist_wheel): +- def run(self): +- # first re-generate GSL wrappers using SWIG +- self.run_command('gsl_wrappers') +- # then configure +- self.run_command('config') +- # then install +- _bdist_wheel.run(self) +- #super().run() +- + py_module_names = ['errors', + 'statistics.__init__', + '_numobj', +@@ -270,10 +248,9 @@ + ext_package = 'pygsl', + ext_modules = exts, + headers = headers, +- cmdclass = {'bdist_wheel': CustomBdistWheelCommand, ++ cmdclass = { + 'config' : gsl_Config_Path, + 'gsl_wrappers': gsl_CodeGenerator.gsl_CodeGenerator, +- 'install': CustomInstallCommand, + #'build_sphinx': BuildDoc + }, + install_requires = ['numpy'], |