pkgconf 2.2.0.post0__tar.gz → 2.3.0.post0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/.github/workflows/test.yml +1 -1
  2. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/.pre-commit-config.yaml +4 -4
  3. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/PKG-INFO +26 -26
  4. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/docs/index.rst +11 -0
  5. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/meson.build +1 -0
  6. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/pyproject.toml +6 -3
  7. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/src/buildhack.py +4 -7
  8. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/src/pkgconf/__init__.py +15 -9
  9. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/src/pkgconf/__main__.py +36 -9
  10. pkgconf-2.3.0.post0/src/pkgconf/_import.py +73 -0
  11. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/Makefile.am +2 -0
  12. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/Makefile.lite +1 -1
  13. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/NEWS +35 -0
  14. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/README.md +1 -1
  15. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/cli/bomtool/main.c +3 -0
  16. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/cli/main.c +106 -6
  17. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/configure.ac +1 -1
  18. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/config.h.meson +5 -0
  19. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/dependency.c +7 -6
  20. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/fragment.c +32 -0
  21. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/libpkgconf.h +4 -2
  22. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/queue.c +1 -1
  23. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/man/pc.5 +3 -2
  24. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/meson.build +1 -1
  25. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/pkg.m4 +11 -2
  26. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/basic.sh +42 -1
  27. pkgconf-2.3.0.post0/subprojects/pkgconf/tests/lib1/child-prefix/pkgconfig/child-prefix-1.pc +11 -0
  28. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/regress.sh +31 -1
  29. pkgconf-2.3.0.post0/tests/conftest.py +84 -0
  30. pkgconf-2.3.0.post0/tests/packages/error-on-import/foo/__init__.py +1 -0
  31. pkgconf-2.3.0.post0/tests/packages/error-on-import/foo/bar/__init__.py +1 -0
  32. pkgconf-2.3.0.post0/tests/packages/error-on-import/meson.build +5 -0
  33. pkgconf-2.3.0.post0/tests/packages/error-on-import/pyproject.toml +11 -0
  34. pkgconf-2.3.0.post0/tests/packages/register-pkg-config-path/meson.build +11 -0
  35. pkgconf-2.3.0.post0/tests/packages/register-pkg-config-path/register_pkg_config_path/lib/__init__.py +0 -0
  36. pkgconf-2.3.0.post0/tests/packages/register-pkg-config-path/register_pkg_config_path/pkgconf/__init__.py +0 -0
  37. pkgconf-2.3.0.post0/tests/packages/register-pkg-config-path/register_pkg_config_path/pkgconf/register_pkg_config_path.pc +9 -0
  38. pkgconf-2.3.0.post0/tests/test_entrypoints.py +63 -0
  39. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/test_examples.py +1 -2
  40. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/test_python_module.py +11 -0
  41. pkgconf-2.2.0.post0/tests/conftest.py +0 -45
  42. pkgconf-2.2.0.post0/tests/packages/register-pkg-config-path/meson.build +0 -11
  43. pkgconf-2.2.0.post0/tests/test_entrypoints.py +0 -37
  44. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/.github/workflows/build.yml +0 -0
  45. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/.gitmodules +0 -0
  46. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/.readthedocs.yaml +0 -0
  47. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/LICENSE +0 -0
  48. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/README.md +0 -0
  49. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/codecov.yml +0 -0
  50. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/docs/conf.py +0 -0
  51. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/environment.yml +0 -0
  52. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/examples/header-only-library/example/include/example.h +0 -0
  53. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/examples/header-only-library/example/pkgconf/example.pc +0 -0
  54. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/examples/header-only-library/pyproject.toml +0 -0
  55. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/src/pkgconf/diagnose.py +0 -0
  56. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/.gitattributes +0 -0
  57. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/.github/FUNDING.yml +0 -0
  58. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/.github/workflows/test.yml +0 -0
  59. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/.gitignore +0 -0
  60. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/.mailmap +0 -0
  61. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/.woodpecker.yml +0 -0
  62. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/AUTHORS +0 -0
  63. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/CODE_OF_CONDUCT.md +0 -0
  64. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/COPYING +0 -0
  65. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/Kyuafile.in +0 -0
  66. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/autogen.sh +0 -0
  67. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/cli/getopt_long.c +0 -0
  68. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/cli/getopt_long.h +0 -0
  69. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/cli/renderer-msvc.c +0 -0
  70. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/cli/renderer-msvc.h +0 -0
  71. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/conf.py +0 -0
  72. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/extract.py +0 -0
  73. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/index.rst +0 -0
  74. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-argvsplit.rst +0 -0
  75. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-audit.rst +0 -0
  76. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-cache.rst +0 -0
  77. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-client.rst +0 -0
  78. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-dependency.rst +0 -0
  79. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-fragment.rst +0 -0
  80. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-path.rst +0 -0
  81. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-personality.rst +0 -0
  82. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-pkg.rst +0 -0
  83. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-queue.rst +0 -0
  84. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf-tuple.rst +0 -0
  85. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/doc/libpkgconf.rst +0 -0
  86. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/argvsplit.c +0 -0
  87. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/audit.c +0 -0
  88. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/bsdstubs.c +0 -0
  89. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/bsdstubs.h +0 -0
  90. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/cache.c +0 -0
  91. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/client.c +0 -0
  92. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/fileio.c +0 -0
  93. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/iter.h +0 -0
  94. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/libpkgconf-api.h +0 -0
  95. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/meson.build +0 -0
  96. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/parser.c +0 -0
  97. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/path.c +0 -0
  98. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/personality.c +0 -0
  99. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/pkg.c +0 -0
  100. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/stdinc.h +0 -0
  101. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/tuple.c +0 -0
  102. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf/win-dirent.h +0 -0
  103. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/libpkgconf.pc.in +0 -0
  104. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/m4/ax_check_compile_flag.m4 +0 -0
  105. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/man/pkg.m4.7 +0 -0
  106. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/man/pkgconf-personality.5 +0 -0
  107. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/man/pkgconf.1 +0 -0
  108. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/meson_options.txt +0 -0
  109. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/Kyuafile.in +0 -0
  110. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/builtins.sh +0 -0
  111. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/conflicts.sh +0 -0
  112. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/framework.sh +0 -0
  113. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib-relocatable/lib/pkgconfig/foo.pc +0 -0
  114. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/argv-parse-2.pc +0 -0
  115. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/argv-parse-3.pc +0 -0
  116. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/argv-parse.pc +0 -0
  117. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/bar.pc +0 -0
  118. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/baz.pc +0 -0
  119. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/billion-laughs.pc +0 -0
  120. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/case-sensitivity.pc +0 -0
  121. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/cflags-internal.pc +0 -0
  122. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/cflags-libs-only.pc +0 -0
  123. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/cflags-whitespace-trailing.pc +0 -0
  124. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/cflags-whitespace.pc +0 -0
  125. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/circular-1.pc +0 -0
  126. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/circular-2.pc +0 -0
  127. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/circular-3.pc +0 -0
  128. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/comments-in-fields.pc +0 -0
  129. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/comments.pc +0 -0
  130. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/conflicts.pc +0 -0
  131. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/depgraph-break.pc +0 -0
  132. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/dos-lineendings.pc +0 -0
  133. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/empty-tuple.pc +0 -0
  134. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/escaped-backslash.pc +0 -0
  135. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/explicit-sysroot.pc +0 -0
  136. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/flag-order-1.pc +0 -0
  137. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/flag-order-3.pc +0 -0
  138. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/foo.pc +0 -0
  139. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/foobar.pc +0 -0
  140. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-collision-1.pc +0 -0
  141. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-collision-2.pc +0 -0
  142. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-collision-intermediary.pc +0 -0
  143. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-collision.pc +0 -0
  144. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-comment.pc +0 -0
  145. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-escaping-1.pc +0 -0
  146. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-escaping-2.pc +0 -0
  147. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-escaping-3.pc +0 -0
  148. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-quoting-2.pc +0 -0
  149. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-quoting-3.pc +0 -0
  150. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-quoting-5.pc +0 -0
  151. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-quoting-7.pc +0 -0
  152. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/fragment-quoting.pc +0 -0
  153. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/framework-1.pc +0 -0
  154. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/framework-2.pc +0 -0
  155. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/idirafter-ordering.pc +0 -0
  156. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/idirafter.pc +0 -0
  157. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/incomplete.pc +0 -0
  158. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/intermediary-1.pc +0 -0
  159. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/intermediary-2.pc +0 -0
  160. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/isystem.pc +0 -0
  161. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/malformed-1.pc +0 -0
  162. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/malformed-quoting.pc +0 -0
  163. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/malformed-version.pc +0 -0
  164. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/metapackage-1.pc +0 -0
  165. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/metapackage-2.pc +0 -0
  166. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/metapackage-3.pc +0 -0
  167. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/metapackage.pc +0 -0
  168. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/missing-require.pc +0 -0
  169. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/multiline-bogus.pc +0 -0
  170. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/multiline.pc +0 -0
  171. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/no-trailing-newline.pc +0 -0
  172. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/nocflag.pc +0 -0
  173. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/nolib.pc +0 -0
  174. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/omg-sysroot-uninstalled.pc +0 -0
  175. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/omg-uninstalled.pc +0 -0
  176. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/orphaned-requires-private.pc +0 -0
  177. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/paren-quoting.pc +0 -0
  178. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/prefix-foo1.pc +0 -0
  179. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/prefix-foo2.pc +0 -0
  180. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/private-libs-duplication.pc +0 -0
  181. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/provides-request-simple.pc +0 -0
  182. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/provides.pc +0 -0
  183. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/quotes.pc +0 -0
  184. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/requires-internal-2.pc +0 -0
  185. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/requires-internal-collision.pc +0 -0
  186. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/requires-internal-missing.pc +0 -0
  187. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/requires-internal.pc +0 -0
  188. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/spaces-in-paths.pc +0 -0
  189. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/static-archive-libs.pc +0 -0
  190. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/static-libs.pc +0 -0
  191. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/sysroot-dir-2.pc +0 -0
  192. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/sysroot-dir-3.pc +0 -0
  193. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/sysroot-dir-4.pc +0 -0
  194. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/sysroot-dir-5.pc +0 -0
  195. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/sysroot-dir.pc +0 -0
  196. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/tilde-quoting.pc +0 -0
  197. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/tilde.pc +0 -0
  198. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/tuple-quoting.pc +0 -0
  199. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/typelibdir.pc +0 -0
  200. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/unavailable-provider.pc +0 -0
  201. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/utf8.pc +0 -0
  202. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib1/variable-whitespace.pc +0 -0
  203. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib2/foo.pc +0 -0
  204. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/lib3/bar.pc +0 -0
  205. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/meson.build +0 -0
  206. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/parser.sh +0 -0
  207. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/provides.sh +0 -0
  208. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/requires.sh +0 -0
  209. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/sysroot.sh +0 -0
  210. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/test_env.sh.in +0 -0
  211. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/subprojects/pkgconf/tests/version.sh +0 -0
  212. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/data/needs-example-lib.c +0 -0
  213. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/packages/namespace/namespace/namespace.pc +0 -0
  214. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/packages/namespace/pyproject.toml +0 -0
  215. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/packages/register-pkg-config-path/lib.c +0 -0
  216. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/packages/register-pkg-config-path/pyproject.toml +0 -0
  217. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/packages/register-pkg-config-path/register_pkg_config_path/__init__.py +0 -0
  218. {pkgconf-2.2.0.post0/tests/packages/register-pkg-config-path/register_pkg_config_path/pkgconf → pkgconf-2.3.0.post0/tests/packages/register-pkg-config-path/register_pkg_config_path/include}/__init__.py +0 -0
  219. {pkgconf-2.2.0.post0/tests/packages/register-pkg-config-path → pkgconf-2.3.0.post0/tests/packages/register-pkg-config-path/register_pkg_config_path/include}/lib.h +0 -0
  220. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/packages/use-pybind11/meson.build +0 -0
  221. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/test_diagnose.py +0 -0
  222. {pkgconf-2.2.0.post0 → pkgconf-2.3.0.post0}/tests/test_distribution.py +0 -0
