#!/bin/sh NAME="python-dateutil" DESC="Python3 extensions for datetime module" MAKEDEPS="" PKG_VER=2.8.2 SOURCE="https://files.pythonhosted.org/packages/source/p/python-dateutil/python-dateutil-$PKG_VER.tar.gz" prepare() { apply_patches # Generate _version.py ourselves since we don't use setuptools_scm cat <<- EOF >dateutil/_version.py # coding: utf-8 version = '$PKG_VER' version_tuple = (2, 8, 2) EOF sed -e '/setuptools_scm/d' -i setup.cfg sed -e "s/setup(/setup(\n version='$PKG_VER',/" -i setup.py } build() { python3 setup.py build } package() { python3 setup.py install --prefix=/usr --root="$PKG_DEST" }