From 817264e5fcdaf0195b5b9f7922174a8fe81a7664 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Thu, 26 Dec 2024 16:59:45 +0100 Subject: [PATCH] Removed deprecated universal wheel configuration (#1239) --- .github/workflows/test_tox.yml | 2 ++ appveyor.yml | 4 ++-- config/appveyor/install.sh | 2 +- config/appveyor/runtests.sh | 6 +++--- config/docker/l2tbuilds_ubuntu.Dockerfile | 1 + data/templates/appveyor.yml/matrix | 4 ++-- data/templates/appveyor_scripts/runtests.sh | 6 +++--- data/templates/setup.cfg/bdist_wheel | 3 --- l2tdevtools/dependency_writers/appveyor_scripts.py | 2 +- l2tdevtools/dependency_writers/setup.py | 3 --- l2tdevtools/download_helpers/pypi.py | 7 +++---- setup.cfg | 5 +---- tox.ini | 4 ++-- 13 files changed, 21 insertions(+), 28 deletions(-) delete mode 100644 data/templates/setup.cfg/bdist_wheel diff --git a/.github/workflows/test_tox.yml b/.github/workflows/test_tox.yml index 7b32b6d5..4f5f4142 100644 --- a/.github/workflows/test_tox.yml +++ b/.github/workflows/test_tox.yml @@ -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: diff --git a/appveyor.yml b/appveyor.yml index fa80fa7c..6ad3e37c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 diff --git a/config/appveyor/install.sh b/config/appveyor/install.sh index 42c4ab6b..51eb76d4 100755 --- a/config/appveyor/install.sh +++ b/config/appveyor/install.sh @@ -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 diff --git a/config/appveyor/runtests.sh b/config/appveyor/runtests.sh index 86ba5ce1..18cc67c3 100755 --- a/config/appveyor/runtests.sh +++ b/config/appveyor/runtests.sh @@ -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 diff --git a/config/docker/l2tbuilds_ubuntu.Dockerfile b/config/docker/l2tbuilds_ubuntu.Dockerfile index 634c1ce4..ab9ff516 100644 --- a/config/docker/l2tbuilds_ubuntu.Dockerfile +++ b/config/docker/l2tbuilds_ubuntu.Dockerfile @@ -34,6 +34,7 @@ RUN apt-get -y update && \ libfuse-dev \ liblzma-dev \ libmagic-dev \ + libsqlite3-dev \ libssl-dev \ libtool \ libyaml-dev \ diff --git a/data/templates/appveyor.yml/matrix b/data/templates/appveyor.yml/matrix index 92de082a..ba5dd9ec 100644 --- a/data/templates/appveyor.yml/matrix +++ b/data/templates/appveyor.yml/matrix @@ -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 diff --git a/data/templates/appveyor_scripts/runtests.sh b/data/templates/appveyor_scripts/runtests.sh index 3f1ac98a..74e6e497 100755 --- a/data/templates/appveyor_scripts/runtests.sh +++ b/data/templates/appveyor_scripts/runtests.sh @@ -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 diff --git a/data/templates/setup.cfg/bdist_wheel b/data/templates/setup.cfg/bdist_wheel deleted file mode 100644 index 2bfc54f7..00000000 --- a/data/templates/setup.cfg/bdist_wheel +++ /dev/null @@ -1,3 +0,0 @@ - -[bdist_wheel] -universal = 1 diff --git a/l2tdevtools/dependency_writers/appveyor_scripts.py b/l2tdevtools/dependency_writers/appveyor_scripts.py index 79cd8e1d..a6015eb0 100644 --- a/l2tdevtools/dependency_writers/appveyor_scripts.py +++ b/l2tdevtools/dependency_writers/appveyor_scripts.py @@ -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') diff --git a/l2tdevtools/dependency_writers/setup.py b/l2tdevtools/dependency_writers/setup.py index 3dde5632..bd2f1f49 100644 --- a/l2tdevtools/dependency_writers/setup.py +++ b/l2tdevtools/dependency_writers/setup.py @@ -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: diff --git a/l2tdevtools/download_helpers/pypi.py b/l2tdevtools/download_helpers/pypi.py index 967adb67..f4e2976e 100644 --- a/l2tdevtools/download_helpers/pypi.py +++ b/l2tdevtools/download_helpers/pypi.py @@ -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: @@ -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 @@ -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: diff --git a/setup.cfg b/setup.cfg index 4188700d..10da65a1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 @@ -41,6 +41,3 @@ exclude = tests.* utils where = . - -[bdist_wheel] -universal = 1 diff --git a/tox.ini b/tox.ini index 1c0ea8c6..cc841a77 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -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