Skip to content

Commit 37b885f

Browse files
authored
fix build (#72)
* maybe fix sdidst build again * maybe fix tests build * maybe fix tests again * fix tests again * fix tests build on macos * maybe fix macos tests * debug * debug * update pip * update pip * update pip * fix * fix wheel installation on old pythons https://eclecticlight.co/2020/08/13/macos-version-numbering-isnt-so-simple/ * fix wheel installation on old pythons https://eclecticlight.co/2020/08/13/macos-version-numbering-isnt-so-simple/ * cffi
1 parent d5a2043 commit 37b885f

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

.github/workflows/ci-ffi-python.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
submodules: recursive
7777
- name: Run Python Script
78-
run: pyroscope_ffi/python/scripts/tests/test.py
78+
run: python pyroscope_ffi/python/scripts/tests/test.py
7979
env:
8080
PYROSCOPE_RUN_ID: ${{ github.run_id }}
8181
PYROSCOPE_ARCH: x86-64-linux
@@ -177,16 +177,18 @@ jobs:
177177
with:
178178
name: x86_64-apple-darwin
179179
path: "${{github.workspace}}/python"
180-
181-
- run: "python --version"
182-
- run: "python3 --version"
180+
- run: "python --version ; pip --version ; python3 --version ; pip3 --version; pip list; uname -a"
181+
- run: "pip install pip cffi --upgrade"
183182
- run: "cd ${{ github.workspace }}/python && ls -l"
184-
- run: "cd ${{ github.workspace }}/python && pip3 install *.whl"
183+
- name: Install wheel
184+
run: "cd ${{ github.workspace }}/python && pip install *.whl"
185+
env:
186+
SYSTEM_VERSION_COMPAT: 0
185187
- uses: actions/checkout@v2
186188
with:
187189
submodules: recursive
188190
- name: Run Python Script
189-
run: pyroscope_ffi/python/scripts/tests/test.py
191+
run: python pyroscope_ffi/python/scripts/tests/test.py
190192
env:
191193
PYROSCOPE_RUN_ID: ${{ github.run_id }}
192194
PYROSCOPE_ARCH: x86-64-apple-darwin
@@ -208,7 +210,9 @@ jobs:
208210
- uses: actions/setup-python@v4
209211
with:
210212
python-version: 3.9
211-
213+
- name: Upgrade pip
214+
run: |
215+
python -m pip install --upgrade pip pipenv wheel
212216
- name: Build sdist
213217
run: python setup.py sdist
214218
working-directory: pyroscope_ffi/python

pyroscope_ffi/python/scripts/tests/test.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
import hashlib
32
import os
43
import threading
@@ -13,9 +12,9 @@
1312

1413
# Configure Pyroscope
1514
pyroscope.configure(
16-
application_name = f'{os.getenv("PYROSCOPE_RUN_ID")}',
15+
application_name = '{}'.format(os.getenv("PYROSCOPE_RUN_ID")),
1716
server_address = "https://ingest.pyroscope.cloud",
18-
auth_token = f'{os.getenv("PYROSCOPE_API_TOKEN")}',
17+
auth_token = '{}'.format(os.getenv("PYROSCOPE_API_TOKEN")),
1918
enable_logging =True,
2019
detect_subprocesses = os.getenv("PYROSCOPE_DETECT_SUBPROCESSES") == "true",
2120
oncpu = os.getenv("PYROSCOPE_ONCPU") == "true",
@@ -24,11 +23,11 @@
2423
report_thread_id = True,
2524
report_thread_name = True,
2625
tags = {
27-
"detect_subprocesses": f'{os.getenv("PYROSCOPE_DETECT_SUBPROCESSES")}',
28-
"oncpu": f'{os.getenv("PYROSCOPE_ONCPU")}',
29-
"gil_only": f'{os.getenv("PYROSCOPE_GIL_ONLY")}',
30-
"version": f'{os.getenv("PYTHON_VERSION")}',
31-
"arch": f'{os.getenv("PYROSCOPE_ARCH")}',
26+
"detect_subprocesses": '{}'.format(os.getenv("PYROSCOPE_DETECT_SUBPROCESSES")),
27+
"oncpu": '{}'.format(os.getenv("PYROSCOPE_ONCPU")),
28+
"gil_only": '{}'.format(os.getenv("PYROSCOPE_GIL_ONLY")),
29+
"version": '{}'.format(os.getenv("PYTHON_VERSION")),
30+
"arch": '{}'.format(os.getenv("PYROSCOPE_ARCH")),
3231
}
3332
)
3433

0 commit comments

Comments
 (0)