-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[numpy] add new port #37409
Draft
Neumann-A
wants to merge
49
commits into
microsoft:master
Choose a base branch
from
Neumann-A:add_numpy
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[numpy] add new port #37409
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
70d0566
[numpy] Add port
Neumann-A cf6befb
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A ff1ff2e
opencv use numpy from vcpkg
Neumann-A 515adbb
use sitecustomize.py in python3 for dll search paths
Neumann-A ad8374d
revert boost-python change
Neumann-A f88edba
format-manifest try fixing errors
Neumann-A 5b0069e
Fix numpy linux
Neumann-A 582c6e5
Don't test stuff which does not work due to static python
Neumann-A f9cf981
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A c219a84
Merge remote-tracking branch 'origin/openimageio-no-static-python' in…
Neumann-A 8f68a37
add implicit fortran libs to pc file
Neumann-A 74b72f4
print path to python executable
Neumann-A f1d2f50
fix arm64-windows
Neumann-A 900c39d
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A 0b99037
PATH debugging
Neumann-A c2d8f92
add missing ()
Neumann-A af8a525
add python to path
Neumann-A 662e6fd
Do not use accelerate on osx
Neumann-A 4c94d93
skip static windows builds
Neumann-A 9324952
fix osx lapack selection
Neumann-A de3d9c3
also check IMPLICIT_LINK_DIRECTORIES
Neumann-A d49ef0e
Merge branch 'add_numpy' of https://github.com/Neumann-A/vcpkg into a…
Neumann-A fbc0b4d
add /usr/local/lib manually
Neumann-A b14d81e
ci debugging
Neumann-A 2b7c2e2
minimize ci
Neumann-A f6799c2
more ci testing
Neumann-A aa21c1b
more printing
Neumann-A b2e3eb8
fix patch
Neumann-A b6baeca
move further
Neumann-A 0a696bd
try updating openblas & lapack
Neumann-A d5f3476
update numpy
Neumann-A 3c1d1b5
back to accelerate
Neumann-A 7c2727d
enable ci
Neumann-A d11a1ce
Apply suggestions from code review
Neumann-A 111ceda
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A 7f5681f
Merge branch 'add_numpy' of https://github.com/Neumann-A/vcpkg into a…
Neumann-A f62ce9d
adjust numpy refs
Neumann-A 696c8b2
add -fno-tree-vectorize
Neumann-A c17f502
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A d8e0fee
disable cross build imports
Neumann-A d6cec62
remove prefix patch
Neumann-A 32d953a
fix lapack regressions
Neumann-A 25e84a0
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A 92739c8
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A 65bae42
Update python stuff
Neumann-A 2a71488
add missing patch
Neumann-A 45ea362
add py-meson
Neumann-A 83078eb
get fixes from other pr
Neumann-A 4e1389a
adjust lapack patches
Neumann-A File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 17 additions & 17 deletions
34
ports/lapack-reference/fix_prefix.patch → ports/lapack-reference/fix-prefix.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index c99d71a..7333110 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -10,6 +10,12 @@ set( | ||
${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION} | ||
) | ||
+if(WIN32) | ||
+ set(CMAKE_STATIC_LIBRARY_PREFIX "") | ||
+ set(CMAKE_SHARED_LIBRARY_PREFIX "lib") | ||
+ set(CMAKE_IMPORT_LIBRARY_PREFIX "") | ||
+endif() | ||
+ | ||
# Add the CMake directory for custom CMake modules | ||
set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH}) | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 73056dc2e9..56356bf354 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -14,6 +14,12 @@ set( | ||
set(CMAKE_STATIC_LIBRARY_PREFIX "lib${LIBRARY_PREFIX}") | ||
set(CMAKE_SHARED_LIBRARY_PREFIX "lib${LIBRARY_PREFIX}") | ||
|
||
+if(WIN32 AND CMAKE_GNUtoMS) | ||
+ set(CMAKE_STATIC_LIBRARY_PREFIX "") | ||
+ set(CMAKE_SHARED_LIBRARY_PREFIX "lib") | ||
+ set(CMAKE_IMPORT_LIBRARY_PREFIX "") | ||
+endif() | ||
+ | ||
# Add the CMake directory for custom CMake modules | ||
set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH}) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,6 @@ if(EXISTS "${CURRENT_INSTALLED_DIR}/share/clapack/copyright") | |
message(FATAL_ERROR "Can't build ${PORT} if clapack is installed. Please remove clapack:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") | ||
endif() | ||
|
||
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} | ||
|
||
include(vcpkg_find_fortran) | ||
SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) | ||
set(VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT enabled) | ||
|
@@ -18,12 +16,12 @@ vcpkg_from_github( | |
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO "Reference-LAPACK/lapack" | ||
REF "v${VERSION}" | ||
SHA512 fc3258b9d91a833149a68a89c5589b5113e90a8f9f41c3a73fbfccb1ecddd92d9462802c0f870f1c3dab392623452de4ef512727f5874ffdcba6a4845f78fc9a | ||
SHA512 f8f3c733a0221be0b3f5618235408ac59cbd4e5f1c4eab5f509b831a6ec6a9ef14b8849aa6ea10810df1aff90186ca454d15e9438d1dd271c2449d42d3da9dda | ||
HEAD_REF master | ||
PATCHES | ||
fix-prefix.patch | ||
cmake-config.patch | ||
lapacke.patch | ||
fix_prefix.patch | ||
print-implicit-libs.patch | ||
) | ||
|
||
if(NOT VCPKG_TARGET_IS_WINDOWS) | ||
|
@@ -63,6 +61,7 @@ vcpkg_cmake_configure( | |
"-DCMAKE_REQUIRE_FIND_PACKAGE_BLAS=${USE_OPTIMIZED_BLAS}" | ||
"-DCBLAS=${CBLAS}" | ||
"-DTEST_FORTRAN_COMPILER=OFF" | ||
"-DCMAKE_Fortran_INIT_FLAGS=-fno-tree-vectorize" # This is used by openblas to compile lapack since there seems to be a bug in gfortran | ||
${FORTRAN_CMAKE} | ||
MAYBE_UNUSED_VARIABLES | ||
CMAKE_REQUIRE_FIND_PACKAGE_BLAS | ||
|
@@ -106,6 +105,10 @@ if("cblas" IN_LIST FEATURES) | |
file(READ "${pcfile}" _contents) | ||
file(WRITE "${pcfile}" "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") | ||
endif() | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack.pc" " blas" " blas cblas") | ||
if(NOT VCPKG_BUILD_TYPE) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack.pc" " blas" " blas cblas") | ||
endif() | ||
endif() | ||
vcpkg_fixup_pkgconfig() | ||
|
||
|
@@ -152,3 +155,49 @@ file(COPY "${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake" DESTINATION "${CURRENT_PA | |
|
||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") | ||
|
||
if(NOT VCPKG_TARGET_IS_WINDOWS) | ||
file(READ "${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-out.log" config_log) | ||
string(REGEX MATCH "CMAKE_C_IMPLICIT_LINK_LIBRARIES:([^\n]+)" implicit_c_libs "${config_log}") | ||
set(implicit_c_libs "${CMAKE_MATCH_1}") | ||
list(REVERSE implicit_c_libs) | ||
list(REMOVE_DUPLICATES implicit_c_libs) | ||
list(REVERSE implicit_c_libs) | ||
string(REGEX MATCH "CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES:([^\n]+)" implicit_fortran_libs "${config_log}") | ||
set(implicit_fortran_libs "${CMAKE_MATCH_1}") | ||
list(REVERSE implicit_fortran_libs) | ||
list(REMOVE_DUPLICATES implicit_fortran_libs) | ||
list(REVERSE implicit_fortran_libs) | ||
list(REMOVE_ITEM implicit_fortran_libs ${implicit_c_libs} quadmath m) # libgfortran already has quadmath and m as a dependency | ||
list(JOIN implicit_fortran_libs " -l" implicit_fortran_libs) | ||
|
||
string(REGEX MATCH "CMAKE_C_IMPLICIT_LINK_DIRECTORIES:([^\n]+)" implicit_c_dirs "${config_log}") | ||
set(implicit_c_dirs "${CMAKE_MATCH_1}") | ||
list(REVERSE implicit_c_dirs) | ||
list(REMOVE_DUPLICATES implicit_c_dirs) | ||
list(REVERSE implicit_c_dirs) | ||
string(REGEX MATCH "CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES:([^\n]+)" implicit_fortran_dirs "${config_log}") | ||
set(implicit_fortran_dirs "${CMAKE_MATCH_1}") | ||
list(REVERSE implicit_fortran_dirs) | ||
list(REMOVE_DUPLICATES implicit_fortran_dirs) | ||
list(REVERSE implicit_fortran_dirs) | ||
Comment on lines
+176
to
+183
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For link dirs, reversal isn't really needed. |
||
list(REMOVE_ITEM implicit_fortran_dirs ${implicit_c_dirs}) # libgfortran already has quadmath and m as a dependency | ||
if(VCPKG_TARGET_IS_OSX) | ||
list(APPEND implicit_fortran_dirs "/usr/local/lib") | ||
endif() | ||
list(JOIN implicit_fortran_dirs " -L" implicit_fortran_dirs) | ||
|
||
message(STATUS "implicit_fortran_libs:${implicit_fortran_libs}|implicit_c_libs:${implicit_c_libs}") | ||
message(STATUS "implicit_fortran_dirs:${implicit_fortran_dirs}|implicit_c_dirs:${implicit_c_dirs}") | ||
if(NOT implicit_fortran_libs STREQUAL "" AND NOT implicit_fortran_dirs STREQUAL "") | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack-reference.pc" "-llapack" "-llapack -L${implicit_fortran_dirs} -l${implicit_fortran_libs}") | ||
if(NOT VCPKG_BUILD_TYPE) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack-reference.pc" "-llapack" "-llapack -L${implicit_fortran_dirs} -l${implicit_fortran_libs}") | ||
endif() | ||
elseif(NOT implicit_fortran_libs STREQUAL "") | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack-reference.pc" "-llapack" "-llapack -l${implicit_fortran_libs}") | ||
if(NOT VCPKG_BUILD_TYPE) | ||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack-reference.pc" "-llapack" "-llapack -l${implicit_fortran_libs}") | ||
endif() | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index c99d71a267..34fd8445b1 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -697,3 +697,8 @@ if(BUILD_HTML_DOCUMENTATION OR BUILD_MAN_DOCUMENTATION) | ||
|
||
endif() | ||
endif() | ||
+ | ||
+message(STATUS "CMAKE_C_IMPLICIT_LINK_LIBRARIES:${CMAKE_C_IMPLICIT_LINK_LIBRARIES}") | ||
+message(STATUS "CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES:${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}") | ||
+message(STATUS "CMAKE_C_IMPLICIT_LINK_DIRECTORIES:${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") | ||
+message(STATUS "CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES:${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES}") | ||
\ No newline at end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/numpy/testing/_private/extbuild.py b/numpy/testing/_private/extbuild.py | ||
index 292060e76f..49dd3b3556 100644 | ||
--- a/numpy/testing/_private/extbuild.py | ||
+++ b/numpy/testing/_private/extbuild.py | ||
@@ -182,7 +182,7 @@ def _c_compile(cfile, outputfilename, include_dirs=[], libraries=[], | ||
library_dirs=[]): | ||
if sys.platform == 'win32': | ||
compile_extra = ["/we4013"] | ||
+ link_extra = ["/LIBPATH:" + os.path.join(sys.base_prefix, '../../lib')] | ||
- link_extra = ["/LIBPATH:" + os.path.join(sys.base_prefix, 'libs')] | ||
elif sys.platform.startswith('linux'): | ||
compile_extra = [ | ||
"-O0", "-g", "-Werror=implicit-function-declaration", "-fPIC"] | ||
@@ -229,17 +229,19 @@ def build(cfile, outputfilename, compile_extra, link_extra, | ||
name_suffix: 'dummy', | ||
) | ||
""")) | ||
+ meson = os.environ.get('MESON', "meson.py") | ||
+ | ||
if sys.platform == "win32": | ||
- subprocess.check_call(["meson", "setup", | ||
+ subprocess.check_call([sys.executable, meson, "setup", | ||
"--buildtype=release", | ||
"--vsenv", ".."], | ||
cwd=build_dir, | ||
) | ||
else: | ||
- subprocess.check_call(["meson", "setup", "--vsenv", ".."], | ||
+ subprocess.check_call([sys.executable, meson, "setup", "--vsenv", ".."], | ||
cwd=build_dir | ||
) | ||
- subprocess.check_call(["meson", "compile"], cwd=build_dir) | ||
+ subprocess.check_call([sys.executable, meson, "compile"], cwd=build_dir) | ||
os.rename(str(build_dir / so_name) + ".dummy", cfile.parent / so_name) | ||
|
||
def get_so_suffix(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # Numpy includes are stored in the module itself | ||
set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled) | ||
set(VCPKG_BUILD_TYPE release) # No debug builds required for pure python modules since vcpkg does not install a debug python executable. | ||
|
||
#TODO: Fix E:\vcpkg_folders\numpy\installed\x64-windows-release\tools\python3\Lib\site-packages\numpy\testing\_private\extbuild.py | ||
|
||
vcpkg_get_vcpkg_installed_python(VCPKG_PYTHON3) | ||
cmake_path(GET VCPKG_PYTHON3 PARENT_PATH VCPKG_PYTHON3_BASEDIR) | ||
|
||
find_program(VCPKG_CYTHON NAMES cython PATHS "${VCPKG_PYTHON3_BASEDIR}" "${CURRENT_HOST_INSTALLED_DIR}/tools/python3/Scripts" NO_DEFAULT_PATH) | ||
|
||
set(ENV{PYTHON3} "${VCPKG_PYTHON3}") | ||
set(PYTHON3 "${VCPKG_PYTHON3}") | ||
|
||
cmake_path(GET SCRIPT_MESON PARENT_PATH MESON_DIR) | ||
vcpkg_add_to_path(PREPEND "${VCPKG_PYTHON3_BASEDIR}") | ||
if(VCPKG_TARGET_IS_WINDOWS) | ||
cmake_path(GET VCPKG_CYTHON PARENT_PATH CYTHON_DIR) | ||
vcpkg_add_to_path(PREPEND "${CYTHON_DIR}") | ||
endif() | ||
|
||
cmake_path(GET SCRIPT_MESON PARENT_PATH MESON_DIR) | ||
set(ENV{MESON} "${SCRIPT_MESON}") | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO numpy/numpy | ||
REF v${VERSION} | ||
SHA512 01b6a124c72d082f1dafdd98cdaaa84ab57f2bf0112d89d9355fa458a04deb8309c7e78449767429049971793c040e51412060681218a51c671ac6086dba2fa4 | ||
HEAD_REF main | ||
PATCHES | ||
fix-tests.patch | ||
) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH_SIMD | ||
REPO intel/x86-simd-sort | ||
REF 0631a88763a4a0a4c9e84d5eeb0ec5d36053730b | ||
SHA512 cd44796fc10e13004932be05d5bee46070e061bcc429c7ee8d9e11520e18c45bdec2f4fcd3555d9769891a763e151b0a0a4c00385ea30f24c99da1c65d736e39 | ||
HEAD_REF main | ||
) | ||
|
||
file(COPY "${SOURCE_PATH_SIMD}/" DESTINATION "${SOURCE_PATH}/numpy/core/src/npysort/x86-simd-sort") | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH_MESON_NUMPY | ||
REPO numpy/meson | ||
REF 4e370ca8ab73c07f7b84abe8a4b937caace050a4 | ||
SHA512 dec6e3b9428f95790f85a863778227a73e4f432f8f54e87d61fd6499b5a0723c59a334fcaf880afd59ae50c924d8f2cfa340a143f752cb39f976c731ca0ea123 | ||
HEAD_REF main | ||
) | ||
|
||
file(COPY "${SOURCE_PATH_MESON_NUMPY}/mesonbuild/modules/features" DESTINATION "${MESON_DIR}/mesonbuild/modules") | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH_SVML | ||
REPO numpy/SVML | ||
REF 1b21e453f6b1ba6a6aca392b1d810d9d41576123 | ||
SHA512 c9ea7bf9effbf5750750ddfdfc7db3d95614ed176bd4540d68eddb90a15f819510e9564c9454ef34be02dd6a8e48a7f292a70cb5b63c25c3d1c450a8e3b77d35 | ||
HEAD_REF main | ||
) | ||
|
||
file(COPY "${SOURCE_PATH_SVML}/" DESTINATION "${SOURCE_PATH}/numpy/core/src/umath/svml") | ||
|
||
vcpkg_replace_string("${SOURCE_PATH}/meson.build" "py.dependency()" "dependency('python-3.${PYTHON3_VERSION_MINOR}', method : 'pkg-config')") | ||
|
||
#debug replacement | ||
vcpkg_replace_string("${SOURCE_PATH}/numpy/_build_utils/tempita.py" "import argparse" "import argparse\nprint(sys.executable)\nimport os\n | ||
print(os.environ['PATH'])") | ||
|
||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CROSSCOMPILING AND VCPKG_TARGET_ARCHITECTURE MATCHES "arm") | ||
set(opts | ||
ADDITIONAL_PROPERTIES | ||
"longdouble_format = 'IEEE_DOUBLE_LE'" | ||
) | ||
endif() | ||
|
||
vcpkg_generate_meson_cmd_args( | ||
OUTPUT meson_opts | ||
CONFIG RELEASE | ||
LANGUAGES C;CXX | ||
${opts} | ||
) | ||
|
||
z_vcpkg_setup_pkgconfig_path(CONFIG "RELEASE") | ||
|
||
list(APPEND meson_opts "--python.platlibdir" "${CURRENT_INSTALLED_DIR}/lib") | ||
list(JOIN meson_opts "\",\"" meson_opts) | ||
|
||
set(build_dir "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") | ||
file(REMOVE_RECURSE "${build_dir}") | ||
file(MAKE_DIRECTORY "${build_dir}") | ||
|
||
vcpkg_python_build_and_install_wheel( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
--config-json "{\"setup-args\" : [\"-Dblas=blas\", \"-Dlapack=lapack\", \"-Duse-ilp64=false\", \"-Dallow-noblas=true\", \"${meson_opts}\" ], \"build-dir\" : \"${build_dir}\" }" | ||
) | ||
|
||
|
||
# message(STATUS "PATH is: '$ENV{PATH}'") | ||
# vcpkg_configure_meson( | ||
# SOURCE_PATH "${SOURCE_PATH}" | ||
# OPTIONS | ||
# -Dblas=blas | ||
# -Dlapack=lapack | ||
# #-Duse-ilp64=true | ||
# ADDITIONAL_BINARIES | ||
# cython=['${VCPKG_CYTHON}'] | ||
# python3=['${VCPKG_PYTHON3}'] | ||
# python=['${VCPKG_PYTHON3}'] | ||
# ${opts} | ||
# ) | ||
# message(STATUS "PATH is: '$ENV{PATH}'") | ||
# vcpkg_install_meson() | ||
# message(STATUS "PATH is: '$ENV{PATH}'") | ||
# vcpkg_fixup_pkgconfig() | ||
|
||
# #E:\vcpkg_folders\numpy\packages\numpy_arm64-windows-release\tools\python3\Lib\site-packages\numpy\__config__.py | ||
# # "path": r"E:/vcpkg_folders/numpy/installed/x64-windows-release/tools/python3/python.exe", and full paths to compilers | ||
# #"commands": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/arm64/cl.exe, -DWIN32, -D_WINDOWS, -W3, -utf-8, -MP, -MD, -O2, -Oi, -Gy, -DNDEBUG, -Z7", | ||
|
||
find_program(REAL_PYTHON3_LOCATION NAMES python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR} python${PYTHON3_VERSION_MAJOR} python PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/python3" PATH_SUFFIXES "bin" NO_DEFAULT_PATH) | ||
file(TO_NATIVE_PATH "${REAL_PYTHON3_LOCATION}" REAL_PYTHON3_LOCATION) | ||
|
||
|
||
set(subdir "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/") | ||
set(pyfile "${subdir}/numpy/__config__.py") | ||
file(READ "${pyfile}" contents) | ||
string(REPLACE "${CURRENT_INSTALLED_DIR}" "$(prefix)" contents "${contents}") | ||
string(REPLACE "r\"${REAL_PYTHON3_LOCATION}\"" "sys.executable" contents "${contents}") | ||
file(WRITE "${pyfile}" "import sys\n${contents}") | ||
|
||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt") | ||
|
||
vcpkg_python_test_import(MODULE "numpy") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"name": "numpy", | ||
"version": "1.26.4", | ||
"description": "The fundamental package for scientific computing with Python.", | ||
"homepage": "https://www.numpy.org/", | ||
"license": "BSD-3-Clause", | ||
"dependencies": [ | ||
"blas", | ||
"lapack", | ||
{ | ||
"name": "py-cython", | ||
"host": true | ||
}, | ||
{ | ||
"name": "py-meson", | ||
"host": true | ||
}, | ||
{ | ||
"name": "py-setuptools", | ||
"host": true | ||
}, | ||
"python3", | ||
{ | ||
"name": "python3", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-python-scripts", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-tool-meson", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just items to be removed from another list.