diff --git a/.github/actions/build-python-from-source/action.yml b/.github/actions/build-python-from-source/action.yml index 1a73ea0..4a78d54 100644 --- a/.github/actions/build-python-from-source/action.yml +++ b/.github/actions/build-python-from-source/action.yml @@ -67,9 +67,6 @@ runs: elif [ "${{ runner.os }}" = "Windows" ]; then prefix="C:/Python/${{ inputs.python-version }}" fi - #if [ "${{ runner.os }}" = "macOS" ]; then - # configure_options+=" --enable-shared" - #fi # Build it! if [ "${{ runner.os }}" != "Windows" ]; then ./configure --prefix=$prefix CFLAGS="-O3" CXXFLAGS="-O3" $configure_options @@ -80,8 +77,16 @@ runs: set CXXFLAGS=/Ox ./PCbuild/build.bat -e -d $configure_options fi - # Make sure we use our version of python. - echo "LOCAL_PYTHON=$prefix/bin/python3" >> $GITHUB_ENV + + # Make sure we use our version of python. + - name: Set LOCAL_PYTHON + run: | + if [ "${{ runner.os }}" != "Windows" ]; then + echo "LOCAL_PYTHON=/usr/local/python-${{ inputs.python-version }}/bin/python3" >> $GITHUB_ENV + else + cwd=$(pwd) + echo "LOCAL_PYTHON=${cwd}/Python/${{ inputs.python-version }}/python.exe" >> $GITHUB_ENV + fi # Install the built Python version. - name: Install Python @@ -91,12 +96,13 @@ runs: if [ "${{ runner.os }}" != "Windows" ]; then sudo make install else + # Get the current working directory + cwd=$(pwd) # Create the installation directory - mkdir "C:/Python/${{ inputs.python-version }}" - + mkdir -p "${cwd}/Python/${{ inputs.python-version }}" # Copy the Python executable and necessary DLLs to the installation directory - cp PCbuild/amd64/python.exe "C:/Python/${{ inputs.python-version }}" - cp PCbuild/amd64/*.dll "C:/Python/${{ inputs.python-version }}" + cp PCbuild/amd64/python.exe "${cwd}/Python/${{ inputs.python-version }}" + cp PCbuild/amd64/*.dll "${cwd}/Python/${{ inputs.python-version }}" fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 57970c4..5a482d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,14 +45,14 @@ jobs: # python-version: 'v3.13.0' # build-from-source: true # nogil: true - #- os: windows-latest - # python-version: 'v3.13.0' - # build-from-source: true - # nogil: true - - os: macos-latest + - os: windows-latest python-version: 'v3.13.0' build-from-source: true nogil: true + #- os: macos-latest + # python-version: 'v3.13.0' + # build-from-source: true + # nogil: true #- os: ubuntu-latest # python-version: '3.14.0-alpha.0' # build-from-source: true