Skip to content

Commit 2093f6e

Browse files
committed
Avoid building package during dependencies installation
1 parent e24e2bb commit 2093f6e

File tree

2 files changed

+30
-19
lines changed

2 files changed

+30
-19
lines changed

.github/workflows/multiplatform_build.yaml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,23 @@ jobs:
4040
arch: "x64"
4141
env: true
4242

43-
- if: matrix.os == 'ubuntu-24.04'
44-
name: Install dependencies
45-
run: sudo apt-get install libtinfo5
46-
47-
- if: matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04'
48-
name: Set CXXFLAGS
49-
run: export CXXFLAGS="-stdlib=libc++"
43+
- if: startsWith(matrix.os, 'ubuntu')
44+
name: Install Python dependencies
45+
run: |
46+
sudo add-apt-repository universe
47+
sudo add-apt-repository restricted
48+
sudo add-apt-repository multiverse
49+
sudo apt-get update
50+
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
51+
libreadline-dev libsqlite3-dev wget curl llvm \
52+
libncurses5-dev libncursesw5-dev xz-utils tk-dev \
53+
libffi-dev liblzma-dev python3-openssl git
54+
export CXXFLAGS="-stdlib=libc++"
55+
56+
- if: startsWith(matrix.os, 'windows')
57+
name: Install Python dependencies
58+
run: |
59+
chcp 65001 #set code page to utf-8
5060
5161
- name: Set up Python ${{ matrix.python-version }}
5262
uses: actions/[email protected]
@@ -57,8 +67,8 @@ jobs:
5767
- name: Install Poetry
5868
run: pip install poetry==1.8.3
5969

60-
- name: Install Python dependencies
61-
run: poetry install --no-cache --sync
70+
- name: Install project dependencies
71+
run: poetry install --no-cache --sync --no-root
6272

6373
- name: Build distribution package
6474
run: poetry build --format wheel

build.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,33 @@
88
from pathlib import Path
99
import multiprocessing
1010

11+
1112
THIS_DIR = Path(__file__).parent
1213

1314

1415
class Builder:
1516
"""Class responsible for building epseon_backend binaries."""
1617

17-
DEPS: tuple[tuple[str, str], ...] = (
18-
("googletest", "release-1.12.1"),
19-
("spdlog", "v1.12.0"),
20-
("pybind11", "v2.11.1"),
21-
("fmt", "10.1.1"),
22-
("vma_hpp", "v3.0.1-3"),
23-
)
24-
2518
def __init__(self) -> None:
2619
"""Initialize builder object."""
2720
self.repo_path = Path(__file__).parent
2821

2922
def build(self) -> None:
3023
"""Build extension module."""
24+
build_directory = Path.cwd() / "build"
25+
os.environ["PATH"] += os.pathsep + os.path.dirname(sys.executable)
3126
self.cmake(
32-
"-S", ".", "-B", "build", "-DCMAKE_BUILD_TYPE=Release", "-G", "Ninja"
27+
"-S",
28+
".",
29+
"-B",
30+
build_directory.as_posix(),
31+
"-DCMAKE_BUILD_TYPE=Release",
32+
"-G",
33+
"Ninja",
3334
)
3435
self.cmake(
3536
"--build",
36-
"build",
37+
build_directory.as_posix(),
3738
"--target",
3839
"PyGerberGerberParserCpp",
3940
"-j",

0 commit comments

Comments
 (0)