Skip to content

Commit

Permalink
Applied updates and changes for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Sep 30, 2023
1 parent aa18212 commit 6b11fa8
Show file tree
Hide file tree
Showing 20 changed files with 292 additions and 219 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Build wheel from source using tox.
name: build_wheel
on: [push, pull_request]
permissions: read-all
jobs:
build_wheel:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- python-version: '3.7'
toxenv: 'py37'
- python-version: '3.8'
toxenv: 'py38'
- python-version: '3.9'
toxenv: 'py39'
- python-version: '3.10'
toxenv: 'py310'
- python-version: '3.11'
toxenv: 'py311'
- python-version: '3.12'
toxenv: 'py312'
steps:
- uses: actions/checkout@v3
- name: Install build dependencies
run: |
sudo add-apt-repository universe &&
sudo add-apt-repository -y ppa:deadsnakes/ppa &&
sudo apt-get update &&
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
- name: Install tox
run: |
python3 -m pip install tox
- name: Download test data
run: |
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
- name: Prepare build
run: |
./synclibs.sh --use-head && ./autogen.sh && ./configure
- name: Build Python wheel
run: |
tox -e${{ matrix.toxenv }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Files to ignore by git
#
# Version: 20230405
# Version: 20230926

# Generic auto-generated build files
*~
Expand All @@ -25,10 +25,13 @@
*.swp
*.Tpo
*.trs
*.whl
/*.egg-info/
__pycache__
.deps
.dirstamp
.libs
.tox
INSTALL
Makefile
Makefile.bcc
Expand Down Expand Up @@ -125,6 +128,7 @@ stamp-h[1-9]
/libfsntfs/libfsntfs.rc
/libfsntfs/libfsntfs_definitions.h
/pyfsntfs-python[23]/*.[ch]
/setup.cfg
/fsntfstools/*.exe
/fsntfstools/fsntfsinfo
/fsntfstools/fsntfsmount
Expand Down
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ PKGCONFIG_FILES = \
libfsntfs.pc.in

SETUP_PY_FILES = \
pyproject.toml \
setup.cfg \
setup.cfg.in \
setup.py

SPEC_FILES = \
Expand Down
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.71])

AC_INIT(
[libfsntfs],
[20230709],
[20230930],
[joachim.metz@gmail.com])

AC_CONFIG_SRCDIR(
Expand Down Expand Up @@ -221,6 +221,7 @@ AC_CONFIG_FILES([dpkg/changelog])
AC_CONFIG_FILES([libfsntfs/libfsntfs.rc])
AC_CONFIG_FILES([libfsntfs.pc])
AC_CONFIG_FILES([libfsntfs.spec])
AC_CONFIG_FILES([setup.cfg])
dnl Generate a source configuration file
AC_CONFIG_HEADERS([common/config.h])

Expand Down
4 changes: 2 additions & 2 deletions libfsntfs.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package >
<metadata>
<id>libfsntfs</id>
<version>20230708</version>
<version>20230930</version>
<authors>Joachim Metz</authors>
<owners>joachimmetz</owners>
<license type="expression">LGPL-3.0-or-later</license>
<projectUrl>https://github.com/libyal/libfsntfs</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<title>libfsntfs</title>
<description>Library to access the Windows New Technology File System (NTFS) format</description>
<releaseNotes>Release of libfsntfs 20230708</releaseNotes>
<releaseNotes>Release of libfsntfs 20230930</releaseNotes>
<copyright>Copyright (C) 2010-2023</copyright>
<tags>native</tags>
</metadata>
Expand Down
10 changes: 5 additions & 5 deletions m4/python.m4
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
dnl Functions for Python bindings
dnl
dnl Version: 20211114
dnl Version: 20230923

dnl Function to check if the python binary is available
dnl "python${PYTHON_VERSION} python python# python#.#"
AC_DEFUN([AX_PROG_PYTHON],
[AS_IF(
[test "x${PYTHON_VERSION}" != x],
[ax_python_progs="python${PYTHON_VERSION}"],
[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"])
[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"])
AC_CHECK_PROGS(
[PYTHON],
[$ax_python_progs])
Expand Down Expand Up @@ -58,7 +58,7 @@ AC_DEFUN([AX_PROG_PYTHON2],
dnl Function to check if the python3 binary is available
dnl "python3 python3.#"
AC_DEFUN([AX_PROG_PYTHON3],
[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"
[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"
AC_CHECK_PROGS(
[PYTHON3],
[$ax_python3_progs])
Expand Down Expand Up @@ -95,7 +95,7 @@ AC_DEFUN([AX_PROG_PYTHON_CONFIG],
[test "x${PYTHON_CONFIG}" = x],
[AC_CHECK_PROGS(
[PYTHON_CONFIG],
[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])
[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])
])
AS_IF(
[test "x${PYTHON_CONFIG}" = x],
Expand Down Expand Up @@ -131,7 +131,7 @@ AC_DEFUN([AX_PROG_PYTHON3_CONFIG],
[test "x${PYTHON3_CONFIG}" = x],
[AC_CHECK_PROGS(
[PYTHON3_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])
[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])
])
AS_IF(
[test "x${PYTHON3_CONFIG}" = x],
Expand Down
3 changes: 1 addition & 2 deletions pyfsntfs/pyfsntfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ PyObject *pyfsntfs_get_version(
PyObject *self PYFSNTFS_ATTRIBUTE_UNUSED,
PyObject *arguments PYFSNTFS_ATTRIBUTE_UNUSED )
{
const char *errors = NULL;
const char *version_string = NULL;
size_t version_string_length = 0;

Expand All @@ -136,7 +135,7 @@ PyObject *pyfsntfs_get_version(
return( PyUnicode_DecodeUTF8(
version_string,
(Py_ssize_t) version_string_length,
errors ) );
NULL ) );
}

/* Checks if a volume has a Windows New Technology File System (NTFS) volume signature
Expand Down
3 changes: 1 addition & 2 deletions pyfsntfs/pyfsntfs_attribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ PyObject *pyfsntfs_attribute_get_name(
{
libcerror_error_t *error = NULL;
PyObject *string_object = NULL;
const char *errors = NULL;
uint8_t *name = NULL;
static char *function = "pyfsntfs_attribute_get_name";
size_t name_size = 0;
Expand Down Expand Up @@ -473,7 +472,7 @@ PyObject *pyfsntfs_attribute_get_name(
string_object = PyUnicode_DecodeUTF8(
(char *) name,
(Py_ssize_t) name_size - 1,
errors );
NULL );

PyMem_Free(
name );
Expand Down
3 changes: 1 addition & 2 deletions pyfsntfs/pyfsntfs_data_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,6 @@ PyObject *pyfsntfs_data_stream_get_name(
{
libcerror_error_t *error = NULL;
PyObject *string_object = NULL;
const char *errors = NULL;
uint8_t *name = NULL;
static char *function = "pyfsntfs_data_stream_get_name";
size_t name_size = 0;
Expand Down Expand Up @@ -1114,7 +1113,7 @@ PyObject *pyfsntfs_data_stream_get_name(
string_object = PyUnicode_DecodeUTF8(
(char *) name,
(Py_ssize_t) name_size - 1,
errors );
NULL );

PyMem_Free(
name );
Expand Down
Loading

0 comments on commit 6b11fa8

Please sign in to comment.