Skip to content

Commit bbcaaf5

Browse files
committed
Applied updates and changes for deployment
1 parent 42e7ef5 commit bbcaaf5

21 files changed

+403
-380
lines changed

.github/workflows/build_wheel.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Build wheel from source using tox.
2+
name: build_wheel
3+
on: [push, pull_request]
4+
permissions: read-all
5+
jobs:
6+
build_wheel:
7+
runs-on: ubuntu-22.04
8+
strategy:
9+
matrix:
10+
include:
11+
- python-version: '3.7'
12+
toxenv: 'py37'
13+
- python-version: '3.8'
14+
toxenv: 'py38'
15+
- python-version: '3.9'
16+
toxenv: 'py39'
17+
- python-version: '3.10'
18+
toxenv: 'py310'
19+
- python-version: '3.11'
20+
toxenv: 'py311'
21+
- python-version: '3.12'
22+
toxenv: 'py312'
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: Install build dependencies
26+
run: |
27+
sudo add-apt-repository universe &&
28+
sudo add-apt-repository -y ppa:deadsnakes/ppa &&
29+
sudo apt-get update &&
30+
sudo apt-get install -y autoconf automake autopoint build-essential git libtool pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools
31+
- name: Install tox
32+
run: |
33+
python3 -m pip install tox
34+
- name: Download test data
35+
run: |
36+
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
37+
- name: Prepare build
38+
run: |
39+
./synclibs.sh --use-head && ./autogen.sh && ./configure
40+
- name: Build Python wheel
41+
run: |
42+
tox -e${{ matrix.toxenv }}

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Files to ignore by git
22
#
3-
# Version: 20230405
3+
# Version: 20230926
44