@@ -23,11 +23,11 @@ jobs:
23
23
  - windows
24
24
  - macos
25
25
  python:
26
- - '3.8'
27
26
  - '3.9'
28
27
  - '3.10'
29
28
  - '3.11'
30
29
  - '3.12'
30
+ - '3.13'
31
31
  fail-fast: false
32
32
  steps:
33
33
  - uses: actions/checkout@v4
@@ -4,7 +4,7 @@ ci:
4
4
 
5
5
  repos:
6
6
  - repo: https://github.com/pre-commit/pre-commit-hooks
7
- rev: v4.6.0
7
+ rev: v5.0.0
8
8
  hooks:
9
9
  - id: check-added-large-files
10
10
  - id: check-ast
@@ -30,11 +30,11 @@ repos:
30
30
  files: ^.pre-commit-config.yaml
31
31
  - id: trailing-whitespace
32
32
  - repo: https://github.com/abravalheri/validate-pyproject
33
- rev: v0.18
33
+ rev: v0.23
34
34
  hooks:
35
35
  - id: validate-pyproject
36
36
  - repo: https://github.com/astral-sh/ruff-pre-commit
37
- rev: v0.4.9
37
+ rev: v0.8.6
38
38
  hooks:
39
39
  - id: ruff
40
40
  args: [--fix, --show-fixes]
