Commit 6f5b63d8 authored by gnastyle's avatar gnastyle
Browse files

imported two other pytho deps

parent 1e394d93
pkgbase=python-pandas
pkgname=('python2-pandas' 'python3-pandas')
pkgver=0.17.1
pkgrel=1
pkgdesc="Cross-section and time series data analysis toolkit"
arch=('x86_64')
url="http://pandas.pydata.org/"
license=('BSD')
makedepends=('python3-setuptools' 'python3-dateutil' 'python3-numpy' 'python3-pytz'
'python2-setuptools' 'python2-dateutil' 'python2-numpy' 'python2-pytz')
source=("https://pypi.python.org/packages/source/p/pandas/pandas-${pkgver}.tar.gz")
sha1sums=('2e515ad85d872b8aabda3da7586f002b7826d425')
prepare() {
cd "$srcdir"
cp -a pandas-${pkgver} pandas-py2-${pkgver}
cd pandas-py2-${pkgver}
sed -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
-i $(find . -name '*.py')
}
build() {
msg "Building Python2"
cd "$srcdir"/pandas-py2-${pkgver}
python2 setup.py build_ext --inplace
python2 setup.py build
msg "Building Python3"
cd "$srcdir"/pandas-${pkgver}
python3 setup.py build_ext --inplace
python3 setup.py build
}
package_python2-pandas() {
depends=('python2-numpy' 'python2-dateutil' 'python2-pytz')
optdepends=('python2-pandas-datareader: pandas.io.data replacement (recommended)'
'python2-numexpr: needed for accelerating certain numerical operations (recommended)'
'python2-bottleneck: needed for accelerating certain types of nan evaluations (recommended)'
'python2-scipy: needed for miscellaneous statistical functions'
'python2-pytables: needed for HDF5-based storage'
'python2-sqlalchemy: needed for SQL database support'
'python2-matplotlib: needed for plotting'
'python2-statsmodels: needed for parts of pandas.stats'
'python2-openpyxl: needed for Excel XLSX input/output'
'python2-xlrd: needed for Excel XLS input'
'python2-xlwt: needed for Excel XLS output'
'python2-xlsxwriter: alternative Excel XLSX output'
'python2-jinja: needed for conditional HTML formatting'
'python2-boto: needed for access to Amazon S3 storage'
'python2-blosc: for msgpack compression using blosc'
'python2-pyqt4: needed for read_clipboard function (only one needed)'
'python2-pyside: needed for read_clipboard function (only one needed)'
'pygtk: needed for read_clipboard function (only one needed)'
'xsel: needed for read_clipboard function (only one needed)'
'xclip: needed for read_clipboard function (only one needed)'
'python2-gflags: needed for gbq'
'python2-google-api-python-client: needed for gbq'
'python2-setuptools: needed for gbq'
'python2-httplib2: needed for gbq'
'python2-beautifulsoup4: needed for read_html function'
'python2-lxml: needed for read_html function (and/or python2-html5lib)'
'python2-html5lib: needed for read_hmlt function (and/or python2-lxml)')
cd "$srcdir"/pandas-py2-${pkgver}
python2 setup.py install --skip-build --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python3-pandas() {
depends=('python3-numpy' 'python3-dateutil' 'python3-pytz')
optdepends=('python3-pandas-datareader: pandas.io.data replacement (recommended)'
'python3-numexpr: needed for accelerating certain numerical operations (recommended)'
'python3-bottleneck: needed for accelerating certain types of nan evaluations (recommended)'
'python3-scipy: needed for miscellaneous statistical functions'
'python3-pytables: needed for HDF5-based storage'
'python3-sqlalchemy: needed for SQL database support'
'python3-matplotlib: needed for plotting'
'python3-statsmodels: needed for parts of pandas.stats'
'python3-openpyxl: needed for Excel XLSX input/output'
'python3-xlrd: needed for Excel XLS input'
'python3-xlwt: needed for Excel XLS output'
'python3-xlsxwriter: alternative Excel XLSX output'
'python3-jinja: needed for conditional HTML formatting'
'python3-boto: needed for access to Amazon S3 storage'
'python3-blosc: for msgpack compression using blosc'
'python3-pyqt4: needed for read_clipboard function (only one needed)'
'python3-pyside: needed for read_clipboard function (only one needed)'
'xsel: needed for read_clipboard function (only one needed)'
'xclip: needed for read_clipboard function (only one needed)'
'python3-beautifulsoup4: needed for read_html function'
'python3-lxml: needed for read_html function (and/or python-html5lib)'
'python3-html5lib: needed for read_hmlt function (and/or python-lxml)')
cd "$srcdir"/pandas-${pkgver}
python3 setup.py install --skip-build --root="$pkgdir" --optimize=1
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
pkgbase=python-sympy
pkgname=('python2-sympy' 'python3-sympy')
pkgver=0.7.6.1
pkgrel=1
arch=('any')
pkgdesc='Symbolic manipulation package (Computer Algebra System), written in pure Python'
url='http://sympy.org/en/index.html'
license=('BSD')
makedepends=('python2-mpmath' 'python3-mpmath' 'git')
source=("git+https://github.com/sympy/sympy.git#tag=sympy-${pkgver}"
sympy-0.7.6-strip-internal-mpmath.patch)
sha512sums=('SKIP'
'0b3836580e742c4a22c0b7306a219ebf56eb87b62f7c119cbe56887e642a28097f5223af043874968183601c06c327ad2beade9f34066ab2fd49d365cbc2caec')
prepare() {
cd sympy
# FS#43210
patch -p1 -i ../sympy-0.7.6-strip-internal-mpmath.patch
cd "$srcdir"
cp -a sympy py3-sympy
sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' \
-e 's|#!/usr/bin/python|#!/usr/bin/python2|' \
sympy/sympy/mpmath/tests/{runtests.py,test_eigen.py,test_levin.py,test_eigen_symmetric.py} \
sympy/sympy/mpmath/matrices/{eigen.py,eigen_symmetric.py} \
sympy/sympy/utilities/tests/diagnose_imports.py sympy/sympy/benchmarks/bench_symbench.py
sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python3|' \
-e 's|#!/usr/bin/python|#!/usr/bin/python3|' \
py3-sympy/sympy/mpmath/tests/{runtests.py,test_eigen.py,test_levin.py,test_eigen_symmetric.py} \
py3-sympy/sympy/mpmath/matrices/{eigen.py,eigen_symmetric.py} \
py3-sympy/sympy/utilities/tests/diagnose_imports.py py3-sympy/sympy/benchmarks/bench_symbench.py
}
build() {
cd sympy
python2 setup.py build
cd ../py3-sympy
python3 setup.py build
}
check() {
cd sympy
# python2 setup.py test
cd ../py3-sympy
# python3 setup.py test
}
package_python2-sympy() {
depends=('python2-mpmath')
optdepends=('python2-pyglet: plotting'
'ipython2: user friendly interface for isympy')
cd sympy
python2 setup.py install --root "${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
package_python3-sympy() {
depends=('python3-mpmath')
optdepends=('ipython3: user friendly interface for isympy')
cd py3-sympy
python3 setup.py install --root "${pkgdir}" --optimize=1
# rename files that exists in both 'python2-sympy' and 'python3-sympy'
mv "${pkgdir}"/usr/bin/isympy{,-py3}
mv "${pkgdir}"/usr/share/man/man1/isympy{,-py3}.1
install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment