name='python3-clevercsv' version='0.8.3' release='1' desc='A Python package for handling messy CSV files' homepage='https://github.com/alan-turing-institute/CleverCSV' license=('MIT') architectures=('amd64') deps=( 'python3-chardet' 'python3-regex' 'python3-packaging' ) build_deps=( 'git' 'python3-setuptools' 'python3-build' 'python3-devel' 'python3-installer' 'python3-wheel' ) build_deps_almalinux=( 'git' 'python3-setuptools' 'python3-build' 'python3-devel' 'python3-installer' 'python3-setuptools-wheel' ) #opt_deps=( # 'python3-pandas' # 'python3-tabview' # 'python3-wilderness' # 'python3-cchardet' # 'python3-pytest' # 'python3-pandas' # 'python3-tabview' # 'python3-wilderness' # 'python3-faust-cchardet' # 'python3-termcolor' #) sources=("git+https://github.com/alan-turing-institute/CleverCSV.git#tag=v$version") checksums=('SKIP') prepare() { cd "CleverCSV" } build() { cd "CleverCSV" python -m build --wheel --no-isolation } check() { cd "CleverCSV" local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))') PYTHONPATH="build/lib.linux-x86_64-cpython-${python_version}" pytest } package() { cd "CleverCSV" python -m installer --destdir="$pkgdir" dist/*.whl mkdir "$pkgdir"/usr/share mv "$pkgdir"/usr/man "$pkgdir"/usr/share/man install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$name/ }