Skip to content

Commit

Permalink
copy compiled test c-extension modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mattip committed Aug 14, 2023
1 parent e22633d commit cf6683f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ REM timeout 60m pypy3 -m test --pgo -j%CPU_COUNT% || true;
REM Build the cache for the standard library
pypy -c "import _testcapi"
IF %ERRORLEVEL% NEQ 0 (Echo ERROR while building &exit /b 11)
if %PY_VERSION% == "3.8" (
if "%PY_VERSION%" == "3.8" (
pypy -c "import _ctypes_test"
IF %ERRORLEVEL% NEQ 0 (Echo ERROR while building &exit /b 11)
pypy -c "import _testmultiphase"
Expand All @@ -95,6 +95,7 @@ if %PY_VERSION% == "3.8" (
pypy -c "import _testmultiphase_build"
)
IF %ERRORLEVEL% NEQ 0 (Echo ERROR while building &exit /b 11)
copy

REM Include a %PREFIX%\Scripts directory in the package. This ensures
REM that entry_points are able to be created by downstream packages.
Expand Down
12 changes: 6 additions & 6 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ echo INCLUDEPY $(pypy -c "from distutils import sysconfig; print(sysconfig.get_c
ls $(pypy -c "from distutils import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))")

_PYTHON_SYSCONFIGDATA_NAME=$sysconfigdata_name pypy -c "from distutils import sysconfig; assert sysconfig.get_config_var('HOST_GNU_TYPE') != None"
# Build the c-extension modules for the standard library
pypy -c "import _testcapi"
# Build and copy the c-extension modules for the standard library
cp $(pypy -c "import _testcapi; print(_testcapi.__file__)") $PREFIX/lib/pypy${PY_VERSION}
if [[ "${PY_VERSION}" == "3.8" ]]; then
pypy -c "import _ctypes_test"
pypy -c "import _testmultiphase"
cp $(pypy -c "import _ctypes_test; print(_ctypes_test.__file__)") $PREFIX/lib/pypy${PY_VERSION}
cp $(pypy -c "import _testmultiphase; print(_testmultiphase.__file__)") $PREFIX/lib/pypy${PY_VERSION}
else
pypy -c "import _ctypes_test_build"
pypy -c "import _testmultiphase_build"
cp $(pypy -c "import _ctypes_test_build, _ctypes_test; print(_ctypes_test.__file__)") $PREFIX/lib/pypy${PY_VERSION}
cp $(pypy -c "import _testmultiphase_build, _testmultiphase; print(_testmultiphase.__file__)") $PREFIX/lib/pypy${PY_VERSION}
fi

# Run the python stdlib tests
Expand Down

0 comments on commit cf6683f

Please sign in to comment.