Skip to content

Commit

Permalink
Removed deprecated universal wheel configuration (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Dec 26, 2024
1 parent 877aaeb commit 817264e
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test_tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
toxenv: 'py311,wheel'
- python-version: '3.12'
toxenv: 'py312,wheel'
- python-version: '3.13'
toxenv: 'py313,wheel'
container:
image: ubuntu:22.04
steps:
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ environment:
PYTHON_VERSION: "3.12"
L2TBINARIES_TRACK: "dev"
TARGET: wheel
- DESCRIPTION: "Run tests on Mac OS with Python 3.12"
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
- DESCRIPTION: "Run tests on Mac OS with Python 3.13"
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
TARGET: tests

Expand Down
2 changes: 1 addition & 1 deletion config/appveyor/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
set -e

brew update -q
brew install -q gettext gnu-sed python@3.12 tox || true
brew install -q gettext gnu-sed python@3.13 tox || true

6 changes: 3 additions & 3 deletions config/appveyor/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export LDFLAGS="-L/usr/local/lib -L/usr/local/opt/gettext/lib ${LDFLAGS}";
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include ${CPPFLAGS}";
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib ${LDFLAGS}";

# Set the following environment variables to ensure tox can find Python 3.12.
export PATH="/usr/local/opt/python@3.12/bin:${PATH}";
# Set the following environment variables to ensure tox can find Python 3.13.
export PATH="/usr/local/opt/python@3.13/bin:${PATH}";

tox -e py312
tox -e py313
1 change: 1 addition & 0 deletions config/docker/l2tbuilds_ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ RUN apt-get -y update && \
libfuse-dev \
liblzma-dev \
libmagic-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libyaml-dev \
Expand Down
4 changes: 2 additions & 2 deletions data/templates/appveyor.yml/matrix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
PYTHON_VERSION: "3.12"
L2TBINARIES_TRACK: "dev"
TARGET: wheel
- DESCRIPTION: "Run tests on Mac OS with Python 3.12"
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
- DESCRIPTION: "Run tests on Mac OS with Python 3.13"
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
HOMEBREW_NO_INSTALL_CLEANUP: 1
TARGET: tests
6 changes: 3 additions & 3 deletions data/templates/appveyor_scripts/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export LDFLAGS="-L/usr/local/lib -L/usr/local/opt/gettext/lib $${LDFLAGS}";
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include $${CPPFLAGS}";
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib $${LDFLAGS}";

# Set the following environment variables to ensure tox can find Python 3.12.
export PATH="/usr/local/opt/python@3.12/bin:$${PATH}";
# Set the following environment variables to ensure tox can find Python 3.13.
export PATH="/usr/local/opt/python@3.13/bin:$${PATH}";

tox -e py312
tox -e py313
3 changes: 0 additions & 3 deletions data/templates/setup.cfg/bdist_wheel

This file was deleted.

2 changes: 1 addition & 1 deletion l2tdevtools/dependency_writers/appveyor_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def Write(self):
"""Writes an install.sh file."""
dependencies = self._dependency_helper.GetL2TBinaries()

brew_packages = ['gettext', 'gnu-sed', 'python@3.12', 'tox']
brew_packages = ['gettext', 'gnu-sed', 'python@3.13', 'tox']
if 'snappy' in dependencies:
brew_packages.append('snappy')

Expand Down
3 changes: 0 additions & 3 deletions l2tdevtools/dependency_writers/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,6 @@ def Write(self):
'options_entry_points', template_mappings)
file_content.append(template_data)

template_data = self._GenerateFromTemplate('bdist_wheel', template_mappings)
file_content.append(template_data)

file_content = ''.join(file_content)

with open(self.PATH, 'w', encoding='utf-8') as file_object:
Expand Down
7 changes: 3 additions & 4 deletions l2tdevtools/download_helpers/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def GetLatestVersion(self, project_name, version_definition):

latest_version = version_definition.GetLatestVersion()

download_url = 'https://pypi.org/project/{0:s}#files'.format(
self._project_name)
download_url = 'https://pypi.org/pypi/{0:s}/json'.format(self._project_name)

page_content = self.DownloadPageContent(download_url)
if not page_content:
Expand All @@ -114,6 +113,7 @@ def GetLatestVersion(self, project_name, version_definition):
r'{0:s}-([\d\.\!]*(post\d+)?)\.(tar\.bz2|tar\.gz|zip)"').format(
self._source_name)

print("X:", expression_string)
matches = re.findall(expression_string, page_content, flags=re.IGNORECASE)
if not matches:
return None
Expand All @@ -133,8 +133,7 @@ def GetDownloadURL(self, project_name, project_version):
Returns:
str: download URL of the project or None if not available.
"""
download_url = 'https://pypi.org/project/{0:s}/{1!s}'.format(
self._project_name, project_version)
download_url = 'https://pypi.org/pypi/{0:s}/json'.format(self._project_name)

page_content = self.DownloadPageContent(download_url)
if not page_content:
Expand Down
5 changes: 1 addition & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = l2tdevtools
version = 20241008
version = 20241226
description = Development tools for the log2timeline projects
long_description = Development tools for the log2timeline projects.
long_description_content_type = text/plain
Expand Down Expand Up @@ -41,6 +41,3 @@ exclude =
tests.*
utils
where = .

[bdist_wheel]
universal = 1
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py3{8,9,10,11,12},coverage,docformatter,lint,wheel
envlist = py3{8,9,10,11,12,13},coverage,docformatter,lint,wheel

[testenv]
allowlist_externals = ./run_tests.py
Expand All @@ -19,7 +19,7 @@ deps =
setuptools >= 65
wheel
commands =
py3{8,9,10,11,12}: ./run_tests.py
py3{8,9,10,11,12,13}: ./run_tests.py
coverage: coverage erase
coverage: coverage run --source=l2tdevtools --omit="*_test*,*__init__*,*test_lib*" run_tests.py
coverage: coverage xml
Expand Down

0 comments on commit 817264e

Please sign in to comment.