-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from jim-easterbrook/devel
Devel
- Loading branch information
Showing
12 changed files
with
113 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: build gphoto2 macOS arm64 | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download libgphoto2 | ||
run: wget -nv | ||
https://github.com/gphoto/libgphoto2/releases/download/v2.5.31/libgphoto2-2.5.31.tar.xz | ||
-O libgphoto2.tar.xz | ||
|
||
- name: Extract libgphoto2 | ||
run: | | ||
mkdir $PWD/libgphoto2 | ||
tar xf libgphoto2.tar.xz \ | ||
--directory $PWD/libgphoto2 --strip-components=1 | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS: arm64 | ||
CIBW_SKIP: pp3* | ||
CIBW_ENVIRONMENT: > | ||
GPHOTO2_ROOT=$PWD/libgphoto2/local_install | ||
MACOSX_DEPLOYMENT_TARGET="14.0" | ||
SYSTEM_VERSION_COMPAT=0 | ||
CIBW_TEST_COMMAND: > | ||
python3 -m gphoto2 -v && | ||
python3 -m unittest discover {project}/tests -v | ||
CIBW_BEFORE_ALL: > | ||
brew install libexif libtool gd && | ||
pushd $PWD/libgphoto2 && | ||
./configure --prefix=$PWD/local_install --disable-internal-docs \ | ||
--enable-vusb \ | ||
CFLAGS="-D_DARWIN_C_SOURCE -I$(brew --prefix)/include" && | ||
make && | ||
make install && | ||
popd | ||
- name: Store results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-wheels | ||
path: wheelhouse/*.whl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
name: Build MacOS binary wheels | ||
name: build gphoto2 macOS x86_64 | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
runs-on: macos-13 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download libgphoto2 | ||
run: wget -nv | ||
|
@@ -20,13 +20,19 @@ jobs: | |
--directory $PWD/libgphoto2 --strip-components=1 | ||
- name: Build wheels | ||
uses: pypa/cibuildwheel@v2.16.2 | ||
uses: pypa/cibuildwheel@v2.21.3 | ||
env: | ||
CIBW_ARCHS: x86_64 | ||
CIBW_SKIP: pp3* | ||
CIBW_ENVIRONMENT: GPHOTO2_ROOT=$PWD/libgphoto2/local_install | ||
CIBW_ENVIRONMENT: > | ||
GPHOTO2_ROOT=$PWD/libgphoto2/local_install | ||
MACOSX_DEPLOYMENT_TARGET="13.0" | ||
SYSTEM_VERSION_COMPAT=0 | ||
CIBW_TEST_COMMAND: > | ||
python3 -m gphoto2 -v && | ||
python3 -m unittest discover {project}/tests -v | ||
CIBW_BEFORE_ALL: > | ||
brew install libexif jpeg-turbo libtool libusb gd gettext && | ||
brew install libexif && | ||
pushd $PWD/libgphoto2 && | ||
./configure --prefix=$PWD/local_install --disable-internal-docs \ | ||
--enable-vusb \ | ||
|
@@ -36,35 +42,7 @@ jobs: | |
popd | ||
- name: Store results | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-wheels | ||
path: wheelhouse/*.whl | ||
|
||
test: | ||
needs: build | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Fetch wheel files | ||
uses: actions/[email protected] | ||
with: | ||
name: macos-wheels | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: 'x64' | ||
|
||
- name: Install wheel | ||
run: pip3 install --disable-pip-version-check --no-index | ||
--find-links=. gphoto2 | ||
|
||
- name: Test installation | ||
run: python3 -m unittest discover tests -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
name: Build manylinux binary wheels | ||
name: build gphoto2 linux x86_64 | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download libgphoto2 | ||
run: wget -nv | ||
|
@@ -20,60 +20,27 @@ jobs: | |
--directory $PWD/libgphoto2 --strip-components=1 | ||
- name: Build wheels | ||
uses: pypa/cibuildwheel@v2.16.2 | ||
uses: pypa/cibuildwheel@v2.21.3 | ||
env: | ||
CIBW_ARCHS: auto64 | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
CIBW_BUILD: cp*-manylinux_x86_64 | ||
CIBW_ENVIRONMENT: GPHOTO2_ROOT=$PWD/libgphoto2/local_install | ||
CIBW_TEST_COMMAND: > | ||
python3 -m gphoto2 -v && | ||
python3 -m unittest discover {project}/tests -v | ||
CIBW_BEFORE_ALL: > | ||
yum install -y libusbx-devel libexif-devel libjpeg-turbo-devel \ | ||
gd-devel libcurl-devel libxml2-devel libtool-ltdl-devel && | ||
yum install -y libusbx-devel libexif-devel libjpeg-turbo-devel | ||
gd-devel libcurl-devel libxml2-devel libtool-ltdl-devel && | ||
pushd $PWD/libgphoto2 && | ||
./configure --prefix=$PWD/local_install --disable-internal-docs \ | ||
--enable-vusb && | ||
./configure --prefix=$PWD/local_install --disable-internal-docs | ||
--enable-vusb && | ||
make && | ||
make install && | ||
popd | ||
- name: Store results | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: manylinux-wheels | ||
path: wheelhouse/*.whl | ||
|
||
test: | ||
needs: build | ||
strategy: | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | ||
os: [ubuntu-latest] | ||
include: | ||
- python-version: '3.6' | ||
os: ubuntu-20.04 | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Fetch wheel files | ||
uses: actions/[email protected] | ||
with: | ||
name: manylinux-wheels | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: 'x64' | ||
|
||
- name: Install locales | ||
run: | | ||
sudo apt-get install locales | ||
sudo locale-gen de | ||
- name: Install wheel | ||
run: pip3 install --disable-pip-version-check --no-index | ||
--find-links=. gphoto2 | ||
|
||
- name: Test installation | ||
run: python3 -m unittest discover tests -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# python-gphoto2 - Python interface to libgphoto2 | ||
# http://github.com/jim-easterbrook/python-gphoto2 | ||
# Copyright (C) 2014-23 Jim Easterbrook [email protected] | ||
# Copyright (C) 2014-24 Jim Easterbrook [email protected] | ||
# | ||
# This file is part of python-gphoto2. | ||
# | ||
|
@@ -92,7 +92,7 @@ | |
'gphoto2.libgphoto2.locale.' + name + '.LC_MESSAGES') | ||
# module compile options | ||
extra_link_args = ['-Wl,-rpath,$ORIGIN/libgphoto2'] | ||
if sys.platform =='linux': | ||
if sys.platform == 'linux': | ||
extra_link_args += ['-Wl,--disable-new-dtags'] | ||
|
||
cmd = ['pkg-config', '--modversion', 'libgphoto2'] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# python-gphoto2 - Python interface to libgphoto2 | ||
# http://github.com/jim-easterbrook/python-gphoto2 | ||
# Copyright (C) 2023 Jim Easterbrook [email protected] | ||
# Copyright (C) 2023-24 Jim Easterbrook [email protected] | ||
# | ||
# This file is part of python-gphoto2. | ||
# | ||
|
@@ -19,10 +19,14 @@ | |
# <https://www.gnu.org/licenses/>. | ||
|
||
import os | ||
import sys | ||
import unittest | ||
|
||
import gphoto2 as gp | ||
|
||
path = os.path.dirname(os.path.dirname(__file__)) | ||
if path not in sys.path: | ||
sys.path.insert(0, path) | ||
from tests.vcamera import has_vcam, use_vcam | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# python-gphoto2 - Python interface to libgphoto2 | ||
# http://github.com/jim-easterbrook/python-gphoto2 | ||
# Copyright (C) 2023 Jim Easterbrook [email protected] | ||
# Copyright (C) 2023-24 Jim Easterbrook [email protected] | ||
# | ||
# This file is part of python-gphoto2. | ||
# | ||
|
@@ -19,11 +19,15 @@ | |
# <https://www.gnu.org/licenses/>. | ||
|
||
import os | ||
import sys | ||
import time | ||
import unittest | ||
|
||
import gphoto2 as gp | ||
|
||
path = os.path.dirname(os.path.dirname(__file__)) | ||
if path not in sys.path: | ||
sys.path.insert(0, path) | ||
from tests.vcamera import has_vcam, use_vcam | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# python-gphoto2 - Python interface to libgphoto2 | ||
# http://github.com/jim-easterbrook/python-gphoto2 | ||
# Copyright (C) 2023 Jim Easterbrook [email protected] | ||
# Copyright (C) 2023-24 Jim Easterbrook [email protected] | ||
# | ||
# This file is part of python-gphoto2. | ||
# | ||
|
@@ -20,10 +20,14 @@ | |
|
||
from collections import defaultdict | ||
import os | ||
import sys | ||
import unittest | ||
|
||
import gphoto2 as gp | ||
|
||
path = os.path.dirname(os.path.dirname(__file__)) | ||
if path not in sys.path: | ||
sys.path.insert(0, path) | ||
from tests.vcamera import has_vcam, use_vcam | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# python-gphoto2 - Python interface to libgphoto2 | ||
# http://github.com/jim-easterbrook/python-gphoto2 | ||
# Copyright (C) 2023 Jim Easterbrook [email protected] | ||
# Copyright (C) 2023-24 Jim Easterbrook [email protected] | ||
# | ||
# This file is part of python-gphoto2. | ||
# | ||
|
@@ -19,11 +19,15 @@ | |
# <https://www.gnu.org/licenses/>. | ||
|
||
import os | ||
import sys | ||
import time | ||
import unittest | ||
|
||
import gphoto2 as gp | ||
|
||
path = os.path.dirname(os.path.dirname(__file__)) | ||
if path not in sys.path: | ||
sys.path.insert(0, path) | ||
from tests.vcamera import has_vcam, use_vcam | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# python-gphoto2 - Python interface to libgphoto2 | ||
# http://github.com/jim-easterbrook/python-gphoto2 | ||
# Copyright (C) 2023 Jim Easterbrook [email protected] | ||
# Copyright (C) 2023-24 Jim Easterbrook [email protected] | ||
# | ||
# This file is part of python-gphoto2. | ||
# | ||
|
@@ -19,11 +19,15 @@ | |
# <https://www.gnu.org/licenses/>. | ||
|
||
import logging | ||
import os | ||
import sys | ||
import unittest | ||
|
||
import gphoto2 as gp | ||
|
||
path = os.path.dirname(os.path.dirname(__file__)) | ||
if path not in sys.path: | ||
sys.path.insert(0, path) | ||
from tests.vcamera import has_vcam, use_vcam | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# python-gphoto2 - Python interface to libgphoto2 | ||
# http://github.com/jim-easterbrook/python-gphoto2 | ||
# Copyright (C) 2023 Jim Easterbrook [email protected] | ||
# Copyright (C) 2023-24 Jim Easterbrook [email protected] | ||
# | ||
# This file is part of python-gphoto2. | ||
# | ||
|
@@ -19,10 +19,14 @@ | |
# <https://www.gnu.org/licenses/>. | ||
|
||
import os | ||
import sys | ||
import unittest | ||
|
||
import gphoto2 as gp | ||
|
||
path = os.path.dirname(os.path.dirname(__file__)) | ||
if path not in sys.path: | ||
sys.path.insert(0, path) | ||
from tests.vcamera import use_vcam | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.