From b3a255f0123c3b99df1b633462a711a369974786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Wi=C5=9Bniewski?= Date: Thu, 10 Oct 2024 03:04:03 +0200 Subject: [PATCH] Avoid building package during dependencies installation --- .github/workflows/multiplatform_build.yaml | 13 ++++++++----- build.py | 19 +++++++++++-------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/multiplatform_build.yaml b/.github/workflows/multiplatform_build.yaml index 8cfb53f..ef66393 100644 --- a/.github/workflows/multiplatform_build.yaml +++ b/.github/workflows/multiplatform_build.yaml @@ -40,9 +40,12 @@ jobs: arch: "x64" env: true - - if: matrix.os == 'ubuntu-24.04' - name: Install dependencies - run: sudo apt-get install libtinfo5 + - if: startsWith(matrix.os, 'ubuntu') + name: Install Python dependencies + run: sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \ + libreadline-dev libsqlite3-dev wget curl llvm \ + libncurses5-dev libncursesw5-dev xz-utils tk-dev \ + libffi-dev liblzma-dev python3-openssl git - if: matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04' name: Set CXXFLAGS @@ -57,8 +60,8 @@ jobs: - name: Install Poetry run: pip install poetry==1.8.3 - - name: Install Python dependencies - run: poetry install --no-cache --sync + - name: Install project dependencies + run: poetry install --no-cache --sync --no-root - name: Build distribution package run: poetry build --format wheel diff --git a/build.py b/build.py index 5049d65..254161c 100644 --- a/build.py +++ b/build.py @@ -14,17 +14,20 @@ class Builder: """Class responsible for building epseon_backend binaries.""" - DEPS: tuple[tuple[str, str], ...] = ( - ("googletest", "release-1.12.1"), - ("spdlog", "v1.12.0"), - ("pybind11", "v2.11.1"), - ("fmt", "10.1.1"), - ("vma_hpp", "v3.0.1-3"), - ) - def __init__(self) -> None: """Initialize builder object.""" self.repo_path = Path(__file__).parent + subprocess.check_call( + executable=sys.executable, + args=[ + sys.executable, + "-m", + "pip", + "list", + ], + env=os.environ, + cwd=self.repo_path.as_posix(), + ) def build(self) -> None: """Build extension module."""