Skip to content
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
wants to merge 49 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
70d0566
[numpy] Add port
Neumann-A Mar 13, 2024
cf6befb
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A Mar 13, 2024
ff1ff2e
opencv use numpy from vcpkg
Neumann-A Mar 13, 2024
515adbb
use sitecustomize.py in python3 for dll search paths
Neumann-A Mar 13, 2024
ad8374d
revert boost-python change
Neumann-A Mar 13, 2024
f88edba
format-manifest try fixing errors
Neumann-A Mar 14, 2024
5b0069e
Fix numpy linux
Neumann-A Mar 15, 2024
582c6e5
Don't test stuff which does not work due to static python
Neumann-A Apr 21, 2024
f9cf981
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A Apr 21, 2024
c219a84
Merge remote-tracking branch 'origin/openimageio-no-static-python' in…
Neumann-A Apr 21, 2024
8f68a37
add implicit fortran libs to pc file
Neumann-A Apr 22, 2024
74b72f4
print path to python executable
Neumann-A Apr 22, 2024
f1d2f50
fix arm64-windows
Neumann-A Apr 22, 2024
900c39d
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A Apr 22, 2024
0b99037
PATH debugging
Neumann-A Apr 22, 2024
c2d8f92
add missing ()
Neumann-A Apr 22, 2024
af8a525
add python to path
Neumann-A Apr 22, 2024
662e6fd
Do not use accelerate on osx
Neumann-A Apr 23, 2024
4c94d93
skip static windows builds
Neumann-A Apr 23, 2024
9324952
fix osx lapack selection
Neumann-A Apr 23, 2024
de3d9c3
also check IMPLICIT_LINK_DIRECTORIES
Neumann-A Apr 23, 2024
d49ef0e
Merge branch 'add_numpy' of https://github.com/Neumann-A/vcpkg into a…
Neumann-A Apr 23, 2024
fbc0b4d
add /usr/local/lib manually
Neumann-A Apr 23, 2024
b14d81e
ci debugging
Neumann-A Apr 23, 2024
2b7c2e2
minimize ci
Neumann-A Apr 23, 2024
f6799c2
more ci testing
Neumann-A Apr 23, 2024
aa21c1b
more printing
Neumann-A Apr 23, 2024
b2e3eb8
fix patch
Neumann-A Apr 23, 2024
b6baeca
move further
Neumann-A Apr 23, 2024
0a696bd
try updating openblas & lapack
Neumann-A Apr 24, 2024
d5f3476
update numpy
Neumann-A Apr 24, 2024
3c1d1b5
back to accelerate
Neumann-A Apr 24, 2024
7c2727d
enable ci
Neumann-A Apr 24, 2024
d11a1ce
Apply suggestions from code review
Neumann-A Apr 24, 2024
111ceda
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A Apr 24, 2024
7f5681f
Merge branch 'add_numpy' of https://github.com/Neumann-A/vcpkg into a…
Neumann-A Apr 24, 2024
f62ce9d
adjust numpy refs
Neumann-A Apr 24, 2024
696c8b2
add -fno-tree-vectorize
Neumann-A Apr 25, 2024
c17f502
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A Apr 25, 2024
d8e0fee
disable cross build imports
Neumann-A Apr 25, 2024
d6cec62
remove prefix patch
Neumann-A Apr 25, 2024
32d953a
fix lapack regressions
Neumann-A Apr 25, 2024
25e84a0
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A May 21, 2024
92739c8
Merge remote-tracking branch 'upstream/master' into add_numpy
Neumann-A Jun 20, 2024
65bae42
Update python stuff
Neumann-A Jun 21, 2024
2a71488
add missing patch
Neumann-A Jun 21, 2024
45ea362
add py-meson
Neumann-A Jun 22, 2024
83078eb
get fixes from other pr
Neumann-A Jun 22, 2024
4e1389a
adjust lapack patches
Neumann-A Jun 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion ports/lapack-reference/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ vcpkg_from_github(
PATCHES
cmake-config.patch
lapacke.patch
print-implicit-libs.patch
)