55
# Generic auto-generated build files
66
*~
@@ -25,10 +25,13 @@
2525
*.swp
2626
*.Tpo
2727
*.trs
28+
*.whl
2829
/*.egg-info/
30+
__pycache__
2931
.deps
3032
.dirstamp
3133
.libs
34+
.tox
3235
INSTALL
3336
Makefile
3437
Makefile.bcc
@@ -125,6 +128,7 @@ stamp-h[1-9]
125128
/libqcow/libqcow.rc
126129
/libqcow/libqcow_definitions.h
127130
/pyqcow-python[23]/*.[ch]
131+
/setup.cfg
128132
/qcowtools/*.exe
129133
/qcowtools/qcowinfo
130134
/qcowtools/qcowmount

Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ PKGCONFIG_FILES = \
4848
libqcow.pc.in
4949

5050
SETUP_PY_FILES = \
51+
pyproject.toml \
52+
setup.cfg \
53+
setup.cfg.in \
5154
setup.py
5255

5356
SPEC_FILES = \

appveyor.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,24 @@ environment:
9292
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
9393
HOMEBREW_NO_INSTALL_CLEANUP: 1
9494
CC: clang
95+
CFLAGS: "-I/usr/local/include"
96+
LDFLAGS: "-L/usr/local/lib"
9597
CONFIGURE_OPTIONS: ""
9698
- TARGET: macos-x64-gcc
9799
BUILD_ENVIRONMENT: xcode
98100
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
99101
HOMEBREW_NO_INSTALL_CLEANUP: 1
102+
CC: gcc
103+
CFLAGS: "-I/usr/local/include"
104+
LDFLAGS: "-L/usr/local/lib"
100105
CONFIGURE_OPTIONS: ""
101106
- TARGET: macos-x64-gcc-python
102107
BUILD_ENVIRONMENT: xcode
103108
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
104109
PYTHON: "/usr/local/opt/[email protected]/bin/python3"
105110
PYTHON_CONFIG: "/usr/local/opt/[email protected]/bin/python3-config"
106111
HOMEBREW_NO_INSTALL_CLEANUP: 1
112+
CC: gcc
107113
CFLAGS: "-I/usr/local/include"
108114
LDFLAGS: "-L/usr/local/lib"
109115
CONFIGURE_OPTIONS: "--enable-python"
@@ -113,6 +119,7 @@ environment:
113119
PYTHON: "/usr/local/opt/[email protected]/bin/python3"
114120
PYTHON_CONFIG: "/usr/local/opt/[email protected]/bin/python3-config"
115121
HOMEBREW_NO_INSTALL_CLEANUP: 1
122+
CC: gcc
116123
CFLAGS: "-I/usr/local/include"
117124
LDFLAGS: "-L/usr/local/lib"
118125
CONFIGURE_OPTIONS: "--disable-dependency-tracking --prefix=/usr/local --enable-python --with-pyprefix"
@@ -148,6 +155,12 @@ environment:
148155
HOMEBREW_NO_INSTALL_CLEANUP: 1
149156
PYTHON_VERSION: 3.11
150157
TOXENV: py311
158+
- TARGET: macos-tox-py312
159+
BUILD_ENVIRONMENT: python-tox
160+
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
161+
HOMEBREW_NO_INSTALL_CLEANUP: 1
162+
PYTHON_VERSION: 3.12
163+
TOXENV: py312
151164
- TARGET: cygwin64-gcc
152165
BUILD_ENVIRONMENT: cygwin64
153166
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AC_PREREQ([2.71])
22

33
AC_INIT(
44
[libqcow],
5-
[20230923],
5+
[20231020],
66
77

88
AC_CONFIG_SRCDIR(
@@ -209,6 +209,7 @@ AC_CONFIG_FILES([dpkg/changelog])
209209
AC_CONFIG_FILES([libqcow/libqcow.rc])
210210
AC_CONFIG_FILES([libqcow.pc])
211211
AC_CONFIG_FILES([libqcow.spec])
212+
AC_CONFIG_FILES([setup.cfg])
212213
dnl Generate a source configuration file
213214
AC_CONFIG_HEADERS([common/config.h])
214215

libqcow.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<package >
33
<metadata>
44
<id>libqcow</id>
5-
<version>20230923</version>
5+
<version>20231020</version>
66
<authors>Joachim Metz</authors>
77
<owners>joachimmetz</owners>
88
<license type="expression">LGPL-3.0-or-later</license>
99
<projectUrl>https://github.com/libyal/libqcow</projectUrl>
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<title>libqcow</title>
1212
<description>Library to access the QEMU Copy-On-Write (QCOW) image file format</description>
13-
<releaseNotes>Release of libqcow 20230923</releaseNotes>
13+
<releaseNotes>Release of libqcow 20231020</releaseNotes>
1414
<copyright>Copyright (C) 2010-2023</copyright>
1515
<tags>native</tags>
1616
</metadata>

m4/libcrypto.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dnl Checks for libcrypto required headers and functions
22
dnl
3-
dnl Version: 20230701
3+
dnl Version: 20231007
44

55
dnl Function to detect whether openssl/evp.h can be used in combination with zlib.h
66
AC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE],
@@ -687,6 +687,10 @@ AC_DEFUN([AX_LIBCRYPTO_CHECK_LIB],
687687
ac_cv_libcrypto_CPPFLAGS="$openssl_CFLAGS"
688688
ac_cv_libcrypto_LIBADD="$openssl_LIBS"
689689
690+
AS_IF(
691+
[test "x$ac_cv_libcrypto_LIBADD" = x],
692+
[ac_cv_libcrypto_LIBADD="-lcrypto"])
693+
690694
dnl On Cygwin also link zlib since libcrypto relies on it
691695
AS_CASE(
692696
[$host],

m4/python.m4

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
dnl Functions for Python bindings
22
dnl
3-
dnl Version: 20211114
3+
dnl Version: 20230923
44

55
dnl Function to check if the python binary is available
66
dnl "python${PYTHON_VERSION} python python# python#.#"
77
AC_DEFUN([AX_PROG_PYTHON],
88
[AS_IF(
99
[test "x${PYTHON_VERSION}" != x],
1010
[ax_python_progs="python${PYTHON_VERSION}"],
11-
[ax_python_progs="python python3 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5"])
11+
[ax_python_progs="python python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5"])
1212
AC_CHECK_PROGS(
1313
[PYTHON],
1414
[$ax_python_progs])
@@ -58,7 +58,7 @@ AC_DEFUN([AX_PROG_PYTHON2],
5858
dnl Function to check if the python3 binary is available
5959
dnl "python3 python3.#"
6060
AC_DEFUN([AX_PROG_PYTHON3],
61-
[ax_python3_progs="python3 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0"
61+
[ax_python3_progs="python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0"
6262
AC_CHECK_PROGS(
6363
[PYTHON3],
6464
[$ax_python3_progs])
@@ -95,7 +95,7 @@ AC_DEFUN([AX_PROG_PYTHON_CONFIG],
9595
[test "x${PYTHON_CONFIG}" = x],
9696
[AC_CHECK_PROGS(
9797
[PYTHON_CONFIG],
98-
[python-config python3-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config])
98+
[python-config python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config python2-config python2.7-config python2.6-config python2.5-config])
9999
])
100100
AS_IF(
101101
[test "x${PYTHON_CONFIG}" = x],
@@ -131,7 +131,7 @@ AC_DEFUN([AX_PROG_PYTHON3_CONFIG],
131131
[test "x${PYTHON3_CONFIG}" = x],
132132
[AC_CHECK_PROGS(
133133
[PYTHON3_CONFIG],
134-
[python3-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config])
134+
[python3-config python3.12-config python3.11-config python3.10-config python3.9-config python3.8-config python3.7-config python3.6-config python3.5-config python3.4-config python3.3-config python3.2-config python3.1-config python3.0-config])
135135
])
136136
AS_IF(
137137
[test "x${PYTHON3_CONFIG}" = x],

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+

pyqcow/pyqcow_file_object_io_handle.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,13 @@ int pyqcow_file_object_io_handle_free(
232232
Py_DecRef(
233233
( *file_object_io_handle )->file_object );
234234

235-
PyGILState_Release(
236-
gil_state );
237-
238235
PyMem_Free(
239236
*file_object_io_handle );
240237

241238
*file_object_io_handle = NULL;
239+
240+
PyGILState_Release(
241+
gil_state );
242242
}
243243
return( 1 );
244244
}

0 commit comments

Comments
 (0)