@@ -56,7 +56,7 @@ repos:
56
56
  - id: rst-inline-touching-normal
57
57
  - id: text-unicode-replacement-char
58
58
  - repo: https://github.com/asottile/pyupgrade
59
- rev: v3.16.0
59
+ rev: v3.19.1
60
60
  hooks:
61
61
  - id: pyupgrade
62
62
  args: [--py38-plus]
@@ -1,28 +1,28 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pkgconf
3
- Version: 2.2.0.post0
3
+ Version: 2.3.0.post0
4
4
  Summary: `pkgconf` is a program which helps with discovering library dependencies and configuring compiler and linker flags.
5
- Home-page: https://pkgconf-pypi.readthedocs.io/en/latest/
6
5
  Author-Email: Ralf Gommers <ralf.gommers@gmail.com>, =?utf-8?q?Filipe_La=C3=ADns?= <lains@riseup.net>
7
6
  License: Copyright (c) 2024 pypackaging-native contributors
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy of
10
- this software and associated documentation files (the “Software”), to deal in
11
- the Software without restriction, including without limitation the rights to
12
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
13
- of the Software, and to permit persons to whom the Software is furnished to do
14
- so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in all
17
- copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- SOFTWARE.
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
9
+ this software and associated documentation files (the “Software”), to deal in
10
+ the Software without restriction, including without limitation the rights to
11
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
12
+ of the Software, and to permit persons to whom the Software is furnished to do
13
+ so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
25
+
26
26
  Classifier: Development Status :: 4 - Beta
