aboutsummaryrefslogtreecommitdiff
path: root/python/python3-statsmodels
diff options
context:
space:
mode:
authorfourtysixandtwo <fourtysixandtwo@sliderr.net>2023-10-06 03:19:14 -0600
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2023-10-07 15:58:37 +0700
commit204e494bd38672ea51dd3365b8b8ba9f44411106 (patch)
treeb942c1c42a640c78d5eea1d048aca79e0ad4aed6 /python/python3-statsmodels
parentc08367b9483d79972e2ec2d9fd472aa75124caae (diff)
downloadslackbuilds-204e494bd38672ea51dd3365b8b8ba9f44411106.tar.xz
python/python3-statsmodels: Fix unmaintained broken build.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python/python3-statsmodels')
-rw-r--r--python/python3-statsmodels/python3-statsmodels.SlackBuild35
-rw-r--r--python/python3-statsmodels/python3-statsmodels.info2
2 files changed, 18 insertions, 19 deletions
diff --git a/python/python3-statsmodels/python3-statsmodels.SlackBuild b/python/python3-statsmodels/python3-statsmodels.SlackBuild
index 8b7a74dfde18..d40630003dd2 100644
--- a/python/python3-statsmodels/python3-statsmodels.SlackBuild
+++ b/python/python3-statsmodels/python3-statsmodels.SlackBuild
@@ -22,11 +22,15 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20231005 46and2: broken build, __version__ error on import, add
+# python3-setuptools-scm-opt as dep and set PYTHONPATH below to fix.
+# Change to pep517 build.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-statsmodels
VERSION=${VERSION:-0.14.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -49,20 +53,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -74,11 +64,20 @@ cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+# remove requirement
+sed -i '/oldest-supported-numpy/d' pyproject.toml
+
+# convert to minimum req'd instead of pinned
+sed -i 's/\(setuptools_scm.*\)~=/\1>=/' pyproject.toml
+
+export PYTHONPATH=/opt/python3.9/site-packages/
-python3 setup.py install --root=$PKG
+python3 -m build --no-isolation
+python3 -m installer -d "$PKG" dist/*.whl
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
diff --git a/python/python3-statsmodels/python3-statsmodels.info b/python/python3-statsmodels/python3-statsmodels.info
index 98ece7c16e3d..289f345c6e0d 100644
--- a/python/python3-statsmodels/python3-statsmodels.info
+++ b/python/python3-statsmodels/python3-statsmodels.info
@@ -5,6 +5,6 @@ DOWNLOAD="https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.14
MD5SUM="d3f242780e36f88d8d7a6aea86c6ba4a"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="python3-pandas python3-patsy python3-scipy"
+REQUIRES="python3-pandas python3-patsy python3-scipy python3-setuptools-scm-opt"
MAINTAINER="Isaac Yu"
EMAIL="isaacyu@protonmail.com"