Skip to content

Commit a712114

Browse files
authored
Merge branch 'main' into copilot/switch-to-libjpeg-turbo
2 parents f03bfdf + ad7ce73 commit a712114

File tree

9 files changed

+63
-113
lines changed

9 files changed

+63
-113
lines changed

.github/scripts/build-linux.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fi
2121

2222
# Install zlib:
2323
# - libraw DNG deflate codec support
24-
retry yum install -y zlib-devel
24+
retry dnf install -y zlib-devel
2525

2626
# Install liblcms2:
2727
# - libraw LCMS support
@@ -81,10 +81,10 @@ make install -j$(nproc)
8181
popd
8282

8383
# Install matplotlib (a scikit-image dependency) dependencies
84-
retry yum install -y libpng-devel freetype-devel
84+
retry dnf install -y libpng-devel freetype-devel
8585

8686
# Install numpy/scipy deps
87-
retry yum install -y lapack-devel blas-devel
87+
retry dnf install -y lapack-devel blas-devel
8888

8989
# Upgrade pip and prefer binary packages
9090
${PYBIN}/python -m pip install --upgrade pip

.github/scripts/test-linux.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ if [ ! -d "$PYBIN" ]; then
1616
fi
1717
PYVER=${PYTHON_VERSION//.}
1818

19+
# Upgrade pip and prefer binary packages
20+
${PYBIN}/python -m pip install --upgrade pip
21+
export PIP_PREFER_BINARY=1
22+
1923
# Install package and test
2024
${PYBIN}/pip install ./dist/rawpy*cp${PYVER}*manylinux*${PYTHON_ARCH}*.whl
2125
${PYBIN}/pip install -r dev-requirements.txt "numpy==${NUMPY_VERSION}"

.github/scripts/test-macos.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ VENV=testsuite
77
python -m venv env/$VENV
88
source env/$VENV/bin/activate
99

10+
# Upgrade pip and prefer binary packages
11+
python -m pip install --upgrade pip
12+
export PIP_PREFER_BINARY=1
13+
1014
# Install rawpy
1115
pip install dist/rawpy*cp${PYVER}*macosx*${PYTHON_ARCH}*.whl
1216

.github/scripts/test-windows.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ $PYVER = ($env:PYTHON_VERSION).Replace('.', '')
7373

7474
Initialize-Python
7575

76+
# Upgrade pip and prefer binary packages
77+
exec { python -m pip install --upgrade pip }
78+
$env:PIP_PREFER_BINARY = 1
79+
7680
Get-ChildItem env:
7781

7882
# Install and import in an empty environment.

.github/workflows/ci.yml

Lines changed: 26 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -43,115 +43,78 @@ jobs:
4343
# NOTE: When updating this list, also update the 'test' job!
4444
- os-image: ubuntu-latest
4545
os-name: linux
46-
docker-image: quay.io/pypa/manylinux2014_x86_64
46+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
4747
python-arch: 'x86_64'
4848
python-version: '3.9'
4949
numpy-version: '2.0.*'
5050
- os-image: ubuntu-latest
5151
os-name: linux
52-
docker-image: quay.io/pypa/manylinux2014_x86_64
52+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
5353
python-arch: 'x86_64'
5454
python-version: '3.10'
5555
numpy-version: '2.0.*'
5656
- os-image: ubuntu-latest
5757
os-name: linux
58-
docker-image: quay.io/pypa/manylinux2014_x86_64
58+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
5959
python-arch: 'x86_64'
6060
python-version: '3.11'
6161
numpy-version: '2.0.*'
6262
- os-image: ubuntu-latest
6363
os-name: linux
64-
docker-image: quay.io/pypa/manylinux2014_x86_64
64+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
6565
python-arch: 'x86_64'
6666
python-version: '3.12'
6767
numpy-version: '2.0.*'
6868
- os-image: ubuntu-latest
6969
os-name: linux
70-
docker-image: quay.io/pypa/manylinux2014_x86_64
70+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
7171
python-arch: 'x86_64'
7272
python-version: '3.13'
7373
numpy-version: '2.1.*'
7474
- os-image: ubuntu-latest
7575
os-name: linux
76-
docker-image: quay.io/pypa/manylinux2014_x86_64
76+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
7777
python-arch: 'x86_64'
7878
python-version: '3.14'
7979
numpy-version: '2.4.*'
8080

8181
- os-image: ubuntu-latest
8282
os-name: linux
83-
docker-image: quay.io/pypa/manylinux2014_aarch64
83+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
8484
python-arch: 'aarch64'
8585
python-version: '3.9'
8686
numpy-version: '2.0.*'
8787
- os-image: ubuntu-latest
8888
os-name: linux
89-
docker-image: quay.io/pypa/manylinux2014_aarch64
89+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
9090
python-arch: 'aarch64'
9191
python-version: '3.10'
9292
numpy-version: '2.0.*'
9393
- os-image: ubuntu-latest
9494
os-name: linux
95-
docker-image: quay.io/pypa/manylinux2014_aarch64
95+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
9696
python-arch: 'aarch64'
9797
python-version: '3.11'
9898
numpy-version: '2.0.*'
9999
- os-image: ubuntu-latest
100100
os-name: linux
101-
docker-image: quay.io/pypa/manylinux2014_aarch64
101+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
102102
python-arch: 'aarch64'
103103
python-version: '3.12'
104104
numpy-version: '2.0.*'
105105
- os-image: ubuntu-latest
106106
os-name: linux
107-
docker-image: quay.io/pypa/manylinux2014_aarch64
107+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
108108
python-arch: 'aarch64'
109109
python-version: '3.13'
110110
numpy-version: '2.1.*'
111111
- os-image: ubuntu-latest
112112
os-name: linux
113-
docker-image: quay.io/pypa/manylinux2014_aarch64
113+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
114114
python-arch: 'aarch64'
115115
python-version: '3.14'
116116
numpy-version: '2.4.*'
117117

118-
- os-image: macos-15-intel
119-
os-name: mac
120-
macos-min-version: '10.9'
121-
python-arch: 'x86_64'
122-
python-version: '3.9'
123-
numpy-version: '2.0.*'
124-
- os-image: macos-15-intel
125-
os-name: mac
126-
macos-min-version: '10.9'
127-
python-arch: 'x86_64'
128-
python-version: '3.10'
129-
numpy-version: '2.0.*'
130-
- os-image: macos-15-intel
131-
os-name: mac
132-
macos-min-version: '10.9'
133-
python-arch: 'x86_64'
134-
python-version: '3.11'
135-
numpy-version: '2.0.*'
136-
- os-image: macos-15-intel
137-
os-name: mac
138-
macos-min-version: '10.9'
139-
python-arch: 'x86_64'
140-
python-version: '3.12'
141-
numpy-version: '2.0.*'
142-
- os-image: macos-15-intel
143-
os-name: mac
144-
macos-min-version: '10.9'
145-
python-arch: 'x86_64'
146-
python-version: '3.13'
147-
numpy-version: '2.1.*'
148-
- os-image: macos-15-intel
149-
os-name: mac
150-
macos-min-version: '10.9'
151-
python-arch: 'x86_64'
152-
python-version: '3.14'
153-
numpy-version: '2.4.*'
154-
155118
- os-image: macos-15 # Apple Silicon
156119
os-name: mac
157120
macos-min-version: '11.0'
@@ -278,133 +241,90 @@ jobs:
278241
config:
279242
- os-image: ubuntu-latest
280243
os-name: linux
281-
docker-image: quay.io/pypa/manylinux2014_x86_64
244+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
282245
python-arch: 'x86_64'
283246
python-version: '3.9'
284247
numpy-version: '2.0.*'
285248
- os-image: ubuntu-latest
286249
os-name: linux
287-
docker-image: quay.io/pypa/manylinux2014_x86_64
250+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
288251
python-arch: 'x86_64'
289252
python-version: '3.10'
290253
numpy-version: '2.0.*'
291254
- os-image: ubuntu-latest
292255
os-name: linux
293-
docker-image: quay.io/pypa/manylinux2014_x86_64
256+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
294257
python-arch: 'x86_64'
295258
python-version: '3.11'
296259
numpy-version: '2.0.*'
297260
- os-image: ubuntu-latest
298261
os-name: linux
299-
docker-image: quay.io/pypa/manylinux2014_x86_64
262+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
300263
python-arch: 'x86_64'
301264
python-version: '3.12'
302265
numpy-version: '2.0.*'
303266
- os-image: ubuntu-latest
304267
os-name: linux
305-
docker-image: quay.io/pypa/manylinux2014_x86_64
268+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
306269
python-arch: 'x86_64'
307270
python-version: '3.12'
308271
numpy-version: '1.26.4'
309272
- os-image: ubuntu-latest
310273
os-name: linux
311-
docker-image: quay.io/pypa/manylinux2014_x86_64
274+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
312275
python-arch: 'x86_64'
313276
python-version: '3.13'
314277
numpy-version: '2.1.*'
315278
- os-image: ubuntu-latest
316279
os-name: linux
317-
docker-image: quay.io/pypa/manylinux2014_x86_64
280+
docker-image: quay.io/pypa/manylinux_2_28_x86_64
318281
python-arch: 'x86_64'
319282
python-version: '3.14'
320283
numpy-version: '2.4.*'
321284

322285
- os-image: ubuntu-latest
323286
os-name: linux
324-
docker-image: quay.io/pypa/manylinux2014_aarch64
287+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
325288
python-arch: 'aarch64'
326289
python-version: '3.9'
327290
numpy-version: '2.0.*'
328291
- os-image: ubuntu-latest
329292
os-name: linux
330-
docker-image: quay.io/pypa/manylinux2014_aarch64
293+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
331294
python-arch: 'aarch64'
332295
python-version: '3.10'
333296
numpy-version: '2.0.*'
334297
- os-image: ubuntu-latest
335298
os-name: linux
336-
docker-image: quay.io/pypa/manylinux2014_aarch64
299+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
337300
python-arch: 'aarch64'
338301
python-version: '3.11'
339302
numpy-version: '2.0.*'
340303
- os-image: ubuntu-latest
341304
os-name: linux
342-
docker-image: quay.io/pypa/manylinux2014_aarch64
305+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
343306
python-arch: 'aarch64'
344307
python-version: '3.12'
345308
numpy-version: '2.0.*'
346309
- os-image: ubuntu-latest
347310
os-name: linux
348-
docker-image: quay.io/pypa/manylinux2014_aarch64
311+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
349312
python-arch: 'aarch64'
350313
python-version: '3.12'
351314
numpy-version: '1.26.4'
352315
- os-image: ubuntu-latest
353316
os-name: linux
354-
docker-image: quay.io/pypa/manylinux2014_aarch64
317+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
355318
python-arch: 'aarch64'
356319
python-version: '3.13'
357320
numpy-version: '2.1.*'
358321
- os-image: ubuntu-latest
359322
os-name: linux
360-
docker-image: quay.io/pypa/manylinux2014_aarch64
323+
docker-image: quay.io/pypa/manylinux_2_28_aarch64
361324
python-arch: 'aarch64'
362325
python-version: '3.14'
363326
numpy-version: '2.4.*'
364327

365-
- os-image: macos-15-intel
366-
os-name: mac
367-
macos-min-version: '10.9'
368-
python-arch: 'x86_64'
369-
python-version: '3.9'
370-
numpy-version: '2.0.*'
371-
- os-image: macos-15-intel
372-
os-name: mac
373-
macos-min-version: '10.9'
374-
python-arch: 'x86_64'
375-
python-version: '3.10'
376-
numpy-version: '2.0.*'
377-
- os-image: macos-15-intel
378-
os-name: mac
379-
macos-min-version: '10.9'
380-
python-arch: 'x86_64'
381-
python-version: '3.11'
382-
numpy-version: '2.0.*'
383-
- os-image: macos-15-intel
384-
os-name: mac
385-
macos-min-version: '10.9'
386-
python-arch: 'x86_64'
387-
python-version: '3.12'
388-
numpy-version: '2.0.*'
389-
- os-image: macos-15-intel
390-
os-name: mac
391-
macos-min-version: '10.9'
392-
python-arch: 'x86_64'
393-
python-version: '3.12'
394-
numpy-version: '1.26.4'
395-
- os-image: macos-15-intel
396-
os-name: mac
397-
macos-min-version: '10.9'
398-
python-arch: 'x86_64'
399-
python-version: '3.13'
400-
numpy-version: '2.1.*'
401-
- os-image: macos-15-intel
402-
os-name: mac
403-
macos-min-version: '10.9'
404-
python-arch: 'x86_64'
405-
python-version: '3.14'
406-
numpy-version: '2.4.*'
407-
408328
- os-image: macos-15 # Apple Silicon
409329
os-name: mac
410330
macos-min-version: '11.0'

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,24 @@ The above will download all build dependencies (including a Python installation)
166166
and is fully configured through the four environment variables.
167167
Set `USE_CONDA = '0'` to build within an existing Python environment.
168168

169+
## FAQ
170+
171+
### I'm getting "LibRawFileUnsupportedError: Unsupported file format or not RAW file"
172+
173+
This error occurs when rawpy/LibRaw cannot recognize the file as a supported RAW image format. Common causes include:
174+
175+
1. **The file is not actually a RAW file** - Make sure you're trying to open a RAW image file (e.g., .NEF, .CR2, .ARW, .DNG, etc.) and not a regular image format like JPEG or PNG.
176+
177+
2. **The file is corrupted or incomplete** - If the file was not fully downloaded or is damaged, LibRaw cannot read it properly.
178+
179+
3. **The file lacks proper headers** - Some proprietary or headerless RAW formats are not supported by LibRaw. RAW files need to contain proper metadata headers that identify the camera model, sensor configuration, and other essential information for LibRaw to decode them.
180+
181+
4. **Unsupported camera or RAW format** - While LibRaw supports a [wide range of cameras](https://www.libraw.org/supported-cameras), some very new or obscure camera models may not be supported yet. Check the LibRaw website for the list of supported cameras.
182+
183+
**What you can do:**
184+
- Verify the file is a genuine RAW file from a supported camera
185+
- Try opening the file with the camera manufacturer's software to confirm it's valid
186+
- Check if you're using the latest version of rawpy, as newer versions may support additional cameras
187+
- If you have a headerless or proprietary RAW format, you may need to convert it to a standard format like DNG using the camera manufacturer's tools first
169188

170189
[libraw]: https://www.libraw.org

dev-requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ cython
77
numpy
88

99
# optional runtime dependencies
10-
# Pin version to avoid build failures on platforms without pre-built wheels
11-
scikit-image<0.26
10+
scikit-image
1211

1312
# test dependencies
1413
pytest

external/LibRaw

Submodule LibRaw updated 142 files

rawpy/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.25.1"
1+
__version__ = "0.25.2"

0 commit comments

Comments
 (0)