Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conan/tools/gnu/pkgconfigdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def _pc_file_name(name_, is_build_context=False, has_suffix=False):
build = is_build_context and self.build_context_folder and not has_suffix
# Issue: https://github.com/conan-io/conan/issues/12342
# Issue: https://github.com/conan-io/conan/issues/14935
return f"{self.build_context_folder}/{name_}.pc" if build else f"{name_}.pc"
return f"{self.build_context_folder}/{name_}-uninstalled.pc" if build else f"{name_}-uninstalled.pc"

check_duplicated_generator(self, self._conanfile)
for require, dep in self._get_dependencies():
Expand Down
6 changes: 3 additions & 3 deletions test/functional/toolchains/gnu/test_pkgconfigdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def build_requirements(self):
''')
client.save({"conanfile.py": conanfile}, clean_first=True)
client.run("install . -g PkgConfigDeps")
assert "Description: Conan package: test" in client.load("test.pc")
assert "Description: Conan package: app" in client.load("app.pc")
assert "Description: Conan package: test" in client.load("test-uninstalled.pc")
assert "Description: Conan package: app" in client.load("app-uninstalled.pc")


@pytest.mark.skipif(platform.system() != "Windows", reason="It makes sense only for Windows")
Expand Down Expand Up @@ -126,5 +126,5 @@ def package_info(self):
client.save({"conanfile.py": conanfile}, clean_first=True)
client.run("export-pkg .")
client.run("install --requires=hello/0.1 -g PkgConfigDeps")
content = client.load("hello.pc")
content = client.load("hello-uninstalled.pc")
assert "Conan component: hello" in content
2 changes: 1 addition & 1 deletion test/integration/graph/test_platform_requires.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class Pkg(ConanFile):
client.run("install . -pr=profile")
assert "dep/1.1 - Platform" in client.out
assert not os.path.exists(os.path.join(client.current_folder, "dep-config.cmake"))
assert not os.path.exists(os.path.join(client.current_folder, "dep.pc"))
assert not os.path.exists(os.path.join(client.current_folder, "dep-uninstalled.pc"))


class TestPackageID:
Expand Down
20 changes: 10 additions & 10 deletions test/integration/graph/test_replace_requires.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,9 @@ class App(ConanFile):
c.run("install app -pr=profile -c tools.cmake.cmakedeps:new=will_break_next")
assert "zlib/0.1: zlib-ng/0.1" in c.out

pc_content = c.load("app/ZLIB.pc")
pc_content = c.load("app/ZLIB-uninstalled.pc")
assert 'Libs: -L"${libdir}" -lzlib' in pc_content
pc_content = c.load("app/openssl.pc")
pc_content = c.load("app/openssl-uninstalled.pc")
assert 'Requires: ZLIB' in pc_content

cmake = c.load("app/ZLIB-Targets-release.cmake")
Expand Down Expand Up @@ -525,9 +525,9 @@ class App(ConanFile):
c.run("install app -pr=profile -c tools.cmake.cmakedeps:new=will_break_next")
assert "zlib/0.1: zlib-ng/0.1" in c.out

pc_content = c.load("app/ZLIB.pc")
pc_content = c.load("app/ZLIB-uninstalled.pc")
assert 'Libs: -L"${libdir}" -lzlib' in pc_content
pc_content = c.load("app/openssl-crypto.pc")
pc_content = c.load("app/openssl-crypto-uninstalled.pc")
assert 'Requires: ZLIB' in pc_content

cmake = c.load("app/ZLIB-Targets-release.cmake")
Expand Down Expand Up @@ -609,11 +609,11 @@ class App(ConanFile):
c.run("install app -pr=profile -c tools.cmake.cmakedeps:new=will_break_next")
assert "zlib/0.1: zlib-ng/0.1" in c.out

pc_content = c.load("app/zlib-ng.pc")
pc_content = c.load("app/zlib-ng-uninstalled.pc")
assert 'Requires: ZLIB' in pc_content
pc_content = c.load("app/ZLIB.pc")
pc_content = c.load("app/ZLIB-uninstalled.pc")
assert 'Libs: -L"${libdir}" -lzlib' in pc_content
pc_content = c.load("app/openssl.pc")
pc_content = c.load("app/openssl-uninstalled.pc")
assert 'Requires: zlib-ng' in pc_content

cmake = c.load("app/ZLIB-Targets-release.cmake")
Expand Down Expand Up @@ -699,11 +699,11 @@ class App(ConanFile):
c.run("install app -pr=profile -c tools.cmake.cmakedeps:new=will_break_next")
assert "zlib/0.1: zlib-ng/0.1" in c.out

pc_content = c.load("app/zlib-ng.pc")
pc_content = c.load("app/zlib-ng-uninstalled.pc")
assert 'Requires: ZLIB' in pc_content
pc_content = c.load("app/ZLIB.pc")
pc_content = c.load("app/ZLIB-uninstalled.pc")
assert 'Libs: -L"${libdir}" -lzlib' in pc_content
pc_content = c.load("app/openssl-crypto.pc")
pc_content = c.load("app/openssl-crypto-uninstalled.pc")
assert f'Requires: {"zlib-ng" if package_requires else "ZLIB"}' in pc_content

cmake = c.load("app/ZLIB-Targets-release.cmake")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/graph/test_system_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def generate(self):
client.run("install . -pr=profile")
assert "tool/1.1 - Platform" in client.out
assert not os.path.exists(os.path.join(client.current_folder, "tool-config.cmake"))
assert not os.path.exists(os.path.join(client.current_folder, "tool.pc"))
assert not os.path.exists(os.path.join(client.current_folder, "tool-uninstalled.pc"))


class TestPackageID:
Expand Down
2 changes: 1 addition & 1 deletion test/integration/layout/test_layout_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def layout(self):
data = c.load(f"pkg/dep-release-x86_64-data.cmake")

assert 'set(dep_INCLUDE_DIRS_RELEASE "${dep_PACKAGE_FOLDER_RELEASE}/include")' in data
pc = c.load("pkg/dep.pc")
pc = c.load("pkg/dep-uninstalled.pc")
assert "includedir=${prefix}/include" in pc
xcode = c.load("pkg/conan_dep_dep_release_x86_64.xcconfig")
dep_path = os.path.join(c.current_folder, "dep")
Expand Down
4 changes: 2 additions & 2 deletions test/integration/toolchains/cmake/cmakedeps/test_cmakedeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,9 @@ def package_info(self):
c.run("install --requires=dep/system -g CMakeDeps -g PkgConfigDeps")
dep = c.load("dep-config-version.cmake")
assert 'set(PACKAGE_VERSION "1.0")' in dep
dep = c.load("dep.pc")
dep = c.load("dep-uninstalled.pc")
assert 'Version: 1.0' in dep
dep = c.load("dep-mycomp.pc")
dep = c.load("dep-mycomp-uninstalled.pc")
assert 'Version: 2.3' in dep

def test_component_version_consumer(self):
Expand Down
4 changes: 2 additions & 2 deletions test/integration/toolchains/gnu/test_basic_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def layout(self):
c.run("install pkg -s arch=x86_64 -g CMakeDeps -g PkgConfigDeps -g XcodeDeps")
data = c.load(f"pkg/dep-release-x86_64-data.cmake")
assert 'set(dep_INCLUDE_DIRS_RELEASE "${dep_PACKAGE_FOLDER_RELEASE}/src/include")' in data
pc = c.load("pkg/dep.pc")
pc = c.load("pkg/dep-uninstalled.pc")
assert "includedir=${prefix}/src/include" in pc
xcode = c.load("pkg/conan_dep_dep_release_x86_64.xcconfig")
dep_path = os.path.join(c.current_folder, "dep", "src", "include")
Expand Down Expand Up @@ -77,7 +77,7 @@ def layout(self):
c.run("install pkg -s arch=x86_64 -g CMakeDeps -g PkgConfigDeps -g XcodeDeps")
data = c.load(f"pkg/dep-release-x86_64-data.cmake")
assert 'set(dep_INCLUDE_DIRS_RELEASE "${dep_PACKAGE_FOLDER_RELEASE}/src/somefolder")' in data
pc = c.load("pkg/dep.pc")
pc = c.load("pkg/dep-uninstalled.pc")
assert "includedir=${prefix}/src/somefolder" in pc
xcode = c.load("pkg/conan_dep_dep_release_x86_64.xcconfig")
dep_path = os.path.join(c.current_folder, "dep", "src", "somefolder")
Expand Down
Loading
Loading