Skip to content

Commit

Permalink
Add python source build
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicField committed Oct 15, 2024
1 parent 430dc2f commit 3653c83
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/actions/build-python-from-source/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ runs:
if [ "${{ inputs.nogil }}" = "true" ]; then
configure_options="--disable-gil" # Add the --disable-gil option if nogil is true.
fi
if [ "${{ runner.os }}" = "Linux" ] || [ "${{ runner.os }}" = "macos" ]; then
if [ "${{ runner.os }}" = "Linux" ] || [ "${{ runner.os }}" = "macOS" ]; then
prefix="/usr/local/python-${{ inputs.python-version }}"
elif [ "${{ runner.os }}" = "Windows" ]; then
prefix="C:/Python/${{ inputs.python-version }}"
Expand All @@ -72,14 +72,12 @@ runs:
#fi
# Build it!
if [ "${{ runner.os }}" != "Windows" ]; then
echo CONFIGURE: --prefix=$prefix CFLAGS="-O3" CXXFLAGS="-O3" $configure_options
./configure --prefix=$prefix CFLAGS="-O3" CXXFLAGS="-O3" $configure_options
make -j $(nproc) # Use all available processors to speed up the build.
else
# Use the build script provided for Windows in the Python source.
set CFLAGS=/Ox
set CXXFLAGS=/Ox
echo BUILD: $configure_options
./PCbuild/build.bat -e -d $configure_options
fi
# Make sure we use our version of python.
Expand Down

0 comments on commit 3653c83

Please sign in to comment.