MCPcopy Create free account
hub / github.com/opencv/opencv-python / RearrangeCMakeOutput

Class RearrangeCMakeOutput

setup.py:314–488  ·  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

312 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")
313
314class RearrangeCMakeOutput:
315 """
316 Patch SKBuild logic to only take files related to the Python package
317 and construct a file hierarchy that SKBuild expects (see below)
318 """
319
320 _setuptools_wrap = None
321
322 # Have to wrap a function reference, or it's converted
323 # into an instance method on attr assignment
324 import argparse
325
326 wraps = argparse.Namespace(_classify_installed_files=None)
327 del argparse
328
329 package_paths_re = None
330 packages = None
331 files_outside_package = None
332
333 def __init__(self, package_paths_re, files_outside_package, packages):
334 cls = self.__class__
335 assert not cls.wraps._classify_installed_files, "Singleton object"
336 import skbuild.setuptools_wrap
337
338 cls._setuptools_wrap = skbuild.setuptools_wrap
339 cls.wraps._classify_installed_files = (
340 cls._setuptools_wrap._classify_installed_files
341 )
342 cls._setuptools_wrap._classify_installed_files = (
343 self._classify_installed_files_override
344 )
345
346 cls.package_paths_re = package_paths_re
347 cls.files_outside_package = files_outside_package
348 cls.packages = packages
349
350 def __del__(self):
351 cls = self.__class__
352 cls._setuptools_wrap._classify_installed_files = (
353 cls.wraps._classify_installed_files
354 )
355 cls.wraps._classify_installed_files = None
356 cls._setuptools_wrap = None
357
358 def _classify_installed_files_override(
359 self,
360 install_paths,
361 package_data,
362 package_prefixes,
363 py_modules,
364 new_py_modules,
365 scripts,
366 new_scripts,
367 data_files,
368 cmake_source_dir,
369 cmake_install_reldir,
370 ):
371 """

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected