File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7777 echo "Adding CUDA to PATH..."
7878 $CUDA_PATH = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4"
7979 echo "CUDA_PATH=$CUDA_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
80+ Copy-Item -Path "$CUDA_PATH/bin/*" -Destination . -Include "*.dll"
8081 shell : pwsh
81- # $arguments = "-s cublas_12.4 cublas_dev_12.4 cudart_12.4 cufft_12.4 cufft_dev_12.4 npp_12.4 npp_dev_12.4 nvcc_12.4"
82- # echo "$CUDA_PATH\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
83- # echo "$CUDA_PATH\lib\x64" | Out-File -FilePath $env:GITHUB_PATH -Append
84- # echo "$CUDA_PATH"
8582 - name : Cache CuDNN Installer
8683 id : cache-cudnn-installer
8784 uses : actions/cache@v3
@@ -104,6 +101,7 @@ jobs:
104101 $CUDNN_PATH = "D:/a/opencv-python-cuda/opencv-python-cuda/cudnn-windows-x86_64-8.9.7.29_cuda12-archive"
105102 echo "CUDNN_LIBRARY=$CUDNN_PATH/lib/x64/cudnn.lib" | Out-File -FilePath $env:GITHUB_ENV -Append
106103 echo "CUDNN_INCLUDE_DIR=$CUDNN_PATH/include" | Out-File -FilePath $env:GITHUB_ENV -Append
104+ Copy-Item -Path "$CUDNN_PATH/bin/*" -Destination . -Include "*.dll"
107105 shell : pwsh
108106
109107 - name : Build a package
@@ -114,6 +112,7 @@ jobs:
114112 python -m pip install --upgrade setuptools
115113 python -m pip install cmake==3.24.2
116114 python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt
115+ dir
117116 set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
118117 shell : cmd
119118 - name : Saving all wheels
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ include find_version.py
55include setup.py
66include pyproject.toml
77include _build_backend/backend.py
8+ include *.dll
89recursive-include cv2 *
910recursive-include docker *
1011recursive-include opencv *
Original file line number Diff line number Diff line change 1+ import glob
12import io
23import os
34import os .path
@@ -140,7 +141,7 @@ def main():
140141
141142 # Files in sourcetree outside package dir that should be copied to package.
142143 # Raw paths relative to sourcetree root.
143- files_outside_package_dir = {"cv2" : ["LICENSE.txt" , "LICENSE-3RD-PARTY.txt" ]}
144+ files_outside_package_dir = {"cv2" : ["LICENSE.txt" , "LICENSE-3RD-PARTY.txt" , "*.dll" ]}
144145
145146 ci_cmake_generator = (
146147 ["-G" , "Visual Studio 17 2022" ]
@@ -453,7 +454,11 @@ def _classify_installed_files_override(
453454
454455 for package_name , paths in cls .files_outside_package .items ():
455456 package_dest_reldir = package_name .replace ("." , os .path .sep )
457+ expanded_paths = []
456458 for path in paths :
459+ expanded_paths .append ([path ] if '*' not in path else glob .glob (path ))
460+ print (expanded_paths )
461+ for path in expanded_paths :
457462 new_install_relpath = os .path .join (
458463 package_dest_reldir ,
459464 # Don't yet have a need to copy
You can’t perform that action at this time.
0 commit comments