if(NOT VCPKG_TARGET_IS_WINDOWS)
Expand Down Expand Up @@ -156,4 +157,29 @@ configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRE
file(COPY "${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
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)
Comment on lines +163 to +165
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
list(REVERSE implicit_c_libs)
list(REMOVE_DUPLICATES implicit_c_libs)
list(REVERSE implicit_c_libs)

Just items to be removed from another list.

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)
message(STATUS "implicit_fortran_libs:${implicit_fortran_libs}|implicit_c_libs:${implicit_c_libs}")
if(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()

12 changes: 12 additions & 0 deletions ports/lapack-reference/print-implicit-libs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c99d71a267..34fd8445b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -697,3 +697,6 @@ 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}")
\ No newline at end of file
2 changes: 1 addition & 1 deletion ports/lapack-reference/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lapack-reference",
"version": "3.11.0",
"port-version": 4,
"port-version": 5,
"description": "LAPACK - Linear Algebra PACKage",
"homepage": "https://netlib.org/lapack/",
"license": "BSD-3-Clause-Open-MPI",
Expand Down
101 changes: 101 additions & 0 deletions ports/numpy/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # Numpy iuncludes are stored in the module itself
set(VCPKG_BUILD_TYPE release) # No debug builds required for pure python modules since vcpkg does not install a debug python executable.

find_program(VCPKG_PYTHON3 NAMES python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR} python${PYTHON3_VERSION_MAJOR} python PATHS "${VCPKG_PYTHON3_BASEDIR}" NO_DEFAULT_PATH)
find_program(VCPKG_CYTHON NAMES cython PATHS "${VCPKG_PYTHON3_BASEDIR}" "${VCPKG_PYTHON3_BASEDIR}/Scripts" NO_DEFAULT_PATH)
message(STATUS "PYTHON3:${VCPKG_PYTHON3}")
set(ENV{PYTHON3} "${VCPKG_PYTHON3}")
set(PYTHON3 "${VCPKG_PYTHON3}")

vcpkg_add_to_path(PREPEND "${VCPKG_PYTHON3_BASEDIR}")
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_add_to_path(PREPEND "${VCPKG_PYTHON3_BASEDIR}/Scripts")
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO numpy/numpy
REF 411a55b9ec084c3315fe5f199351c31d0eb3c352
SHA512 44d46d7c4b1e8a568e63951cf424f49dd47a5f3f9ad673a548c954ba373d353af03e12f07d7fa6f523c1dd91431d0f428d1e24703757928b1e9a0f50ada28ee7
HEAD_REF main
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH_SIMD
REPO intel/x86-simd-sort
REF 3c9bf9a5c69bc90f51e34aa039f914652d8b31cd
SHA512 1940346206e9988c42dfeb0907d34ac6320db067913c837b14028c89c5f41508c1abc1162996a305430a1186bf824d95129ae48178e77d44120cbf1246230749
HEAD_REF main
)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH_MESON_NUMPY
REPO numpy/meson
REF 067efcb7f59d4cef86c11f9ef7dd64828c48a9b8
SHA512 f1bb457de6e1123c7a69ee39c39dacfdb01001391dbb78e3c864ca5506029409a6153f951e59e4ba4bb0441340a0c686c95a287087e92856dac4009e6379b5a5
HEAD_REF main
)

cmake_path(GET SCRIPT_MESON PARENT_PATH MESON_DIR)
file(COPY "${SOURCE_PATH_MESON_NUMPY}/mesonbuild/modules/features" DESTINATION "${MESON_DIR}/mesonbuild/modules")

file(COPY "${SOURCE_PATH_SIMD}/" DESTINATION "${SOURCE_PATH}/numpy/core/src/npysort/x86-simd-sort")
set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH_SVML
REPO numpy/SVML
REF 958caeac44d66878ab36d364c863bde47c0c69e2
SHA512 444c1f765e875cc3eb55e48bcb8fa0c0d5b2e47cc5db16287e424f16b025cdbaf18f5d5eb6ccee6f5d0311e545ba9b8fdfa0f0cbc09508b38ce372afb339f8c7
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')")

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}']
)
vcpkg_install_meson()
vcpkg_fixup_pkgconfig()

set(subdir "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/")
if(VCPKG_TARGET_IS_WINDOWS)
set(subdir "${CURRENT_PACKAGES_DIR}/lib/site-packages/")
endif()
set(pyfile "${subdir}/numpy/__config__.py")
file(READ "${pyfile}" contents)
string(REPLACE "${CURRENT_INSTALLED_DIR}" "$(prefix)" contents "${contents}")
file(WRITE "${pyfile}" "${contents}")


if(VCPKG_TARGET_IS_WINDOWS)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/site-packages/numpy" "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/numpy")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
endif()

file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

# Add required Metadata for some python build plugins
file(WRITE "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}/numpy-${VERSION}.dist-info/METADATA"
"Metadata-Version: 2.1\n\
Name: numpy\n\
Version: ${VERSION}"
)

vcpkg_python_test_import(MODULE "numpy")
28 changes: 28 additions & 0 deletions ports/numpy/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "numpy",
"version": "1.26.1",
"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
},
"python3",
{
"name": "python3",
"host": true
},
{
"name": "vcpkg-python-scripts",
"host": true
},
{
"name": "vcpkg-tool-meson",
"host": true
}
]
}
2 changes: 0 additions & 2 deletions ports/opencv3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ if("python" IN_LIST FEATURES)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static AND VCPKG_TARGET_IS_WINDOWS)
message(WARNING "The python module is currently unsupported on Windows when building static OpenCV libraries")
else()
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES numpy OUT_PYTHON_VAR "PYTHON3")
set(ENV{PYTHON} "${PYTHON3}")
set(BUILD_opencv_python3 ON)
set(WITH_PYTHON ON)
endif()
Expand Down
3 changes: 2 additions & 1 deletion ports/opencv3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opencv3",
"version": "3.4.18",
"port-version": 13,
"port-version": 14,
"description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause",
Expand Down Expand Up @@ -229,6 +229,7 @@
"python": {
"description": "Python wrapper support for opencv",
"dependencies": [
"numpy",
{
"name": "opencv3",
"default-features": false,
Expand Down
2 changes: 0 additions & 2 deletions ports/opencv4/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ if("python" IN_LIST FEATURES)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static AND VCPKG_TARGET_IS_WINDOWS)
message(WARNING "The python module is currently unsupported on Windows when building static OpenCV libraries")
else()
x_vcpkg_get_python_packages(PYTHON_VERSION "3" PACKAGES numpy OUT_PYTHON_VAR "PYTHON3")
set(ENV{PYTHON} "${PYTHON3}")
set(BUILD_opencv_python3 ON)
set(WITH_PYTHON ON)
endif()
Expand Down
3 changes: 2 additions & 1 deletion ports/opencv4/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opencv4",
"version": "4.8.0",
"port-version": 15,
"port-version": 16,
"description": "computer vision library",
"homepage": "https://github.com/opencv/opencv",
"license": "Apache-2.0",
Expand Down Expand Up @@ -301,6 +301,7 @@
"python": {
"description": "Python wrapper support for opencv",
"dependencies": [
"numpy",
"python3"
]
},
Expand Down
13 changes: 13 additions & 0 deletions ports/py-build/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pypa/build
REF cd06da25481b9a610f846fa60cb67b5a5fa9a051
SHA512 02e7021ec3ddd2fa3d5aa3b34193e858ba35d04d36244f1db2e84efbc37fc1f0e118d8ecd32d54ee1feb276e79d753f69979f430ebec7b3e0a0e85e144d1b692
HEAD_REF main
)

file(COPY "${SOURCE_PATH}/src/build" DESTINATION "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
11 changes: 11 additions & 0 deletions ports/py-build/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "py-build",
"version": "0.10.0",
"port-version": 1,
"description": "A simple, correct Python build frontend ",
"homepage": "https://python-build.readthedocs.io",
"license": "MIT",
"dependencies": [
"python3"
]
}
18 changes: 18 additions & 0 deletions ports/py-cython/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cython/cython
REF ${VERSION}
SHA512 585d3fe810ace55278fcc6ea4508b3b5259320f92998cd688da787cd5f88ac5fc2467025f20da6d968969eb3296ae9c517136d24a4dbb475441271227968f6be
HEAD_REF main
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

if(NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_copy_tools(TOOL_NAMES cygdb cython cythonize DESTINATION "${CURRENT_PACKAGES_DIR}/${VCPKG_PYTHON3_SCRIPTS}" AUTO_CLEAN)
endif()

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled)
15 changes: 15 additions & 0 deletions ports/py-cython/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "py-cython",
"version": "3.0.5",
"description": "Cython is a Python compiler that makes writing C extensions for Python as easy as Python itself. Cython is based on Pyrex, but supports more cutting edge functionality and optimizations.",
"homepage": "https://cython.org/",
"license": "Apache-2.0",
"dependencies": [
"py-setuptools",
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
27 changes: 27 additions & 0 deletions ports/py-flit-core/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pypa/flit
REF c8ae08dc9f3f067feeec9dfd2c443db592f4d3d1
SHA512 4f561b142bb97432d7815f8e0579b562ce5c7eec666f36d52f088adcdd1846337b89ca090ae9849feafc6beb49f7b59fdd11c2b4c730d7b8337729c76cd346d3
HEAD_REF main
)

set(PYTHON3_BASEDIR "${CURRENT_INSTALLED_DIR}/tools/python3")
find_program(PYTHON3 NAMES python${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR} python${PYTHON3_VERSION_MAJOR} python PATHS "${PYTHON3_BASEDIR}" NO_DEFAULT_PATH)

message(STATUS "Building dist with '${PYTHON3}'!")
execute_process(COMMAND "${PYTHON3}" "${SOURCE_PATH}/flit_core/build_dists.py"
COMMAND_ERROR_IS_FATAL ANY
)

file(GLOB wheel "${SOURCE_PATH}/flit_core/dist/*.whl")

file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE})
message(STATUS "Installing wheel!")
execute_process(COMMAND "${PYTHON3}" "${SOURCE_PATH}/flit_core/bootstrap_install.py" "${wheel}" -i "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}"
COMMAND_ERROR_IS_FATAL ANY
)
message(STATUS "Finished installing wheel!")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
11 changes: 11 additions & 0 deletions ports/py-flit-core/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "py-flit-core",
"version": "3.9.0",
"port-version": 1,
"description": "Simplified packaging of Python modules",
"homepage": "https://flit.pypa.io",
"license": "BSD-3-Clause",
"dependencies": [
"python3"
]
}
14 changes: 14 additions & 0 deletions ports/py-gpep517/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO projg2/gpep517
REF v${VERSION}
SHA512 7c3b878220e907ef801301eadc0e3031dd3c31770cc50bb7119ab32f9244c8a33792b4896ddeffc5d4b7be9f1d881fba5179de155f11845f510e455be59fb92e
HEAD_REF main
)

file(COPY "${SOURCE_PATH}/gpep517" DESTINATION "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}")
# TODO: python3 -m compileall "$pkgdir/$sitedir"

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-gpep517/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-gpep517",
"version": "15",
"port-version": 1,
"description": "Python package builder and installer for non-pip-centric world",
"homepage": "https://github.com/projg2/gpep517",
"license": "MIT",
"dependencies": [
"py-flit-core",
"py-installer",
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
}
]
}
13 changes: 13 additions & 0 deletions ports/py-installer/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pypa/installer
REF b1d39180f8548820d09ce992dfadff0a42242c48
SHA512 09beb22bde94f2a5ec8c164d16af6322d9d05c6ec98507538070a9ab4f161802fc068c5e31540f4adf92c574488f3e0f94dc31e3bf58c09eac4096a8096bf873
HEAD_REF main
)

file(COPY "${SOURCE_PATH}/src/installer" DESTINATION "${CURRENT_PACKAGES_DIR}/${PYTHON3_SITE}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
Loading
Loading