diff --git a/dev-python/numpy/numpy-1.16.2.recipe b/dev-python/numpy/numpy-1.16.2.recipe new file mode 100644 index 000000000..37915a2d1 --- /dev/null +++ b/dev-python/numpy/numpy-1.16.2.recipe @@ -0,0 +1,134 @@ +SUMMARY="Array processing for numbers, strings, records, and objects" +DESCRIPTION="NumPy is a general-purpose array-processing package designed to \ +efficiently manipulate large multi-dimensional arrays of arbitrary records \ +without sacrificing too much speed for small multi-dimensional arrays. +NumPy is built on the Numeric code base and adds features introduced by \ +numarray as well as an extended C-API and the ability to create arrays of \ +arbitrary type which also makes NumPy suitable for interfacing with \ +general-purpose data-base applications." +HOMEPAGE="http://numpy.scipy.org/" +COPYRIGHT="2005-2019 Travis E. Oliphant et al." +LICENSE="BSD (3-clause)" +REVISION="1" +SOURCE_URI="https://github.com/numpy/numpy/releases/download/v$portVersion/numpy-$portVersion.tar.gz" +CHECKSUM_SHA256="8088221e6e27da8d5907729f0bfe798f526836f22cc59ae83a0f867e67416a3e" +SOURCE_DIR="numpy-$portVersion" +PATCHES="numpy-$portVersion.patch" + +ARCHITECTURES="x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix +# lib:libamd$secondaryArchSuffix + lib:libblis$secondaryArchSuffix + lib:libexecinfo$secondaryArchSuffix +# lib:libfftw3$secondaryArchSuffix + lib:liblapack$secondaryArchSuffix + lib:libopenblas$secondaryArchSuffix +# lib:libumfpack$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel +# devel:cblas$secondaryArchSuffix +# devel:libamd$secondaryArchSuffix + devel:libblis$secondaryArchSuffix + devel:libexecinfo$secondaryArchSuffix +# devel:libfftw3$secondaryArchSuffix + devel:liblapack$secondaryArchSuffix + devel:libopenblas$secondaryArchSuffix +# devel:libumfpack$secondaryArchSuffix + " + +PYTHON_PACKAGES=(python python3) +PYTHON_VERSIONS=(2.7 3.6) +for i in "${!PYTHON_PACKAGES[@]}"; do +pythonPackage=${PYTHON_PACKAGES[i]} +pythonVersion=${PYTHON_VERSIONS[$i]} +eval "PROVIDES_${pythonPackage}=\"\ + ${portName}_$pythonPackage = $portVersion\n\ + cmd:f2py${pythonVersion%.*}\n\ + cmd:f2py$pythonVersion\n\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku$secondaryArchSuffix\n\ + cmd:python$pythonVersion\ + \"" +BUILD_REQUIRES="$BUILD_REQUIRES + setuptools_$pythonPackage + " +BUILD_PREREQUIRES="$BUILD_PREREQUIRES + cmd:git + cmd:gcc$secondaryArchSuffix + cmd:gfortran$secondaryArchSuffix + cmd:pkg_config$secondaryArchSuffix + cmd:python$pythonVersion + " +done + +REPLACES_python=" + python_numpy + " + +INSTALL() +{ +# Check at every update in site.cfg.example! +cat > site.cfg << EOF +[ALL] +libraries = execinfo,lapack,openblas +library_dirs = /system/$relativeDevelopLibDir +include_dirs = /system/$relativeIncludeDir +runtime_library_dirs = /system/$relativeLibDir +[openblas] +libraries = openblas +library_dirs = /system/$relativeDevelopLibDir +include_dirs = /system/$relativeIncludeDir +runtime_library_dirs = /system/$relativeLibDir +[blis] +libraries = blis +library_dirs = /system/$relativeDevelopLibDir +include_dirs = /system/$relativeIncludeDir/blis +runtime_library_dirs = /system/$relativeLibDir +#[amd] +#amd_libs = amd +#[umfpack] +#umfpack_libs = umfpack +#[fftw] +#libraries = fftw3 +EOF + + rm -rf doc/sphinxext/.git + + for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + python=python$pythonVersion + installLocation=$prefix/lib/$python/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + rm -rf build + $python setup.py build install \ + --root=/ --prefix=$prefix + rm -rf $binDir/f2py + + packageEntries $pythonPackage \ + $prefix/lib/python* \ + $binDir + done +} + +TEST() +{ + for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + python=python$pythonVersion + $python run_tests.py + done +} diff --git a/dev-python/numpy/patches/numpy-1.16.2.patch b/dev-python/numpy/patches/numpy-1.16.2.patch new file mode 100644 index 000000000..1ccd430eb --- /dev/null +++ b/dev-python/numpy/patches/numpy-1.16.2.patch @@ -0,0 +1,15 @@ +diff --git a/numpy/core/src/umath/cpuid.c b/numpy/core/src/umath/cpuid.c +index 6744ceb..b1aaa09 100644 +--- a/numpy/core/src/umath/cpuid.c ++++ b/numpy/core/src/umath/cpuid.c +@@ -19,7 +19,9 @@ + static NPY_INLINE + int os_avx_support(void) + { +-#if HAVE_XGETBV ++// See, GCC bug < 7.3.1 ++// https://github.com/numpy/numpy/pull/10814 ++#if 0 + /* + * use bytes for xgetbv to avoid issues with compiler not knowing the + * instruction diff --git a/dev-python/numpy/python3_numpy-1.14.5.recipe b/dev-python/numpy/python3_numpy-1.14.5.recipe deleted file mode 100644 index 74f7b5647..000000000 --- a/dev-python/numpy/python3_numpy-1.14.5.recipe +++ /dev/null @@ -1,68 +0,0 @@ -SUMMARY="Array processing for numbers, strings, records, and objects" -DESCRIPTION="NumPy is a general-purpose array-processing package designed to \ -efficiently manipulate large multi-dimensional arrays of arbitrary records \ -without sacrificing too much speed for small multi-dimensional arrays. -NumPy is built on the Numeric code base and adds features introduced by \ -numarray as well as an extended C-API and the ability to create arrays of \ -arbitrary type which also makes NumPy suitable for interfacing with \ -general-purpose data-base applications." -HOMEPAGE="http://numpy.scipy.org/" -COPYRIGHT="2005-2016 NumPy Developers." -LICENSE="BSD (3-clause)" -REVISION="1" -SOURCE_URI="https://files.pythonhosted.org/packages/d5/6e/f00492653d0fdf6497a181a1c1d46bbea5a2383e7faf4c8ca6d6f3d2581d/numpy-1.14.5.zip" -CHECKSUM_SHA256="a4a433b3a264dbc9aa9c7c241e87c0358a503ea6394f8737df1683c7c9a102ac" -SOURCE_DIR="numpy-$portVersion" -PYTHON_VERSION="3.6" - -ARCHITECTURES="!x86_gcc2 x86 x86_64" - -PROVIDES=" - python3_numpy = $portVersion - cmd:f2py3 - " -REQUIRES=" - haiku - cmd:python$PYTHON_VERSION - lib:libopenblas - " - -BUILD_REQUIRES=" - haiku_devel - setuptools_python3 - devel:libopenblas - " -BUILD_PREREQUIRES=" - cmd:python$PYTHON_VERSION - cmd:git - cmd:gcc - cmd:gfortran - " - -BUILD() -{ -# Check at every update in site.cfg.example! -cat > site.cfg << EOF -[openblas] -libraries = openblas -library_dirs = /system/`echo ${relativeDevelopLibDir}` -include_dirs = /system/`echo ${relativeIncludeDir}` -runtime_library_dirs = /system/`echo ${relativeLibDir}` -EOF - - rm -rf doc/sphinxext/.git - $portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python3 setup.py build $jobArgs -} - -INSTALL() -{ - # GENERIC: all python_setuptools-based installs need this - python=$portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python3 - pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3) - installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ - export PYTHONPATH=$installLocation:$PYTHONPATH - mkdir -p $installLocation - - $python setup.py build $jobArgs install \ - --prefix $prefix -} diff --git a/dev-python/numpy/python_numpy-1.14.5.recipe b/dev-python/numpy/python_numpy-1.14.5.recipe deleted file mode 100644 index 9915b5d69..000000000 --- a/dev-python/numpy/python_numpy-1.14.5.recipe +++ /dev/null @@ -1,67 +0,0 @@ -SUMMARY="Array processing for numbers, strings, records, and objects" -DESCRIPTION="NumPy is a general-purpose array-processing package designed to \ -efficiently manipulate large multi-dimensional arrays of arbitrary records \ -without sacrificing too much speed for small multi-dimensional arrays. -NumPy is built on the Numeric code base and adds features introduced by \ -numarray as well as an extended C-API and the ability to create arrays of \ -arbitrary type which also makes NumPy suitable for interfacing with \ -general-purpose data-base applications." -HOMEPAGE="http://numpy.scipy.org/" -COPYRIGHT="2005-2016 NumPy Developers." -LICENSE="BSD (3-clause)" -REVISION="1" -SOURCE_URI="https://files.pythonhosted.org/packages/d5/6e/f00492653d0fdf6497a181a1c1d46bbea5a2383e7faf4c8ca6d6f3d2581d/numpy-1.14.5.zip" -CHECKSUM_SHA256="a4a433b3a264dbc9aa9c7c241e87c0358a503ea6394f8737df1683c7c9a102ac" -SOURCE_DIR="numpy-$portVersion" - -ARCHITECTURES="!x86_gcc2 x86 x86_64" - -PROVIDES=" - python_numpy = $portVersion - cmd:f2py2 - " -REQUIRES=" - haiku - cmd:python2 - lib:libopenblas - " - -BUILD_REQUIRES=" - haiku_devel - setuptools_python - devel:libopenblas - " -BUILD_PREREQUIRES=" - cmd:gcc - cmd:gfortran - cmd:git - cmd:python2 - " - -BUILD() -{ -# Check at every update in site.cfg.example! -cat > site.cfg << EOF -[openblas] -libraries = openblas -library_dirs = /system/`echo ${relativeDevelopLibDir}` -include_dirs = /system/`echo ${relativeIncludeDir}` -runtime_library_dirs = /system/`echo ${relativeLibDir}` -EOF - - rm -rf doc/sphinxext/.git - $portPackageLinksDir/cmd~python2/bin/python2 setup.py build $jobArgs -} - -INSTALL() -{ - # GENERIC: all python_setuptools-based installs need this - python=$portPackageLinksDir/cmd~python2/bin/python2 - pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3) - installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ - export PYTHONPATH=$installLocation:$PYTHONPATH - mkdir -p $installLocation - - $python setup.py build $jobArgs install \ - --prefix $prefix -}