27
27
  Classifier: Intended Audience :: Developers
28
28
  Classifier: License :: OSI Approved :: MIT License
@@ -33,12 +33,13 @@ Classifier: Operating System :: Microsoft :: Windows
33
33
  Classifier: Operating System :: POSIX
34
34
  Classifier: Operating System :: Unix
35
35
  Classifier: Operating System :: MacOS
36
- Project-URL: Homepage, https://pkgconf-pypi.readthedocs.io/en/latest/
37
- Project-URL: Issues, https://github.com/pypackaging-native/pkgconf-pypi/issues
38
- Project-URL: Source, https://github.com/pypackaging-native/pkgconf-pypi
39
- Requires-Python: >=3.8
36
+ Project-URL: homepage, https://pkgconf-pypi.readthedocs.io/en/latest/
37
+ Project-URL: issues, https://github.com/pypackaging-native/pkgconf-pypi/issues
38
+ Project-URL: source, https://github.com/pypackaging-native/pkgconf-pypi
39
+ Requires-Python: >=3.9
40
40
  Requires-Dist: colorama; os_name == "nt"
41
41
  Requires-Dist: importlib_metadata; python_version < "3.10"
42
+ Provides-Extra: test
42
43
  Requires-Dist: pytest; extra == "test"
43
44
  Requires-Dist: pytest-cov>=5; extra == "test"
44
45
  Requires-Dist: pytest-mock>=2; extra == "test"
@@ -46,11 +47,10 @@ Requires-Dist: pytest-order>=1; extra == "test"
46
47
  Requires-Dist: pytest-github-actions-annotate-failures; extra == "test"
47
48
  Requires-Dist: meson-python; extra == "test"
48
49
  Requires-Dist: environment-helpers>=0.1.3; extra == "test"
50
+ Provides-Extra: docs
49
51
  Requires-Dist: sphinx~=7.0; extra == "docs"
50
52
  Requires-Dist: furo; extra == "docs"
51
53
  Requires-Dist: sphinx-design; extra == "docs"
52
- Provides-Extra: test
53
- Provides-Extra: docs
54
54
  Description-Content-Type: text/markdown
55
55
 
56
56
  # pkgconf-pypi
@@ -51,6 +51,17 @@ should create an entry that points to the Python module which contains your
51
51
  :emphasize-lines: 1
52
52
  :caption: example.pc
53
53
 
