Skip to content

Commit

Permalink
Avoid building package during dependencies installation
Browse files Browse the repository at this point in the history
  • Loading branch information
Argmaster committed Oct 10, 2024
1 parent e24e2bb commit b3a255f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/multiplatform_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
19 changes: 11 additions & 8 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down

0 comments on commit b3a255f

Please sign in to comment.