diff options
author | fourtysixandtwo <fourtysixandtwo@sliderr.net> | 2023-10-08 06:57:09 -0600 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-10-14 10:32:29 +0700 |
commit | 9d9872ea3a3f6d48363f92fced611943ef47be33 (patch) | |
tree | 6658eef33962220df0311316c20ee8505c881f56 /python | |
parent | a28521190149554b0e03c6111a42eef204b3a470 (diff) |
python/python3-maturin: Updated for version 1.3.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/python3-maturin/mkvendored.sh | 98 | ||||
-rw-r--r-- | python/python3-maturin/python3-maturin.SlackBuild | 11 | ||||
-rw-r--r-- | python/python3-maturin/python3-maturin.info | 10 |
3 files changed, 21 insertions, 98 deletions
diff --git a/python/python3-maturin/mkvendored.sh b/python/python3-maturin/mkvendored.sh index 5317b9e267dfe..252d469ea9ecb 100644 --- a/python/python3-maturin/mkvendored.sh +++ b/python/python3-maturin/mkvendored.sh @@ -1,93 +1,17 @@ #!/bin/bash -# create maturin-vendored-sources-$VERSION-$BUILD.tar.xz +# This is a wrapper script for cargo-mkvendored.sh which is +# included in the cargo-vendor-filterer slackbuild and needs to be +# installed. It is only needed if you are upgrading the version and +# need new vendored rust libs. +# +# create $PRGNAM-vendored-sources-$VERSION-$BUILD.tar.xz # requires network access, but does not require root privilege. -# requires that maturin's REQUIRES need to be installed first -# and cargo-vendor-filterer if you want just the linux ones +# requires that $PRGNAM's REQUIRES need to be installed first -CWD=$(pwd) -PRGNAM=${CWD##*/} #basename $CWD equivalent -source ./$PRGNAM.info - -set -e -WORKDIR=$( mktemp -d ) -cd $WORKDIR - -# don't depend on user's ~/.cargo -mkdir -p cargohome -export CARGO_HOME=$(pwd)/cargohome - -egrep "^BUILD=|^SRCNAM=" $CWD/$PRGNAM.SlackBuild > 1 -source ./1 - -tar xvf $CWD/$SRCNAM-$VERSION.tar.gz -cd $SRCNAM-$VERSION - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -# check if rust16 is installed -if [ ! -d /opt/rust16/bin ]; then - echo "ERROR: The rust16 slackbuild is required to be installed" - exit 1 -else - export PATH="/opt/rust16/bin:$PATH" - if [ -z "$LD_LIBRARY_PATH" ]; then - export LD_LIBRARY_PATH="/opt/rust16/lib$LIBDIRSUFFIX" - else - export LD_LIBRARY_PATH="/opt/rust16/lib$LIBDIRSUFFIX:$LD_LIBRARY_PATH" - fi -fi - -# Configure cargo-vendor-filterer - cat << EOF >> Cargo.toml -[package.metadata.vendor-filter] -platforms = ["x86_64-unknown-linux-gnu", "i686-unknown-linux-gnu"] -all-features = true -EOF - -if [ -f ~/.cargo/bin/cargo-vendor-filterer ] || [ -f /usr/bin/cargo-vendor-filterer ]; then - echo "INFO: Creating filtered vendor libs tarball..." - ~/.cargo/bin/cargo-vendor-filterer +if [ -f /usr/bin/cargo-mkvendored.sh ]; then + /usr/bin/cargo-mkvendored.sh else - echo "WARNING: Creating unfiltered vendor libs tarball!" - cargo vendor + echo " ERROR: cargo-mkvendored.sh script is not available!! + ERROR: Install the cargo-vendor-filterer slackbuild." fi - -# build would fail if the .a files were removed -#find vendor -type f -a -name \*.a -print0 | xargs -0 rm -f - -mkdir -p .cargo - cat <<EOF >.cargo/config.toml -[source.crates-io] -replace-with = "vendored-sources" - -[source.vendored-sources] -directory = "vendor" -EOF -cd - - -cd $WORKDIR -tar cvfJ $CWD/$SRCNAM-vendored-sources-$VERSION-$BUILD.tar.xz \ - $SRCNAM-$VERSION/{vendor,.cargo} -cd $CWD -rm -rf $WORKDIR diff --git a/python/python3-maturin/python3-maturin.SlackBuild b/python/python3-maturin/python3-maturin.SlackBuild index 554914e4cf644..244632432b7ff 100644 --- a/python/python3-maturin/python3-maturin.SlackBuild +++ b/python/python3-maturin/python3-maturin.SlackBuild @@ -22,18 +22,20 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20231008 46and2: Set ARCH=i686 as minimum. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=python3-maturin SRCNAM=${PRGNAM#python3-*} -VERSION=${VERSION:-1.2.3} +VERSION=${VERSION:-1.3.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i586 ;; + i?86) ARCH=i686 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -48,10 +50,7 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then +if [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then diff --git a/python/python3-maturin/python3-maturin.info b/python/python3-maturin/python3-maturin.info index 7cc6176363fb2..708e91cbf6588 100644 --- a/python/python3-maturin/python3-maturin.info +++ b/python/python3-maturin/python3-maturin.info @@ -1,10 +1,10 @@ PRGNAM="python3-maturin" -VERSION="1.2.3" +VERSION="1.3.0" HOMEPAGE="https://github.com/PyO3/maturin" -DOWNLOAD="https://files.pythonhosted.org/packages/source/m/maturin/maturin-1.2.3.tar.gz \ - https://slackware.uk/~fourtysixandtwo/src/maturin-vendored-sources-1.2.3-1.tar.xz" -MD5SUM="026342b5d4c6b41bf31f8b8ca89e68b0 \ - b9fb6091ebdc1644482cf6a2588793e4" +DOWNLOAD="https://files.pythonhosted.org/packages/source/m/maturin/maturin-1.3.0.tar.gz \ + https://slackware.uk/~fourtysixandtwo/src/maturin-vendored-sources-1.3.0-1.tar.xz" +MD5SUM="1aa81b86d50489de0cb4a3c34b42377b \ + 58ab2428bc9e4b042f4edf114d318a7b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="rust16 python3-setuptools-rust-opt" |