# py-polars/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. The source tarball used by this package was created based on "git" upstream sources. The sources were obtained as follows: ocgitfetch --run \ --deletegit \ https://github.com/pola-rs/polars.git \ py-polars #--------------------------------------------------------------------- 2. By default, if this package is built, it: (a) doesn't delete the "rustlocal" package tree (b) doesn't delete previously cached build objects (c) downloads sources for some Rust libraries and programs un- less they're already present (d) builds some Rust libraries and programs in the "rustlocal" package tree To force actual as opposed to cached compiles, delete the following cache directory tree first: $PRODTREE/rustlocal/rusthome/sccache/ To force a full rebuild from scratch, delete the following package directory tree instead: $PRODTREE/rustlocal/ This will both download updated sources, in most but not all cases, and rebuild from scratch. If you do this, you'll need to rebuild the following packages in the order shown here: rustlocal rustmore maturin py-polars polars-cli For a rebuild from scratch, Internet access is required. The results of this type of build are unpredictable. This type of build may very well fail. #--------------------------------------------------------------------- 3. The following procedure: export RUSTOFFLINE=true makelac py-polars --force rebuilds the same libraries and programs using the same sources. It shouldn't access the Internet. This mode requires that a full build from scratch have been done previously. Cached build objects may be used unless the following cache tree is deleted first: $PRODTREE/rustlocal/rusthome/sccache/ #--------------------------------------------------------------------- 4. In the default mode, this package requires Internet access to bui- ld. Builds are also non-repeatable; i.e., the results may be differ- ent each time and builds may not work at all. This is one of relatively few packages of this type that Laclin sup- ports. #--------------------------------------------------------------------- 5. This package doesn't modify the Rust compiler directory tree at: $PRODTREE/rustc/ #--------------------------------------------------------------------- 6. Possible alternate build procedure. This would be used in place of the current "uv" procedure. It would probably omit some features rela- tive to the "uv" procedure. export LTS_CPU=1 export RUSTC_BOOTSTRAP=1 cd $HERE patch -p1 < $PKGDIR_SPECIAL/polarsmake.spcpat cd py-polars make build-release PV=`pythonver3` SPDIR=$PRODTREE/python3/lib/python$PV/site-packages rm -fr $SPDIR/narwhal* rm -fr $SPDIR/polars* LPDIR=.venv/lib/python$PV/site-packages cp -a $LPDIR/narwhal* $SPDIR/ cp -a $LPDIR/polars* $SPDIR/ #--------------------------------------------------------------------- [buildtimes] #--------------------------------------------------------------------- [settings] defer = glibc64 configure = none proddir = none purge = no shareddir = yes strip = no tmpsize = 7500M setpaths = rustc #--------------------------------------------------------------------- [depends] maturin python:strict # Rust "dog" replaces Python* "dog" python3-core:strict rustc rustlocal:strict rustmore #--------------------------------------------------------------------- [build] HERE=`pwd` PP=$PRODTREE/rustlocal BINDIR=$PP/bin TGTDIR=$HERE/target RUSTOFFLINE=$RUSTOFFLINE rm -fr $TGTDIR mkdir -p $BINDIR $TGTDIR cd $PP pkill --full /bin/sccache || true OFFLINESW="" if [ "@$RUSTOFFLINE" == "@1" ]; then RUSTOFFLINE=true ; fi if [ "@$RUSTOFFLINE" == "@yes" ]; then RUSTOFFLINE=true ; fi if [ "@$RUSTOFFLINE" == "@true" ]; then OFFLINESW=--offline ; fi mkdir -p rusthome cd rusthome export HOME=`pwd` export CARGO_TARGET_DIR=$TGTDIR export RUSTC_WRAPPER=$BINDIR/sccache ls $RUSTC_WRAPPER export SCCACHE_DIR=$HOME/sccache mkdir -p $SCCACHE_DIR echo SCCACHE_DIR is $SCCACHE_DIR export SCCACHE_CACHE_SIZE="10G" #--------------------------------------------------------------------- export LTS_CPU=1 export RUSTC_BOOTSTRAP=1 UV_FIND_LINKS=/src/piprepo3 \ UV_SYSTEM_PYTHON=true \ uv --offline pip install \ "polars-lts-cpu[async,fsspec,graph,numpy,\ openpyxl,pandas,pyarrow,pydantic,sqlalchemy,style,\ timezone,xlsx2csv,xlsxwriter]" echo uv install of py-polars done #--------------------------------------------------------------------- [postbuild] python3 $PKGDIR_SPECIAL/polarsdemo.py #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = tbd url_lfs = tbd url_tarball = git # See "technotes" in "cfg" file #--------------------------------------------------------------------- [history] 241126 Added package 241126 Started with 0b1d5205f - "git" hash