Skip to content

Commit e0605f0

Browse files
committed
[build] Make sure only binaries of OpenCV/PyAV are used.
Source distributions can't be built without the required toolchain and libraries available on the build system. Make sure Python packages are also built during the Linux build.
1 parent bcdc668 commit e0605f0

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ matrix:
3535

3636
install:
3737
- "python -m pip install --upgrade pip"
38+
# Make sure we get latest binary packages of the video input libraries.
39+
- "python -m pip install av opencv-python-headless --only-binary :all:"
40+
# Install other required packages and download required test resources.
3841
- "python -m pip install -r requirements_headless.txt"
3942
- "git fetch --depth=1 https://github.com/Breakthrough/PySceneDetect.git refs/heads/resources:refs/remotes/origin/resources"
4043
- "git checkout refs/remotes/origin/resources -- tests/resources/"
44+
# Make sure the Python package is buildable.
45+
- "python setup.py sdist bdist_wheel"
4146

4247
script:
43-
# TODO: Need to install ffmpeg/mkvtoolnix to run split-video tests.
4448
- python -m pytest tests/
49+
# TODO: Install and test the built Python packages.
50+
# TODO: Install ffmpeg/mkvtoolnix to run split-video tests.

appveyor.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ install:
2828
- python -m pip install --upgrade pip
2929
- python -m pip install --upgrade setuptools wheel pyinstaller==4.10
3030

31-
# Install PySceneDetect dependencies and checkout resources required for tests.
31+
# Make sure we get latest binary packages of the video input libraries.
32+
- python -m pip install av opencv-python-headless --only-binary ":all:"
33+
34+
# Install other PySceneDetect dependencies and checkout resources required for tests.
3235
- python -m pip install -r requirements_headless.txt
3336
- git fetch --depth=1 https://github.com/Breakthrough/PySceneDetect.git refs/heads/resources:refs/remotes/origin/resources
3437
- git checkout refs/remotes/origin/resources -- tests/resources/
@@ -45,7 +48,7 @@ test_script:
4548
- 7z e dist/windows_thirdparty.7z
4649

4750
# Run Unit Tests
48-
- pytest
51+
- python -m pytest tests/
4952

5053
# TODO: Test Python Distributions install and function correctly.
5154
# Wildcard expansion doesn't seem to work with pip here, e.g. the following fails:
@@ -58,6 +61,9 @@ test_script:
5861

5962

6063
artifacts:
64+
# TODO: Need to incorporate the build number into the package version. Use a custom setup.py
65+
# that modifies the version number in the package before building using an environment variable.
66+
6167
- path: dist/*.tar.gz
6268
name: PySceneDetect-sdist
6369

0 commit comments

Comments
 (0)