1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 15:27:14 +03:00

Merge pull request #2368 from HullSeals/enhancement/2367/pkg_tools

[2367] Remove pkg_resources
This commit is contained in:
David Sangrey 2025-02-17 00:42:50 +00:00 committed by GitHub
commit bbdb2bbce4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 5 additions and 45 deletions

View File

@ -60,7 +60,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel flake8
pip install flake8
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; elif [ -f requirements.txt ]; then pip install -r requirements.txt ; fi
####################################################################

View File

@ -33,7 +33,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel flake8 pytest
pip install flake8 pytest
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Setup flake8 annotations

View File

@ -109,7 +109,6 @@ jobs:
- name: Install python tools
run: |
pip install wheel
pip install -r requirements-dev.txt
- name: Download winsparkle

View File

@ -51,7 +51,7 @@ repos:
- id: mypy
# verbose: true
# log_file: 'pre-commit_mypy.log'
additional_dependencies: [ types-pkg-resources, types-requests, types-urllib3 ]
additional_dependencies: [ types-setuptools, types-requests, types-urllib3 ]
# args: [ "--follow-imports", "skip", "--ignore-missing-imports", "--scripts-are-modules" ]
### # pydocstyle.exe <file>

View File

@ -129,7 +129,6 @@ def build() -> None:
"packages": [
"asyncio",
"multiprocessing",
"pkg_resources._vendor.platformdirs",
"sqlite3",
"util",
],

View File

@ -1,11 +1,7 @@
# So that you don't get warnings like:
# Using legacy 'setup.py install' for flake8-annotations-coverage, since package 'wheel' is not installed.
wheel
# We can't rely on just picking this up from either the base (not venv),
# or venv-init-time version. Specify here so that dependabot will prod us
# about new versions.
setuptools==70.0.0
setuptools==75.8.0
# Static analysis tools
flake8==7.1.1
@ -22,7 +18,7 @@ mypy==1.14.1
pep8-naming==0.14.1
safety==3.2.14
types-requests==2.32.0.20241016
types-pkg-resources==0.1.3
types-setuptools==75.8.0.20250210
# Code formatting tools
autopep8==2.3.2

View File

@ -1,34 +0,0 @@
#!/usr/bin/env python3
"""Search for dependencies given a package."""
import sys
import pkg_resources
def find_reverse_deps(package_name: str) -> list[str]:
"""
Find the packages that depend on the named one.
:param package_name: Target package.
:return: List of packages that depend on this one.
"""
return [
pkg.project_name for pkg in pkg_resources.WorkingSet()
if package_name in {req.project_name for req in pkg.requires()}
]
if __name__ == '__main__':
if len(sys.argv) != 2:
print("Usage: python reverse_deps.py <package_name>")
sys.exit(1)
package_name = sys.argv[1]
reverse_deps = find_reverse_deps(package_name)
if reverse_deps:
print(f"Reverse dependencies of '{package_name}':")
for dep in reverse_deps:
print(dep)
else:
print(f"No reverse dependencies found for '{package_name}'.")