MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / cibuildwheel

Function cibuildwheel

scripts/test.py:885–1001  ·  view source on GitHub ↗
(
        env_extra,
        cibw_name,
        cibw_pyodide,
        cibw_pyodide_version,
        cibw_sdist,
        cibw_test_project,
        cibw_test_project_setjmp,
        cibw_skip_add_defaults,
        graal,
        )

Source from the content-addressed store, hash-verified

883
884
885def cibuildwheel(
886 env_extra,
887 cibw_name,
888 cibw_pyodide,
889 cibw_pyodide_version,
890 cibw_sdist,
891 cibw_test_project,
892 cibw_test_project_setjmp,
893 cibw_skip_add_defaults,
894 graal,
895 ):
896
897 if cibw_sdist and platform.system() == 'Linux':
898 log(f'Building sdist.')
899 run(f'cd {pymupdf_dir_abs} && {sys.executable} setup.py -d wheelhouse sdist', env_extra=env_extra)
900 sdists = glob.glob(f'{pymupdf_dir_abs}/wheelhouse/pymupdf-*.tar.gz')
901 log(f'{sdists=}')
902 assert sdists
903
904 run(f'pip install --upgrade --force-reinstall {cibw_name}')
905
906 # Some general flags.
907 if 'CIBW_BUILD_VERBOSITY' not in env_extra:
908 env_extra['CIBW_BUILD_VERBOSITY'] = '1'
909
910 # Add default flags to CIBW_SKIP.
911 # 2025-10-07: `cp3??t-*` excludes free-threading, which currently breaks
912 # some tests.
913
914 if cibw_skip_add_defaults:
915 CIBW_SKIP = env_extra.get('CIBW_SKIP', '')
916 CIBW_SKIP += ' *i686 *musllinux* *-win32 *-aarch64 cp3??t-*'
917 CIBW_SKIP = CIBW_SKIP.split()
918 CIBW_SKIP = sorted(list(set(CIBW_SKIP)))
919 CIBW_SKIP = ' '.join(CIBW_SKIP)
920 env_extra['CIBW_SKIP'] = CIBW_SKIP
921
922 # Set what wheels to build, if not already specified.
923 if 'CIBW_ARCHS' not in env_extra:
924 if 'CIBW_ARCHS_WINDOWS' not in env_extra:
925 env_extra['CIBW_ARCHS_WINDOWS'] = 'auto64'
926
927 if 'CIBW_ARCHS_MACOS' not in env_extra:
928 env_extra['CIBW_ARCHS_MACOS'] = 'auto64'
929
930 if 'CIBW_ARCHS_LINUX' not in env_extra:
931 env_extra['CIBW_ARCHS_LINUX'] = 'auto64'
932
933 # Tell cibuildwheel not to use `auditwheel` on Linux and MacOS,
934 # because it cannot cope with us deliberately having required
935 # libraries in different wheel - specifically in the PyMuPDF wheel.
936 #
937 # We cannot use a subset of auditwheel's functionality
938 # with `auditwheel addtag` because it says `No tags
939 # to be added` and terminates with non-zero. See:
940 # https://github.com/pypa/auditwheel/issues/439.
941 #
942 env_extra['CIBW_REPAIR_WHEEL_COMMAND_LINUX'] = ''

Callers 1

mainFunction · 0.85

Calls 6

cibw_cpFunction · 0.85
cibw_do_test_projectFunction · 0.85
runFunction · 0.70
logFunction · 0.50
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…