Skip to content

Commit

Permalink
More ports and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 3, 2024
1 parent 31499e1 commit d776b90
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 1 deletion.
14 changes: 14 additions & 0 deletions ports/py-hatch-fancy-pypi-readme/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME hatch_fancy_pypi_readme
VERSION ${VERSION}
SHA512 c263fe2d73a92ab29da215852d76a1a0c465b821e437fe96aea3f0fe30cee40e3013db01ff50b9dea138c5d766716d217af6bbe89c6a8d6ff41e59ba34f90976
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)

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

vcpkg_python_test_import(MODULE "hatch_fancy_pypi_readme")
13 changes: 13 additions & 0 deletions ports/py-hatch-fancy-pypi-readme/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "py-hatch-fancy-pypi-readme",
"version": "24.1.0",
"description": "Fancy PyPI READMEs with Hatch",
"homepage": "https://github.com/hynek/hatch-fancy-pypi-readme",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"vcpkg-python-scripts"
]
}
16 changes: 16 additions & 0 deletions ports/py-opencv-contrib-python/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# In a perfect world, this port would be a feature of py-opencv-python[contrib]
# But in a perfect world, we wouldn't have to deal with the topic of missing submodules in vcpkg ports

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME opencv-contrib-python
VERSION ${VERSION}
SHA512 e4723c84a6035cedacd32cd2a50ae4e6d0a7095d9e21e80e275086e0260bcf2723cf189492b7909f90786ccf776956c628eb461c136ecf791a00658a6991159d
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
vcpkg_python_test_import(MODULE "cv2")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
21 changes: 21 additions & 0 deletions ports/py-opencv-contrib-python/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "py-opencv-contrib-python",
"version": "4.10.0.84",
"description": "Wrapper package for OpenCV python bindings with extra modules.",
"homepage": "https://github.com/opencv/opencv-python",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
},
{
"name": "py-scikit-build",
"host": true
}
]
}
16 changes: 16 additions & 0 deletions ports/py-opencv-python/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# In a perfect world, this would be consuming the opencv package as a dependency.
# But that's not how upstream chose to see things

vcpkg_from_pythonhosted(
OUT_SOURCE_PATH SOURCE_PATH
PACKAGE_NAME opencv-python
VERSION ${VERSION}
SHA512 afef89288d9a02a35bdb883ae8d177f6fdf8771bdfe595667eac14d3dc6ec0d1eaa72f180274621c19a6d723bfb7d2567f1cfbc2e0129d558f6f5f7ffaacae0b
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
vcpkg_python_test_import(MODULE "cv2")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
29 changes: 29 additions & 0 deletions ports/py-opencv-python/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "py-opencv-python",
"version": "4.10.0.84",
"description": "Wrapper package for OpenCV python bindings.",
"homepage": "https://github.com/opencv/opencv-python",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"python3",
{
"name": "vcpkg-python-scripts",
"host": true
},
{
"name": "py-scikit-build",
"host": true
}
],
"default-features": [
"contrib"
],
"features": {
"contrib": {
"description": "extra modules"
}
}
}
2 changes: 1 addition & 1 deletion ports/py-pyspnego/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ vcpkg_from_pythonhosted(
vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
vcpkg_python_test_import(MODULE "pyspnego")
vcpkg_python_test_import(MODULE "spnego")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
17 changes: 17 additions & 0 deletions ports/py-scikit-build-core/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO scikit-build/scikit-build-core
REF v${VERSION}
SHA512 1e1ba9ea8ca20c2a49cd27631c8af4ebc7f0675248b0a260c1dafccb48351c57d140f991b7e5f8f29edfe1287c87225f6cfb1bcb431595c4f0f4c64a4f02edf6
HEAD_REF main
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

#file(COPY "${SOURCE_PATH}/llama_cpp" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/python3/Lib/site-packages")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)

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

vcpkg_python_test_import(MODULE "scikit_build_core")
26 changes: 26 additions & 0 deletions ports/py-scikit-build-core/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "py-scikit-build-core",
"version": "0.9.3",
"description": "A next generation Python CMake adaptor and Python API for plugins",
"homepage": "https://scikit-build-core.readthedocs.io/",
"license": "Apache-2.0",
"dependencies": [
{
"name": "py-hatch-vcs",
"host": true
},
{
"name": "py-hatchling",
"host": true
},
{
"name": "py-setuptools",
"host": true
},
{
"name": "py-setuptools-scm",
"host": true
},
"vcpkg-python-scripts"
]
}
15 changes: 15 additions & 0 deletions ports/py-scikit-build/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO scikit-build/scikit-build
REF ${VERSION}
SHA512 410c142de5330471177109cb22cfa6fae9af68abb210268dde7d7af80e6fe54a128c77e561bebecc232f3d83275b80b5daf48688ed0eab89f015b445e90a736b
HEAD_REF main
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)

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

vcpkg_python_test_import(MODULE "skbuild")
17 changes: 17 additions & 0 deletions ports/py-scikit-build/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "py-scikit-build",
"version": "0.18.1",
"description": "Improved build system generator for Python C/C++/Fortran/Cython extensions",
"homepage": "https://github.com/scikit-build/scikit-build",
"dependencies": [
{
"name": "py-setuptools",
"host": true
},
"vcpkg-python-scripts",
{
"name": "py-hatch-fancy-pypi-readme",
"host": true
}
]
}

0 comments on commit d776b90

Please sign in to comment.