54
+ Package search path
55
+ ===================
56
+
57
+ When you run the ``pkgconf`` executable embedded in this package, the ``PKG_CONFIG_PATH``
58
+ environment variable will be set so that ``pkgconf`` can find the .pc files registered
59
+ by the ``pkg-config`` entrypoint_. If the ``PKG_CONFIG_PATH`` environment variable is
60
+ already set, it will be appended to.
61
+
62
+ If the embedded pkgconf cannot find a package, by default it will fallback to the system
63
+ ``pkgconf``/``pkg-config``, which may find packages present on the system. To disable
64
+ this behavior, set the ``PKGCONF_PYPI_EMBEDDED_ONLY=1`` environment variable.
54
65
 
55
66
  API
56
67
  ===
@@ -16,6 +16,7 @@ py.install_sources(
16
16
  [
17
17
  'src/pkgconf/__init__.py',
18
18
  'src/pkgconf/__main__.py',
19
+ 'src/pkgconf/_import.py',
19
20
  'src/pkgconf/diagnose.py',
20
21
  ],
21
22
  subdir: 'pkgconf',
@@ -11,7 +11,7 @@ requires = ['meson-python', 'wheel']
11
11
 
12
12
  [project]
13
13
  name = 'pkgconf'
14
- version = '2.2.0-0'
14
+ version = '2.3.0-0'
15
15
  description = '`pkgconf` is a program which helps with discovering library dependencies and configuring compiler and linker flags.'
16
16
  readme = 'README.md'
17
17
  license = {file = 'LICENSE'}
@@ -31,7 +31,7 @@ classifiers = [
31
31
  'Operating System :: Unix',
32
32
  'Operating System :: MacOS'
33
33
  ]
34
- requires-python = '>= 3.8'
34
+ requires-python = '>= 3.9'
35
35
  dependencies = [
36
36
  'colorama; os_name == "nt"',
37
37
  'importlib_metadata; python_version < "3.10"',
@@ -79,7 +79,7 @@ config-settings = 'setup-args=--vsenv build-dir=build'
79
79
 
80
80
  [tool.mypy]
81
81
  files = 'src'
82
- python_version = '3.8'
82
+ python_version = '3.9'
83
83
  show_error_codes = true
84
84
  strict = true
85
85
 
@@ -109,6 +109,9 @@ extend-select = [
109
109
  lines-after-imports = 2
110
110
  lines-between-types = 1
111
111
 
112
+ [tool.ruff.lint.per-file-ignores]
113
+ 'tests/packages/error-on-import/**' = ['TRY002', 'TRY003', 'EM101']
114
+
112
115
  [tool.coverage.run]
113
116
  source = [
114
117
  'pkgconf',
@@ -29,13 +29,10 @@ def build_wheel(wheel_directory, config_settings=None, metadata_directory=None):
29
29
  assert new_name != wheel_path.name
30
30
  new_wheel_path = workdir / new_name
31
31
 
32
- with wheel.wheelfile.WheelFile(
33
- wheel_path,
34
- 'r',
35
- ) as original_wheel, wheel.wheelfile.WheelFile(
36
- new_wheel_path,
37
- 'w',
38
- ) as new_wheel:
32
+ with (
33
+ wheel.wheelfile.WheelFile(wheel_path, 'r') as original_wheel,
34
+ wheel.wheelfile.WheelFile(new_wheel_path, 'w') as new_wheel,
35
+ ):
39
36
  for item in original_wheel.infolist():
40
37
  if item.filename.endswith('.dist-info/WHEEL'):
41
38
  new_wheel.writestr(
@@ -1,4 +1,3 @@
1
- import importlib
2
1
  import itertools
3
2
  import logging
4
3
  import operator
@@ -10,13 +9,10 @@ import sys
10
9
  import sysconfig
11
10
  import warnings
12
11
 
12
+ from collections.abc import Sequence
13
13
  from typing import Any, Optional
14
14
 
15
-
16
- if sys.version_info >= (3, 9):
17
- from collections.abc import Sequence
18
- else:
19
- from typing import Sequence
15
+ import pkgconf._import
20
16
 
21
17
 
22
18
  if sys.version_info >= (3, 10):
@@ -32,6 +28,9 @@ _LOGGER = logging.getLogger(__name__)
32
28
 
33
29
 
34
30
  def _get_system_executable() -> Optional[pathlib.Path]:
31
+ if os.environ.get('PKGCONF_PYPI_EMBEDDED_ONLY'):
32
+ return None
33
+
35
34
  scripts = sysconfig.get_path('scripts')
36
35
  path_list = os.environ.get('PATH', os.defpath).split(os.pathsep)
37
36
  if scripts in path_list:
@@ -68,8 +67,15 @@ def get_executable() -> pathlib.Path:
68
67
 
69
68
 
70
69
  def _get_module_paths(name: str) -> Sequence[str]:
71
- module = importlib.import_module(name)
72
- return list(module.__path__)
70
+ try:
71
+ module = pkgconf._import.import_module_no_exec(name)
72
+ if not hasattr(module, '__path__'):
73
+ warnings.warn(f"{module} isn't a package, it won't be added to PKG_CONFIG_PATH", stacklevel=2)
74
+ return []
75
+ return list(module.__path__)
76
+ except Exception:
77
+ _LOGGER.exception(f'Failed to find paths for module {name!r}')
78
+ return []
73
79
 
74
80
 
75
81
  def get_pkg_config_path() -> Sequence[str]:
@@ -87,7 +93,7 @@ def get_pkg_config_path() -> Sequence[str]:
87
93
  return itertools.chain.from_iterable([_get_module_paths(entry.value) for entry in sorted_entrypoints])
88
94
 
89
95
 
90
- def run_pkgconf(*args: str, **subprocess_kwargs: Any) -> subprocess.Popen:
96
+ def run_pkgconf(*args: str, **subprocess_kwargs: Any) -> subprocess.CompletedProcess:
91
97
  """Run the pkgconf executable.
92
98
 
93
99
  :param args: Arguments to pass to the pkgconf call.
@@ -2,9 +2,10 @@ import logging
2
2
  import os
3
3
  import subprocess
4
4
  import sys
5
+ import sysconfig
5
6
  import warnings
6
7
 
7
- from typing import Optional, TextIO, Type, Union
8
+ from typing import Optional, TextIO, Union
8
9
 
9
10
  import pkgconf
10
11
 
@@ -14,8 +15,15 @@ _LOGGER = logging.getLogger(__name__)
14
15
 
15
16
  def main() -> None:
16
17
  args = sys.argv[1:]
18
+
19
+ # If we find that we are calling ourselves, exit immediately
20
+ if os.environ.get('PKGCONF_PYPI_RECURSIVE') == __file__:
21
+ _LOGGER.info('Giving up, pkgconf recursion loop detected')
22
+ sys.exit(1)
23
+
24
+ os.environ['PKGCONF_PYPI_RECURSIVE'] = __file__
17
25
  try:
18
- pkgconf.run_pkgconf(*args, check=True)
26
+ process = pkgconf.run_pkgconf(*args, check=True)
19
27
  except subprocess.SubprocessError:
20
28
  # If our pkgconf lookup fails, fallback to the system pkgconf/pkg-config.
21
29
  # For simplicity, the previous call will output to stdout/stderr
@@ -29,7 +37,30 @@ def main() -> None:
29
37
  cmd = [os.fspath(system_executable), *args]
30
38
  _LOGGER.info(f'Running the system {system_executable.name}')
31
39
  _LOGGER.info('$ ' + ' '.join(cmd))
32
- subprocess.run(cmd)
40
+ process = subprocess.run(cmd)
41
+
42
+ sys.exit(process.returncode)
43
+
44
+
45
+ def _entrypoint():
46
+ # Since project.script entrypoints use an hardcoded interpreter path from
47
+ # the environment they were installed in, when stacking environments (eg.
48
+ # using venv's --system-site-packages option), the entrypoint will run in
49
+ # the base environment and, as such, it will not have access to the
50
+ # entrypoints from the "child" environment. Because of this, when a virtual
51
+ # environment is enabled, instead of running main() from this process, we
52
+ # will run 'python -m pkgconf', so that we have access to the full
53
+ # environment.
54
+ if 'VIRTUAL_ENV' in os.environ:
55
+ venv_vars = sysconfig.get_config_vars().copy()
56
+ venv_vars['base'] = venv_vars['platbase'] = os.environ['VIRTUAL_ENV']
57
+ scripts = sysconfig.get_path('scripts', scheme='venv', vars=venv_vars)
58
+ python_path = os.path.join(scripts, 'python')
59
+ process = subprocess.run([python_path, '-m', 'pkgconf', *sys.argv[1:]])
60
+ sys.exit(process.returncode)
61
+ else:
62
+ _setup_cli()
63
+ main()
33
64
 
34
65
 
35
66
  def _use_colors() -> bool:
@@ -64,7 +95,7 @@ def _setup_cli():
64
95
 
65
96
  def _showwarning(
66
97
  message: Union[Warning, str],
67
- category: Type[Warning],
98
+ category: type[Warning],
68
99
  filename: str,
69
100
  lineno: int,
70
101
  file: Optional[TextIO] = None,
@@ -75,10 +106,6 @@ def _setup_cli():
75
106
  warnings.showwarning = _showwarning
76
107
 
77
108
 
78
- def _entrypoint():
109
+ if __name__ == '__main__':
79
110
  _setup_cli()
80
111
  main()
81
-
82
-
83
- if __name__ == '__main__':
84
- _entrypoint()
@@ -0,0 +1,73 @@
1
+ import contextlib
2
+ import importlib.util
3
+ import sys
4
+ import types
5
+
6
+ from typing import Any
7
+
8
+
9
+ class LazyModule(types.ModuleType):
10
+ def __getattribute__(self, name: str) -> Any:
11
+ with contextlib.suppress(AttributeError):
12
+ return object.__getattribute__(self, name)
13
+ # Undo patching — restore the original __getattribute__, __class__, and loader_state
14
+ __spec__ = object.__getattribute__(self, '__spec__')
15
+ object.__setattr__(self, '__class__', __spec__.loader_state['__class__'])
16
+ object.__setattr__(self, '__getattribute__', __spec__.loader_state['__getattribute__'])
17
+ __spec__.loader_state = __spec__.loader_state['loader_state']
18
+ # Run the original __getattribute__
19
+ return self.__getattribute__(name)
20
+
21
+
22
+ class LazyLoader(importlib.util.LazyLoader):
23
+ """Custom type extending importlib.util.LazyLoader's capabilities.
24
+
25
+ It uses the importlib.util.LazyLoader implementation, but provides a custom
26
+ __getattribute__ that delays the execution when accessing types.ModuleType
27
+ attributes (like __spec__, __path__, __file__, etc.).
28
+
29
+ The original implementation triggers the module execution when accessing
30
+ *any* attribute, even ones initialized in types.ModuleType. While it is
31
+ highly discouraged to change any of these attributes during module
32
+ execution, it is technically permitted, so the default LazyLoader
33
+ implementation makes the decision to trigger the module execution on any
34
+ attribute access. We don't care so much about that, so we make choice to
35
+ allow attribute access to to existing pre-initilized attributes without
36
+ executing the module.
37
+ """
38
+
39
+ def exec_module(self, module: types.ModuleType) -> None:
40
+ # Run
41
+ super().exec_module(module)
42
+ # Get module.__spec__ using object.__getattribute__ to avoid triggering
43
+ # the original __getattribute__, which will always execute the module.
44
+ __spec__ = object.__getattribute__(module, '__spec__')
45
+ # Save the original __getattribute__ and __class__
46
+ __spec__.loader_state = {
47
+ '__class__': object.__getattribute__(module, '__class__'),
48
+ '__getattribute__': object.__getattribute__(module, '__getattribute__'),
49
+ 'loader_state': __spec__.loader_state,
50
+ }
51
+ # Replace __class__ so that attribute lookups use our __getattribute__
52
+ module.__class__ = LazyModule
53
+
54
+
55
+ def import_module_no_exec(name: str) -> types.ModuleType:
56
+ """Return a module object with all the module attributes set, but without executing it."""
57
+ if name in sys.modules:
58
+ return sys.modules[name]
59
+ # Import parent without execution
60
+ if parent := name.rpartition('.')[0]:
61
+ import_module_no_exec(parent)
62
+ # Find spec
63
+ spec = importlib.util.find_spec(name)
64
+ if not spec:
65
+ msg = f'No module named {name!r}'
66
+ raise ModuleNotFoundError(msg)
67
+ # Create module object without executing
68
+ module = importlib.util.module_from_spec(spec)
69
+ # Make the module load lazily (only executes when an attribute is accessed)
70
+ LazyLoader(spec.loader).create_module(module)
71
+ # Save to sys.modules
72
+ sys.modules[name] = module
73
+ return module
@@ -9,6 +9,7 @@ personality_dir = @PERSONALITY_PATH@
9
9
  pkgconfigdir = $(libdir)/pkgconfig
10
10
  nodist_pkgconfig_DATA = libpkgconf.pc
11
11
 
12
+ ACLOCAL_AMFLAGS = -I m4
12
13
  AM_CFLAGS = -DPERSONALITY_PATH=\"$(personality_dir)\" -DPKG_DEFAULT_PATH=\"$(pkg_default_dir)\" -DSYSTEM_INCLUDEDIR=\"$(system_includedir)\" -DSYSTEM_LIBDIR=\"$(system_libdir)\"
13
14
 
14
15
  bin_PROGRAMS = pkgconf bomtool
@@ -110,6 +111,7 @@ EXTRA_DIST = pkg.m4 \
110
111
  tests/lib1/sysroot-dir-3.pc \
111
112
  tests/lib1/sysroot-dir-4.pc \
112
113
  tests/lib1/sysroot-dir-5.pc \
114
+ tests/lib1/child-prefix/pkgconfig/child-prefix-1.pc \
113
115
  $(test_scripts) \
114
116
  doc/conf.py \
115
117
  doc/extract.py \
@@ -39,7 +39,7 @@ all: pkgconf-lite
39
39
  libpkgconf/config.h:
40
40
  @echo '#define PACKAGE_NAME "pkgconf-lite"' >> $@
41
41
  @echo '#define PACKAGE_BUGREPORT "https://git.dereferenced.org/pkgconf/pkgconf/issues"' >> $@
42
- @echo '#define PACKAGE_VERSION "2.2.0"' >> $@
42
+ @echo '#define PACKAGE_VERSION "2.3.0"' >> $@
43
43
  @echo '#define PACKAGE PACKAGE_NAME " " PACKAGE_VERSION' >> $@
44
44
  @echo '#define HAVE_STRLCPY' >> $@
45
45
  @echo '#define HAVE_STRLCAT' >> $@
@@ -1,6 +1,41 @@
1
1
  Changes from previous version of pkgconf
2
2
  ========================================
3
3
 
4
+ Changes from 2.2.0 to 2.3.0:
5
+ ----------------------------
6
+
7
+ * Fix compile with Meson on Solaris by defining __EXTENSIONS__.
8
+
9
+ * Add support for the PKG_CONFIG_RELOCATE_PATHS environmental variable.
10
+ When set, the program will act as if --define-prefix is always enabled.
11
+
12
+ * Color solution nodes that were part of the original query, and use
13
+ that coloring to skip over dependencies when generating DocumentNames
14
+ in bomtool.
15
+
16
+ * Enhance --env option to support variables with both --variable=varname
17
+ and --print-variables.
18
+
19
+ * Add --exists-cflags option which creates synthetic preprocessor
20
+ definition flags for every queried dependency when found.
21
+
22
+ * Document that Requires.private is always used for header paths.
23
+ Patch by Petr Písař.
24
+
25
+ * Fix minor documentation typos.
26
+ Patch by Pierce.
27
+
28
+ * Ensure string comparisons using <ctype.h> functions are done with
29
+ unsigned bytes to avoid undefined behavior.
30
+ Patch by Taylor R Campbell.
31
+
32
+ * Fix parsing edge-case bugs with dependency versions.
33
+ Patch by Kai Pastor.
34
+
35
+ * Change PKG_PROG_PKG_CONFIG autoconf macro to add a customizable
36
+ failure handler if pkg-config is not found.
37
+ Patch by Ismael Luceno.
38
+
4
39
  Changes from 2.1.1 to 2.2.0:
5
40
  ----------------------------
6
41
 
@@ -116,7 +116,7 @@ flags like so:
116
116
 
117
117
 
118
118
  pkgconf is compiled using [Meson](https://mesonbuild.com) on Windows. In theory, you could also use
119
- Meson to build on UNIX, but this is not recommended at this time as it pkgconf is typically built
119
+ Meson to build on UNIX, but this is not recommended at this time as pkgconf is typically built
120
120
  much earlier than Meson.
121
121
 
122
122
  $ meson setup build -Dtests=disabled
@@ -65,6 +65,9 @@ sbom_name(pkgconf_pkg_t *world)
65
65
  pkgconf_dependency_t *dep = node->data;
66
66
  pkgconf_pkg_t *match = dep->match;
67
67
 
68
+ if ((dep->flags & PKGCONF_PKG_DEPF_QUERY) != PKGCONF_PKG_DEPF_QUERY)
69
+ continue;
70
+
68
71
  if (!dep->match)
69
72
  continue;
70
73