mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 08:40:06 +02:00
113 lines
2.9 KiB
Bash
113 lines
2.9 KiB
Bash
SUMMARY="A powerful data analysis library for Python"
|
|
DESCRIPTION="Pandas is a Python package providing fast, flexible \
|
|
and expressive data structures designed to make working with \
|
|
\"relational\" or \"labeled\" data both easy and intuitive. \
|
|
It aims to be the fundamental high-level building block for \
|
|
doing practical, real world data analysis in Python."
|
|
HOMEPAGE="https://pandas.pydata.org/"
|
|
COPYRIGHT="2008-2012 AQR Capital Management, LLC
|
|
Lambda Foundry, Inc.
|
|
PyData Development Team"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="1"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/source/p/pandas/pandas-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="52da74df8a9c9a103af0a72c9d5fdc8e0183a90884278db7f386b5692a2220a4"
|
|
|
|
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
|
SECONDARY_ARCHITECTURES="!x86"
|
|
|
|
PROVIDES="
|
|
pandas$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:gfortran$secondaryArchSuffix
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
PYTHON_PACKAGES=()
|
|
PYTHON_VERSIONS=()
|
|
PYTHON_LIBSUFFIXES=()
|
|
# gcc2 does not support the flags passed by python3
|
|
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
|
|
PYTHON_PACKAGES+=(python3)
|
|
PYTHON_VERSIONS+=(3.7)
|
|
PYTHON_LIBSUFFIXES+=(m)
|
|
BUILD_REQUIRES+="
|
|
setuptools_python3
|
|
cython_python3$secondaryArchSuffix
|
|
numpy${secondaryArchSuffix}_python3
|
|
dateutil_python3
|
|
pytz_python3
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python3
|
|
"
|
|
fi
|
|
if [ "$targetArchitecture" = x86_gcc2 -a -n "$secondaryArchSuffix" ]; then
|
|
PROVIDES_python3="
|
|
pandas_python3 = $portVersion
|
|
"
|
|
fi
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonLibSuffix=${PYTHON_LIBSUFFIXES[$i]}
|
|
|
|
eval "PROVIDES_$pythonPackage+=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
setuptools_$pythonPackage
|
|
cython_$pythonPackage$secondaryArchSuffix
|
|
numpy${secondaryArchSuffix}_$pythonPackage
|
|
dateutil_$pythonPackage
|
|
pytz_$pythonPackage
|
|
\""
|
|
done
|
|
|
|
BUILD()
|
|
{
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
rm -rf "$sourceDir"-$pythonPackage
|
|
cp -a "$sourceDir" "$sourceDir"-$pythonPackage
|
|
cd "$sourceDir"-$pythonPackage
|
|
|
|
python=python$pythonVersion
|
|
$python setup.py build_ext --inplace
|
|
$python setup.py build
|
|
done
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
cd "$sourceDir"-$pythonPackage
|
|
|
|
python=python$pythonVersion
|
|
installLocation=$prefix/lib/$python/vendor-packages/
|
|
export PYTHONPATH=$installLocation
|
|
mkdir -p "$installLocation"
|
|
$python setup.py install \
|
|
--root=/ --prefix="$prefix"
|
|
|
|
packageEntries $pythonPackage \
|
|
"$prefix"/lib/$python
|
|
done
|
|
}
|