pandas: new recipe (#3458)

disabled for now
This commit is contained in:
Bach Nguyen
2019-10-24 10:31:16 -05:00
committed by Jérôme Duval
parent 41960ccf48
commit 11692ddf43

View File

@@ -0,0 +1,127 @@
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="5b24ca47acf69222e82530e89111dd9d14f9b970ab2cd3a1c2c78f0c4fbba4f4"
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=()
# We don't have python2 for secondaryArch
if [ -z "$secondaryArchSuffix" ]; then
PYTHON_PACKAGES+=(python)
PYTHON_VERSIONS+=(2.7)
PYTHON_LIBSUFFIXES+=("")
BUILD_REQUIRES+="
setuptools_python
cython_python
python_numpy
dateutil_python
pytz_python
"
BUILD_PREREQUIRES+="
cmd:python2
"
fi
# gcc2 does not support the flags passed by python3
if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then
PYTHON_PACKAGES+=(python3)
PYTHON_VERSIONS+=(3.6)
PYTHON_LIBSUFFIXES+=(m)
BUILD_REQUIRES+="
setuptools_python3
cython_python3$secondaryArchSuffix
python3_numpy$secondaryArchSuffix
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
${pythonPackage}_numpy$secondaryArchSuffix
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
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
}