getsolus / ypkg

Modern, declarative, structured build format
https://getsol.us
GNU General Public License v3.0
22 stars 11 forks source link

Add python3_avx2_lib_shift macro and and add extra check for avx2_lib_shift #19

Closed joebonrichie closed 3 years ago

joebonrichie commented 3 years ago

The python3_avx2_lib_shift macro will append a .avx2 extension to all python3 .so files in the $installdir. This is intended to be the last command to run as part of the the install step for avx2 builds. This allows a patched python to load the optimized .so.avx2 if a supported cpu is found.

An extra check is added to avx2_lib_shift to ensure it doesn't try and move around files which don't exist. Without this change avx2_lib_shift tries to run automatically after install and would fail for python module avx2 builds.

Generally, this is intended to be good-enough until YPKG3 as I don't want to import too much resources into something which will soon be swapped out. Hopefully for YPKG3 the equivalent of python3_avx2_lib_shift would be able to be run automagically.