From 429f96051b5d66ed323fd63e8e48a71ca4922b64 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Tue, 9 Apr 2024 06:41:16 +0200 Subject: [PATCH] Changes to dependency writers and removed obsolete future package (#1231) --- data/licenses/LICENSE.future | 19 ------------------- data/presets.ini | 4 ++-- data/projects.ini | 17 +---------------- l2tdevtools/dependency_writers/gift_ppa.py | 4 ++++ .../dependency_writers/github_actions.py | 13 +++++++++---- l2tdevtools/dependency_writers/interface.py | 3 --- .../dependency_writers/linux_scripts.py | 4 ++++ tests/dependency_writers/gift_ppa.py | 4 ++++ tests/dependency_writers/interface.py | 4 +--- tests/dependency_writers/linux_scripts.py | 4 ++++ 10 files changed, 29 insertions(+), 47 deletions(-) delete mode 100644 data/licenses/LICENSE.future diff --git a/data/licenses/LICENSE.future b/data/licenses/LICENSE.future deleted file mode 100644 index 19572a0b..00000000 --- a/data/licenses/LICENSE.future +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2013-2015 Python Charmers Pty Ltd, Australia - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/data/presets.ini b/data/presets.ini index ec39160e..efad08e7 100644 --- a/data/presets.ini +++ b/data/presets.ini @@ -19,7 +19,7 @@ projects: dtfabric,mock,pbr,PyYAML projects: dtfabric,libfwpfs,libfwsi,libgzipf,liblnk,libolecf,libregf,lz4,python-snappy,python-zstd,PyYAML [grr-api-client] -projects: asn1crypto,certifi,cffi,chardet,cryptography,future,grr-api-client,grr-response-proto,idna,protobuf,pycparser,requests,urllib3,Werkzeug +projects: asn1crypto,certifi,cffi,chardet,cryptography,grr-api-client,grr-response-proto,idna,protobuf,pycparser,requests,urllib3,Werkzeug [libcloudforensics] projects: boto3,botocore,dateutil,docutils,google-api-core,google-api-python-client,google-auth,jmespath,libcloudforensics,s3transfer @@ -29,7 +29,7 @@ projects: libbde,libcaes,libcdata,libcdatetime,libcdirectory,libcerror,libcfile, [plaso] presets: dfimagetools,redis-py -projects: acstore,bencode,certifi,cffi,chardet,dateutil,defusedxml,fakeredis,Flor,future,libcaes,libesedb,libevt,libevtx,libexe,libfwps,libfwsi,liblnk,libmsiecf,libolecf,libscca,mock,opensearch-py,pbr,pefile,plaso,psutil,pyparsing,python-lz4,python-zstd,pytz,pyzmq,requests,urllib3,XlsxWriter,yara-python +projects: acstore,bencode,certifi,cffi,chardet,dateutil,defusedxml,fakeredis,Flor,libcaes,libesedb,libevt,libevtx,libexe,libfwps,libfwsi,liblnk,libmsiecf,libolecf,libscca,mock,opensearch-py,pbr,pefile,plaso,psutil,pyparsing,python-lz4,python-zstd,pytz,pyzmq,requests,urllib3,XlsxWriter,yara-python [redis-py] projects: deprecated,importlib-metadata,redis-py diff --git a/data/projects.ini b/data/projects.ini index a7de650a..3e674ad1 100644 --- a/data/projects.ini +++ b/data/projects.ini @@ -555,20 +555,6 @@ git_url: https://github.com/DCSO/flor.git description_short: A Bloom filter implementation in Python description_long: A Bloom filter implementation in Python -[future] -version: >=0.15.2 -dpkg_template_install_python3: python3-future.install -rpm_template_spec: future.spec -setup_name: future -maintainer: Ed Schofield -homepage_url: http://python-future.org -download_url: https://pypi.org/project/future -git_url: https://github.com/PythonCharmers/python-future.git -description_short: Clean single-source support for Python 3 and 2 -description_long: future is the missing compatibility layer between Python 2 - and Python 3. It allows you to use a single, clean Python 3.x-compatible - codebase to support both Python 2 and Python 3 with minimal overhead. - [gevent] architecture_dependent: true version: >=1.0.1 @@ -739,7 +725,7 @@ description_short: HTTP/2-based RPC framework description_long: HTTP/2-based RPC framework. [grr-api-client] -dpkg_dependencies: grr-response-proto,python3-ipython,python3-cryptography,python3-future,python3-protobuf,python3-requests,python3-werkzeug +dpkg_dependencies: grr-response-proto,python3-ipython,python3-cryptography,python3-protobuf,python3-requests,python3-werkzeug maintainer: GRR developers homepage_url: https://github.com/google/grr/tree/master/api_client/python download_url: https://pypi.org/project/grr-api-client @@ -1562,7 +1548,6 @@ description_long: Python Build Reasonableness [pefile] version: >=2016.3.4 -dpkg_dependencies: python3-future dpkg_template_install_python3: python3-pefile.install rpm_template_spec: pefile.spec maintainer: Ero Carrera diff --git a/l2tdevtools/dependency_writers/gift_ppa.py b/l2tdevtools/dependency_writers/gift_ppa.py index 85b45115..08ba02e9 100644 --- a/l2tdevtools/dependency_writers/gift_ppa.py +++ b/l2tdevtools/dependency_writers/gift_ppa.py @@ -137,6 +137,10 @@ def _Write(self): python_dependencies = self._GetDPKGPythonDependencies() test_dependencies = self._GetDPKGTestDependencies(python_dependencies) + # TODO: replace by dev_dependencies.ini or equiv. + test_dependencies.extend([ + 'python3-distutils', 'python3-lib2to3', 'python3-setuptools']) + # TODO: replace by dev_dependencies.ini or equiv. development_dependencies = ['pylint'] diff --git a/l2tdevtools/dependency_writers/github_actions.py b/l2tdevtools/dependency_writers/github_actions.py index 07bd9e8e..bde54fea 100644 --- a/l2tdevtools/dependency_writers/github_actions.py +++ b/l2tdevtools/dependency_writers/github_actions.py @@ -21,13 +21,14 @@ def Write(self): dpkg_dependencies.extend(test_dependencies) dpkg_dependencies.extend([ 'python3', 'python3-build', 'python3-dev', 'python3-pip', - 'python3-wheel']) + 'python3-setuptools', 'python3-wheel']) rpm_dependencies = self._GetRPMPythonDependencies() test_dependencies = self._GetRPMTestDependencies(rpm_dependencies) rpm_dependencies.extend(test_dependencies) rpm_dependencies.extend([ - 'python3', 'python3-build', 'python3-devel', 'python3-wheel']) + 'python3', 'python3-build', 'python3-devel', 'python3-setuptools', + 'python3-wheel']) template_mappings = { 'dpkg_dependencies': ' '.join(sorted(set(dpkg_dependencies))), @@ -53,7 +54,9 @@ def Write(self): dpkg_dependencies = self._GetDPKGPythonDependencies() test_dependencies = self._GetDPKGTestDependencies(dpkg_dependencies) dpkg_dependencies.extend(test_dependencies) - dpkg_dependencies.append('python3-pip') + dpkg_dependencies.extend([ + 'python3-distutils', 'python3-lib2to3', 'python3-pip', + 'python3-setuptools']) dpkg_dev_dependencies = self._GetDPKGDevDependencies() @@ -81,7 +84,9 @@ def Write(self): dpkg_dependencies = self._GetDPKGPythonDependencies() test_dependencies = self._GetDPKGTestDependencies(dpkg_dependencies) dpkg_dependencies.extend(test_dependencies) - dpkg_dependencies.append('python3-pip') + dpkg_dependencies.extend([ + 'python3-distutils', 'python3-lib2to3', 'python3-pip', + 'python3-setuptools']) dpkg_dev_dependencies = self._GetDPKGDevDependencies() diff --git a/l2tdevtools/dependency_writers/interface.py b/l2tdevtools/dependency_writers/interface.py index a16b7a9e..cc082ca3 100644 --- a/l2tdevtools/dependency_writers/interface.py +++ b/l2tdevtools/dependency_writers/interface.py @@ -94,9 +94,6 @@ def _GetDPKGTestDependencies(self, python_dependencies): test_dependencies = self._dependency_helper.GetDPKGDepends( exclude_version=True, test_dependencies=True) - # TODO: replace by test_dependencies.ini or dev_dependencies.ini or equiv. - test_dependencies.extend(['python3-distutils', 'python3-setuptools']) - return [ test_dependency for test_dependency in sorted(test_dependencies) if test_dependency not in python_dependencies] diff --git a/l2tdevtools/dependency_writers/linux_scripts.py b/l2tdevtools/dependency_writers/linux_scripts.py index db6e852a..d418be18 100644 --- a/l2tdevtools/dependency_writers/linux_scripts.py +++ b/l2tdevtools/dependency_writers/linux_scripts.py @@ -138,6 +138,10 @@ def Write(self): test_dependencies = self._GetDPKGTestDependencies(python_dependencies) + # TODO: replace by dev_dependencies.ini or equiv. + test_dependencies.extend([ + 'python3-distutils', 'python3-lib2to3', 'python3-setuptools']) + # TODO: replace by dev_dependencies.ini or equiv. development_dependencies = ['pylint'] diff --git a/tests/dependency_writers/gift_ppa.py b/tests/dependency_writers/gift_ppa.py index 0e2e5e21..a6e426a3 100644 --- a/tests/dependency_writers/gift_ppa.py +++ b/tests/dependency_writers/gift_ppa.py @@ -80,6 +80,7 @@ def testFormatDPKGTestDependencies(self): expected_formatted_test_dependencies = ( 'TEST_DEPENDENCIES="python3-distutils\n' + ' python3-lib2to3\n' ' python3-mock\n' ' python3-pbr\n' ' python3-setuptools";') @@ -87,6 +88,9 @@ def testFormatDPKGTestDependencies(self): python_dependencies = test_writer._GetDPKGPythonDependencies() test_dependencies = test_writer._GetDPKGTestDependencies( python_dependencies) + test_dependencies.extend([ + 'python3-distutils', 'python3-lib2to3', 'python3-setuptools']) + formatted_test_dependencies = test_writer._FormatDPKGTestDependencies( test_dependencies) self.assertEqual( diff --git a/tests/dependency_writers/interface.py b/tests/dependency_writers/interface.py index b8588494..4f7161e1 100644 --- a/tests/dependency_writers/interface.py +++ b/tests/dependency_writers/interface.py @@ -46,9 +46,7 @@ def testGetDPKGTestDependencies(self): """Tests the _GetDPKGTestDependencies function.""" test_writer = self._CreateTestWriter() - expected_test_dependencies = [ - 'python3-distutils', 'python3-mock', 'python3-pbr', - 'python3-setuptools'] + expected_test_dependencies = ['python3-mock', 'python3-pbr'] python_dependencies = test_writer._GetDPKGPythonDependencies() test_dependencies = test_writer._GetDPKGTestDependencies( diff --git a/tests/dependency_writers/linux_scripts.py b/tests/dependency_writers/linux_scripts.py index dfbb96e8..9874604b 100644 --- a/tests/dependency_writers/linux_scripts.py +++ b/tests/dependency_writers/linux_scripts.py @@ -80,6 +80,7 @@ def testFormatDPKGTestDependencies(self): expected_formatted_test_dependencies = ( 'TEST_DEPENDENCIES="python3-distutils\n' + ' python3-lib2to3\n' ' python3-mock\n' ' python3-pbr\n' ' python3-setuptools";') @@ -87,6 +88,9 @@ def testFormatDPKGTestDependencies(self): python_dependencies = test_writer._GetDPKGPythonDependencies() test_dependencies = test_writer._GetDPKGTestDependencies( python_dependencies) + test_dependencies.extend([ + 'python3-distutils', 'python3-lib2to3', 'python3-setuptools']) + formatted_test_dependencies = test_writer._FormatDPKGTestDependencies( test_dependencies) self.assertEqual(