Skip to content

Replace deprecated distutils.dep_util by setuptools.modified. #192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions share/plug-ins/show_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
by the GNATprove --flow-show-gg switch.
"""

import distutils.dep_util
import setuptools.modified
import json
import os

Expand Down Expand Up @@ -280,7 +280,7 @@ def show_generated_global_contracts():
)
gg_json = os.path.join(objdir, "gnatprove", unitname + ".gg")

if distutils.dep_util.newer(file.name(), gg_json):
if setuptools.modified.newer(file.name(), gg_json):
prj = ' -P """%s"""' % project.file().name("Build_Server")
scenario = project.scenario_variables_cmd_line("-X")
cmd = COMMAND.format(project=prj, unit=file.base_name())
Expand Down
4 changes: 2 additions & 2 deletions share/support/core/expanded_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


import os
import distutils.dep_util
import setuptools.modified
import GPS
from gs_utils import in_ada_file, interactive

Expand Down Expand Up @@ -197,7 +197,7 @@ def show_gnatdg(for_subprogram=False, in_external_editor=False):

dg = os.path.join(objdir, os.path.basename(local_file)) + ".dg"

if distutils.dep_util.newer(local_file, dg):
if setuptools.modified.newer(local_file, dg):
file_name = '"""%s"""' % file
scenario = GPS.Project.root().scenario_variables_cmd_line("-X")
cmd = "gprbuild -q %s -f -c -u -gnatcdx -gnatws -gnatGL" % prj
Expand Down
4 changes: 2 additions & 2 deletions share/support/core/pre_processing_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""

import os
import distutils.dep_util
import setuptools.modified
import GPS
from gs_utils import in_ada_file, interactive, hook

Expand Down Expand Up @@ -102,7 +102,7 @@ def show_inactive_code(file_name, prep_name, for_subprogram=False):
mode="error",
)
# Do nothing is the .prep file is too old
elif distutils.dep_util.newer(file_name, prep_name):
elif setuptools.modified.newer(file_name, prep_name):
GPS.Console("Messages").write(
"The .prep file is too old," + " please recompile the ada file.\n",
mode="error",
Expand Down