MCPcopy Index your code
hub / github.com/opencv/opencv-python / RearrangeCMakeOutput

Class RearrangeCMakeOutput

setup.py:318–492  ·  view source on GitHub ↗

Patch SKBuild logic to only take files related to the Python package and construct a file hierarchy that SKBuild expects (see below)

Source from the content-addressed store, hash-verified

316 print("OpenCV is raising funds to keep the library free for everyone, and we need the support of the entire community to do it. Donate to OpenCV on GitHub:\nhttps://github.com/sponsors/opencv\n")
317
318class RearrangeCMakeOutput:
319 """
320 Patch SKBuild logic to only take files related to the Python package
321 and construct a file hierarchy that SKBuild expects (see below)
322 """
323
324 _setuptools_wrap = None
325
326 # Have to wrap a function reference, or it's converted
327 # into an instance method on attr assignment
328 import argparse
329
330 wraps = argparse.Namespace(_classify_installed_files=None)
331 del argparse
332
333 package_paths_re = None
334 packages = None
335 files_outside_package = None
336
337 def __init__(self, package_paths_re, files_outside_package, packages):
338 cls = self.__class__
339 assert not cls.wraps._classify_installed_files, "Singleton object"
340 import skbuild.setuptools_wrap
341
342 cls._setuptools_wrap = skbuild.setuptools_wrap
343 cls.wraps._classify_installed_files = (
344 cls._setuptools_wrap._classify_installed_files
345 )
346 cls._setuptools_wrap._classify_installed_files = (
347 self._classify_installed_files_override
348 )
349
350 cls.package_paths_re = package_paths_re
351 cls.files_outside_package = files_outside_package
352 cls.packages = packages
353
354 def __del__(self):
355 cls = self.__class__
356 cls._setuptools_wrap._classify_installed_files = (
357 cls.wraps._classify_installed_files
358 )
359 cls.wraps._classify_installed_files = None
360 cls._setuptools_wrap = None
361
362 def _classify_installed_files_override(
363 self,
364 install_paths,
365 package_data,
366 package_prefixes,
367 py_modules,
368 new_py_modules,
369 scripts,
370 new_scripts,
371 data_files,
372 cmake_source_dir,
373 cmake_install_reldir,
374 ):
375 """

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…