Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into letmaik/mac-arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
letmaik committed Feb 8, 2024
2 parents 29cb6fd + 894352e commit a3bff09
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/build-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ set -e -x
# List python versions
ls /opt/python

if [ $PYTHON_VERSION == "3.7" ]; then
PYBIN="/opt/python/cp37-cp37m/bin"
elif [ $PYTHON_VERSION == "3.8" ]; then
if [ $PYTHON_VERSION == "3.8" ]; then
PYBIN="/opt/python/cp38-cp38/bin"
elif [ $PYTHON_VERSION == "3.9" ]; then
PYBIN="/opt/python/cp39-cp39/bin"
elif [ $PYTHON_VERSION == "3.10" ]; then
PYBIN="/opt/python/cp310-cp310/bin"
elif [ $PYTHON_VERSION == "3.11" ]; then
PYBIN="/opt/python/cp311-cp311/bin"
elif [ $PYTHON_VERSION == "3.12" ]; then
PYBIN="/opt/python/cp312-cp312/bin"
else
echo "Unsupported Python version $PYTHON_VERSION"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/build-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set -x
popd

# Install dependencies
pip install numpy==$NUMPY_VERSION wheel delocate
pip install numpy==$NUMPY_VERSION wheel delocate setuptools

# List installed packages
pip freeze
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/test-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ set -e -x
# List python versions
ls /opt/python

if [ $PYTHON_VERSION == "3.7" ]; then
PYBIN="/opt/python/cp37-cp37m/bin"
elif [ $PYTHON_VERSION == "3.8" ]; then
if [ $PYTHON_VERSION == "3.8" ]; then
PYBIN="/opt/python/cp38-cp38/bin"
elif [ $PYTHON_VERSION == "3.9" ]; then
PYBIN="/opt/python/cp39-cp39/bin"
elif [ $PYTHON_VERSION == "3.10" ]; then
PYBIN="/opt/python/cp310-cp310/bin"
elif [ $PYTHON_VERSION == "3.11" ]; then
PYBIN="/opt/python/cp311-cp311/bin"
elif [ $PYTHON_VERSION == "3.12" ]; then
PYBIN="/opt/python/cp312-cp312/bin"
else
echo "Unsupported Python version $PYTHON_VERSION"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/test-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ exec { python -m pip install -r dev-requirements.txt }

# Install test helper package
Push-Location test/win-dshow-capture
exec { python -m pip install wheel }
exec { python -m pip install wheel setuptools }
exec { python -u setup.py bdist_wheel }
python -m pip uninstall -y pyvirtualcam_win_dshow_capture
ls dist\*cp${PYVER}*win*.whl | % { exec { python -m pip install $_ } }
Expand Down
62 changes: 42 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ jobs:
matrix:
config:
# NOTE: When updating this list, also update the 'test' job!
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-version: '3.7'
numpy-version: '1.14.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
Expand All @@ -62,6 +57,11 @@ jobs:
docker-image: quay.io/pypa/manylinux2014_x86_64
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-version: '3.12'
numpy-version: '1.26.*'

- os-image: macos-11
os-name: mac
Expand Down Expand Up @@ -99,12 +99,18 @@ jobs:
macos-min-version: '11.0'
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: macos-11
os-name: mac
macos-min-version: '10.9'
python-version: '3.12'
numpy-version: '1.26.*'
- os-image: macos-14 # M1
os-name: mac
arch: arm64
macos-min-version: '11.0'
python-version: '3.12'
numpy-version: '1.26.*'

- os-image: windows-latest
os-name: windows
python-version: '3.7'
python-arch: '64'
numpy-version: '1.14.*'
- os-image: windows-latest
os-name: windows
python-version: '3.8'
Expand All @@ -125,6 +131,11 @@ jobs:
python-version: '3.11'
python-arch: '64'
numpy-version: '1.23.*'
- os-image: windows-latest
os-name: windows
python-version: '3.12'
python-arch: '64'
numpy-version: '1.26.*'

