Skip to content

Commit

Permalink
Apply comptime in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue committed Aug 1, 2024
1 parent b68ec33 commit 2edbe9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Compile Time
run: python scripts/comptime.py 6.1
- name: Build source package
run: |
pip install cython
Expand Down Expand Up @@ -56,6 +58,8 @@ jobs:
- name: Set deployment target
if: matrix.os == 'macos-13' || matrix.os == 'macos-14'
run: echo "MACOSX_DEPLOYMENT_TARGET=10.13" >> $GITHUB_ENV
- name: Compile Time
run: python scripts/comptime.py 6.1
- name: Build wheels
env:
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down
6 changes: 4 additions & 2 deletions scripts/comptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ def process_directory(directory):
file_path = os.path.join(root, file)
replace_in_file(file_path)

if sys.platform == "win32":

version = os.environ.get("PYAV_LIBRARY")
if version is None:
is_6 = sys.argv[1].startswith("6")
else:
is_6 = os.environ.get("PYAV_LIBRARY").startswith("ffmpeg-6")
is_6 = version.startswith("ffmpeg-6")

if is_6:
process_directory("av")
Expand Down

0 comments on commit 2edbe9d

Please sign in to comment.