Skip to content

Commit

Permalink
Changes to dependency writers and removed obsolete future package (#1231
Browse files Browse the repository at this point in the history
)
  • Loading branch information
joachimmetz authored Apr 9, 2024
1 parent 4b90fc5 commit 429f960
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 47 deletions.
19 changes: 0 additions & 19 deletions data/licenses/LICENSE.future

This file was deleted.

4 changes: 2 additions & 2 deletions data/presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
17 changes: 1 addition & 16 deletions data/projects.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ed@pythoncharmers.com>
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
Expand Down Expand Up @@ -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 <grr-dev@googlegroups.com>
homepage_url: https://github.com/google/grr/tree/master/api_client/python
download_url: https://pypi.org/project/grr-api-client
Expand Down Expand Up @@ -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 <ero.carrera@gmail.com>
Expand Down
4 changes: 4 additions & 0 deletions l2tdevtools/dependency_writers/gift_ppa.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
13 changes: 9 additions & 4 deletions l2tdevtools/dependency_writers/github_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))),
Expand All @@ -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()

Expand Down Expand Up @@ -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()

Expand Down
3 changes: 0 additions & 3 deletions l2tdevtools/dependency_writers/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 4 additions & 0 deletions l2tdevtools/dependency_writers/linux_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']

Expand Down
4 changes: 4 additions & 0 deletions tests/dependency_writers/gift_ppa.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,17 @@ def testFormatDPKGTestDependencies(self):

expected_formatted_test_dependencies = (
'TEST_DEPENDENCIES="python3-distutils\n'
' python3-lib2to3\n'
' python3-mock\n'
' python3-pbr\n'
' python3-setuptools";')

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(
Expand Down
4 changes: 1 addition & 3 deletions tests/dependency_writers/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 4 additions & 0 deletions tests/dependency_writers/linux_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,17 @@ def testFormatDPKGTestDependencies(self):

expected_formatted_test_dependencies = (
'TEST_DEPENDENCIES="python3-distutils\n'
' python3-lib2to3\n'
' python3-mock\n'
' python3-pbr\n'
' python3-setuptools";')

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(
Expand Down

0 comments on commit 429f960

Please sign in to comment.