permissions:
security-events: write
Expand Down Expand Up @@ -194,11 +205,6 @@ jobs:
# GitHub Actions doesn't support YAML anchors,
# so this has to be duplicated here.
config:
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-version: '3.7'
numpy-version: '1.14.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
Expand All @@ -219,6 +225,11 @@ jobs:
docker-image: quay.io/pypa/manylinux2014_x86_64
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-version: '3.12'
numpy-version: '1.26.*'

- os-image: macos-11
os-name: mac
Expand Down Expand Up @@ -256,12 +267,18 @@ jobs:
macos-min-version: '11.0'
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: macos-11
os-name: mac
macos-min-version: '10.9'
python-version: '3.12'
numpy-version: '1.26.*'
- os-image: macos-14 # M1
os-name: mac
arch: arm64
macos-min-version: '11.0'
python-version: '3.12'
numpy-version: '1.26.*'

- os-image: windows-latest
os-name: windows
python-version: '3.7'
python-arch: '64'
numpy-version: '1.14.*'
- os-image: windows-latest
os-name: windows
python-version: '3.8'
Expand All @@ -282,6 +299,11 @@ jobs:
python-version: '3.11'
python-arch: '64'
numpy-version: '1.23.*'
- os-image: windows-latest
os-name: windows
python-version: '3.12'
python-arch: '64'
numpy-version: '1.26.*'

runs-on: ${{ matrix.config.os-image }}
container: ${{ matrix.config.docker-image }}
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.11.0] - 2023-12-10
### Added
- Python 3.12 support.

### Removed
- Drop Python 3.7 support.

## [0.10.2] - 2022-10-30
### Added
- Python 3.11 support.
Expand Down Expand Up @@ -124,7 +131,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Windows only, Python 3.5 - 3.8.
- Support for [OBS-VirtualCam](https://github.com/CatxFish/obs-virtual-cam).


[0.11.0]: https://github.com/letmaik/pyvirtualcam/compare/v0.10.2...v0.11.0
[0.10.2]: https://github.com/letmaik/pyvirtualcam/compare/v0.10.1...v0.10.2
[0.10.1]: https://github.com/letmaik/pyvirtualcam/compare/v0.10.0...v0.10.1
[0.10.0]: https://github.com/letmaik/pyvirtualcam/compare/v0.9.1...v0.10.0
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ To use the Unity Capture virtual camera, follow the [installation instructions](

[OBS](https://obsproject.com/) includes a built-in virtual camera for macOS (since 26.1).

**NOTE**: Starting with pyvirtualcam 0.10, only OBS 28 is supported. Install an older version if you need OBS 26 / 27 support.
**NOTE**: Starting with pyvirtualcam 0.10, only OBS 28 or higher is supported. Install an older version if you need OBS 26 / 27 support.

**HELP WANTED**: pyvirtualcam requires code updates to run on macOS 14 and higher. If you own a Mac, consider contributing: https://github.com/letmaik/pyvirtualcam/issues/111#issuecomment-1763398540.

To use the OBS virtual camera, follow these one-time setup steps:
- [Install OBS](https://obsproject.com/).
Expand Down
2 changes: 1 addition & 1 deletion pyvirtualcam/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.10.2"
__version__ = "0.11.0"
2 changes: 1 addition & 1 deletion pyvirtualcam/native_linux_v4l2loopback/virtual_output.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class VirtualOutput {
} catch (std::exception &ex) {
close(_camera_fd);
_camera_fd = -1;
throw ex;
throw;
}
};

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import platform
import sys
import glob
from distutils.unixccompiler import UnixCCompiler
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext
import setuptools

from distutils.unixccompiler import UnixCCompiler

class get_pybind_include(object):
"""Helper class to determine the pybind11 include path
The purpose of this class is to postpone importing pybind11
Expand Down Expand Up @@ -85,7 +86,7 @@ def has_flag(compiler, flagname):
fname = f.name
try:
compiler.compile([fname], extra_postargs=[flagname])
except setuptools.distutils.errors.CompileError:
except setuptools.errors.CompileError:
return False
finally:
try:
Expand Down

0 comments on commit a3bff09

Please sign in to comment.