| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- ##
- ## python-math.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2017 OpenPKG Foundation e.V. <http://openpkg.net/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package versions
- %define V_python 2.7
- %define V_numpy 1.12.0b1
- %define V_scipy 1.0.0
- %define V_theano 1.0.0rc1
- # package information
- Name: python-math
- Summary: Python Modules for Mathematics
- URL: http://www.python.org/
- Vendor: Python Community
- Packager: OpenPKG Foundation e.V.
- Distribution: OpenPKG Community
- Class: BASE
- Group: Language
- License: GPL
- Version: %{V_python}
- Release: 20171101
- # list of sources
- Source0: https://files.pythonhosted.org/packages/source/n/numpy/numpy-%{V_numpy}.tar.gz
- Source1: https://files.pythonhosted.org/packages/source/s/scipy/scipy-%{V_scipy}.tar.gz
- Source2: https://files.pythonhosted.org/packages/source/T/Theano/Theano-%{V_theano}.tar.gz
- # build information
- BuildPreReq: OpenPKG, openpkg >= 20160101, python >= %{V_python}, gcc, gcc::with_fortran = yes
- PreReq: OpenPKG, openpkg >= 20160101, python >= %{V_python}, gcc, gcc::with_fortran = yes
- BuildPreReq: openblas
- PreReq: openblas
- %description
- This is a set of Python extension modules for mathematics.
- %track
- prog python-math:numpy = {
- version = %{V_numpy}
- url = https://pypi.python.org/pypi/numpy
- regex = numpy-(__VER__)\.tar\.gz
- }
- prog python-math:scipy = {
- version = %{V_scipy}
- url = https://pypi.python.org/pypi/scipy
- regex = scipy-(__VER__)\.tar\.gz
- }
- prog python-math:theano = {
- version = %{V_theano}
- url = https://pypi.python.org/pypi/Theano
- regex = Theano-(__VER__)\.tar\.gz
- }
- %prep
- %setup -q -c
- %setup -q -T -D -a 1
- %setup -q -T -D -a 2
- %build
- %install
- ( cd numpy-%{V_numpy}
- ( echo "[openblas]"
- echo "library_dirs = %{l_prefix}/lib"
- echo "include_dirs = %{l_prefix}/include"
- echo "runtime_library_dirs = %{l_prefix}/lib"
- echo "search_static_first = true"
- echo "extra_link_args = -lgfortran -lquadmath -lm"
- echo "openblas_libs = openblas"
- ) >site.cfg
- %{l_prefix}/bin/python \
- setup.py install \
- --root=$RPM_BUILD_ROOT \
- --prefix=%{l_prefix}
- ) || exit $?
- ( cd scipy-%{V_scipy}
- %{l_prefix}/bin/python \
- setup.py install \
- --root=$RPM_BUILD_ROOT \
- --prefix=%{l_prefix}
- ) || exit $?
- ( cd Theano-%{V_theano}
- %{l_prefix}/bin/python \
- setup.py install \
- --root=$RPM_BUILD_ROOT \
- --prefix=%{l_prefix}
- chmod 644 $RPM_BUILD_ROOT%{l_prefix}/lib/python/site-packages/Theano-*.egg-info/PKG-INFO
- ) || exit $?
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
|