48 lines
1.0 KiB
Bash
48 lines
1.0 KiB
Bash
#!/usr/bin/env bash
|
|
name='py3-flit'
|
|
release='4'
|
|
version='3.12.0'
|
|
url='https://github.com/pypa/flit'
|
|
description='Simplified packaging of Python modules'
|
|
email='aliriza.keskin@pardus.org.tr'
|
|
maintainer='aliriza'
|
|
license=('GPLv3')
|
|
source=("https://github.com/pypa/flit/archive/refs/tags/$version.tar.gz")
|
|
depends=(python)
|
|
makedepends=()
|
|
sha256sums=('c157ff92c01f4bb169182722ff76aadac113926b729215e91909021aa56e2ea3')
|
|
group=(dev.python)
|
|
uses=()
|
|
arch=('x86_64')
|
|
|
|
cd flit-$version
|
|
|
|
## this package require itself. so we must use venv for build
|
|
prepare(){
|
|
python3 -m venv .
|
|
source bin/activate
|
|
pip3 install build installer flit
|
|
}
|
|
|
|
|
|
|
|
build(){
|
|
source bin/activate
|
|
cur=$PWD
|
|
for dir in . flit_core; do
|
|
cd $dir
|
|
python -m build --wheel --skip-dependency-check --no-isolation
|
|
cd $cur
|
|
done
|
|
}
|
|
|
|
package(){
|
|
cur=$PWD
|
|
for dir in . flit_core; do
|
|
cd $dir
|
|
python -m installer --destdir="$DESTDIR" dist/*.whl
|
|
cd $cur
|
|
done
|
|
mv ${DESTDIR}/usr/lib/python3.*/site-packages ${DESTDIR}/usr/lib/python3
|
|
}
|