From 188d20ae7faa33109c953a7b8873d9a5b95bf3fc Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 1 Sep 2025 07:40:59 +0300 Subject: [PATCH 01/12] Update conanfile.py --- conanfile.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/conanfile.py b/conanfile.py index d0ba854da730..3a38ff38ed88 100644 --- a/conanfile.py +++ b/conanfile.py @@ -8,7 +8,7 @@ from conan.tools.cmake import cmake_layout from conan.tools.cmake import CMakeDeps from conan.tools.cmake import CMakeToolchain -from conan.tools.files import copy +from conan.tools.files import get, copy, export_conandata_patches from conan.tools.files import load from conan.tools.scm import Git from conan.tools.system import package_manager @@ -20,7 +20,7 @@ class UserverConan(ConanFile): name = 'userver' description = 'The C++ Asynchronous Framework' topics = ('framework', 'coroutines', 'asynchronous') - url = 'https://github.com/userver-framework/userver' + url = 'https://github.com/conan-io/conan-center-index' homepage = 'https://userver.tech/' license = 'Apache-2.0' package_type = 'static-library' @@ -91,15 +91,25 @@ class UserverConan(ConanFile): 're2/*:with_icu': True, } + def source(self) + known_version = (self.conan_data or {}).get("sources", {}).get(self.version) + if known_version: + get(self, **known_version, strip_root=True) + else: + pass # Running from userver-framework/userver + def export_sources(self): - git = Git(self) - tracked_sources = git.included_files() - # To speed up copying, we take only the root folders - tracked_sources = set(f.split('/')[0] for f in tracked_sources) - for i in tracked_sources: - copy(self, f'{i}*', self.recipe_folder, self.export_sources_folder) + known_version = (self.conan_data or {}).get("sources", {}).get(self.version) + if known_version: + export_conandata_patches(self) + else: + pass # Running from userver-framework/userver def set_version(self): + if self.version: + return + + # Building from userver-framework/userver content = load( self, os.path.join( From f477490a752b328100e3e5d1bcfd73640240cb61 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 1 Sep 2025 09:12:27 +0300 Subject: [PATCH 02/12] Update conanfile.py --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 3a38ff38ed88..4b72e1ec0996 100644 --- a/conanfile.py +++ b/conanfile.py @@ -91,7 +91,7 @@ class UserverConan(ConanFile): 're2/*:with_icu': True, } - def source(self) + def source(self): known_version = (self.conan_data or {}).get("sources", {}).get(self.version) if known_version: get(self, **known_version, strip_root=True) From 9bcbaaaed6cf42dafbf28f368121bb257a829549 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 1 Sep 2025 09:57:38 +0300 Subject: [PATCH 03/12] Fix conflicts: --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 21ec07e3ad80..418c2189d359 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -56,7 +56,7 @@ jobs: run: | export SDKROOT="`xcrun --show-sdk-path`" brew update - brew uninstall cmake + brew uninstall cmake # workaround for `Error: cmake was installed from the local/pinned tap` brew install $(cat scripts/docs/en/deps/macos.md) brew install clang-format brew install lld From 16f7a0aa924c79d0db0e80aaeea5b3087ee94e15 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 1 Sep 2025 10:15:56 +0300 Subject: [PATCH 04/12] Update conanfile.py --- conanfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 4b72e1ec0996..18470500ea5a 100644 --- a/conanfile.py +++ b/conanfile.py @@ -96,14 +96,15 @@ def source(self): if known_version: get(self, **known_version, strip_root=True) else: - pass # Running from userver-framework/userver + self.info('Using develop branch from git') + Git(self).clone('git@github.com:userver-framework/userver.git', target='.') def export_sources(self): known_version = (self.conan_data or {}).get("sources", {}).get(self.version) if known_version: export_conandata_patches(self) else: - pass # Running from userver-framework/userver + pass # Running from develop branch, no patches def set_version(self): if self.version: From 9ed0fff0a6c51760b18051bd551170c5a8e2abbe Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 1 Sep 2025 11:02:04 +0300 Subject: [PATCH 05/12] Update conanfile.py --- conanfile.py | 1 - 1 file changed, 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 18470500ea5a..eb16eee8fb4e 100644 --- a/conanfile.py +++ b/conanfile.py @@ -96,7 +96,6 @@ def source(self): if known_version: get(self, **known_version, strip_root=True) else: - self.info('Using develop branch from git') Git(self).clone('git@github.com:userver-framework/userver.git', target='.') def export_sources(self): From 387d0901f4b0d8e1ae4acb2ed867bf06012152d3 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 1 Sep 2025 12:06:42 +0300 Subject: [PATCH 06/12] Update conanfile.py --- conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index eb16eee8fb4e..2580c9f4a5d0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -96,7 +96,7 @@ def source(self): if known_version: get(self, **known_version, strip_root=True) else: - Git(self).clone('git@github.com:userver-framework/userver.git', target='.') + Git(self).clone('https://github.com/userver-framework/userver.git', target='.') def export_sources(self): known_version = (self.conan_data or {}).get("sources", {}).get(self.version) @@ -109,7 +109,6 @@ def set_version(self): if self.version: return - # Building from userver-framework/userver content = load( self, os.path.join( From aabb789a7263279333d484d1340cd0ac577652c6 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 1 Sep 2025 15:54:33 +0300 Subject: [PATCH 07/12] Update ci-conan.yml --- .github/workflows/ci-conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-conan.yml b/.github/workflows/ci-conan.yml index 2da1bcf62a96..6d55d3ba7878 100644 --- a/.github/workflows/ci-conan.yml +++ b/.github/workflows/ci-conan.yml @@ -66,7 +66,7 @@ jobs: - name: Install common packages run: | - pip install "conan==2.8.0" + pip install conan pip install numpy ${{ matrix.container && 'sudo -u test-user' }} conan profile detect ${{ matrix.container && 'sudo -u test-user' }} conan profile show From 7c35835c186867afe6b6e93015bd147e89654ab7 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 29 Sep 2025 13:07:22 +0300 Subject: [PATCH 08/12] Update macos.yml --- .github/workflows/macos.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 418c2189d359..157204b99e79 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,6 +12,7 @@ env: CCACHE_DIR: /Users/runner/Library/Caches/ccache CCACHE_NOHASHDIR: true CPM_SOURCE_CACHE: /Users/runner/Library/Caches/CPM + CMAKE_POLICY_VERSION_MINIMUM: 3.5 # Shut up the 'Compatibility with CMake < 3.5 has been removed from CMake' jobs: macos: From 1e419edbc01aa0b765665d8c7ae70c23afdd80da Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Mon, 29 Sep 2025 20:25:18 +0300 Subject: [PATCH 09/12] Update macos.yml --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 157204b99e79..2ca89d33c211 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,7 +12,7 @@ env: CCACHE_DIR: /Users/runner/Library/Caches/ccache CCACHE_NOHASHDIR: true CPM_SOURCE_CACHE: /Users/runner/Library/Caches/CPM - CMAKE_POLICY_VERSION_MINIMUM: 3.5 # Shut up the 'Compatibility with CMake < 3.5 has been removed from CMake' + CMAKE_POLICY_VERSION_MINIMUM: 3.15 # Shut up the 'Compatibility with CMake < 3.5 has been removed from CMake' jobs: macos: From 9bfd6ce334af98e8bc06df1686e366b5b742aa85 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 30 Sep 2025 09:16:20 +0300 Subject: [PATCH 10/12] Update ci-conan.yml --- .github/workflows/ci-conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-conan.yml b/.github/workflows/ci-conan.yml index 6d55d3ba7878..5113ab62a953 100644 --- a/.github/workflows/ci-conan.yml +++ b/.github/workflows/ci-conan.yml @@ -74,7 +74,7 @@ jobs: - name: Run conan run: | ${{ matrix.container && 'sudo -u test-user' }} git config --global --add safe.directory `pwd` - ${{ matrix.container && 'sudo -u test-user' }} conan create . --build=missing -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}} + ${{ matrix.container && 'sudo -u test-user' }} conan create . --udpate --build=missing -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}} - name: Install test dependencies if: matrix.os == 'ubuntu-22.04' From d91386dd53b1be192bca281d69cba5590b10131e Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 30 Sep 2025 11:27:37 +0300 Subject: [PATCH 11/12] Update ci-conan.yml --- .github/workflows/ci-conan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-conan.yml b/.github/workflows/ci-conan.yml index 5113ab62a953..95e4742c212c 100644 --- a/.github/workflows/ci-conan.yml +++ b/.github/workflows/ci-conan.yml @@ -74,7 +74,7 @@ jobs: - name: Run conan run: | ${{ matrix.container && 'sudo -u test-user' }} git config --global --add safe.directory `pwd` - ${{ matrix.container && 'sudo -u test-user' }} conan create . --udpate --build=missing -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}} + ${{ matrix.container && 'sudo -u test-user' }} conan create . --update --build=missing -s:a compiler.cppstd=17 -pr:b=default ${{matrix.conanflags}} - name: Install test dependencies if: matrix.os == 'ubuntu-22.04' From e220e4f199982d97cf754579c71ad9aaa2ed25ee Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 30 Sep 2025 20:15:35 +0300 Subject: [PATCH 12/12] cleanup --- .github/workflows/macos.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2ca89d33c211..418c2189d359 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,7 +12,6 @@ env: CCACHE_DIR: /Users/runner/Library/Caches/ccache CCACHE_NOHASHDIR: true CPM_SOURCE_CACHE: /Users/runner/Library/Caches/CPM - CMAKE_POLICY_VERSION_MINIMUM: 3.15 # Shut up the 'Compatibility with CMake < 3.5 has been removed from CMake' jobs: macos: