summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/install_headers.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-11-03 18:27:27 (GMT)
committerGitHub <noreply@github.com>2022-11-03 18:27:27 (GMT)
commit0faa0ba240e815614e5a2900e48007acac41b214 (patch)
tree20b8346df4331716aba051d6e05e039318176ba3 /Lib/distutils/command/install_headers.py
parentb07f546ea3a574bc3016fb023c157c65a47f4849 (diff)
downloadcpython-0faa0ba240e815614e5a2900e48007acac41b214.zip
cpython-0faa0ba240e815614e5a2900e48007acac41b214.tar.gz
cpython-0faa0ba240e815614e5a2900e48007acac41b214.tar.bz2
gh-92584: Remove the distutils package (#99061)
Remove the distutils package. It was deprecated in Python 3.10 by PEP 632 "Deprecate distutils module". For projects still using distutils and cannot be updated to something else, the setuptools project can be installed: it still provides distutils. * Remove Lib/distutils/ directory * Remove test_distutils * Remove references to distutils * Skip test_check_c_globals and test_peg_generator since they use distutils
Diffstat (limited to 'Lib/distutils/command/install_headers.py')
-rw-r--r--Lib/distutils/command/install_headers.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/Lib/distutils/command/install_headers.py b/Lib/distutils/command/install_headers.py
deleted file mode 100644
index 9bb0b18..0000000
--- a/Lib/distutils/command/install_headers.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""distutils.command.install_headers
-
-Implements the Distutils 'install_headers' command, to install C/C++ header
-files to the Python include directory."""
-
-from distutils.core import Command
-
-
-# XXX force is never used
-class install_headers(Command):
-
- description = "install C/C++ header files"
-
- user_options = [('install-dir=', 'd',
- "directory to install header files to"),
- ('force', 'f',
- "force installation (overwrite existing files)"),
- ]
-
- boolean_options = ['force']
-
- def initialize_options(self):
- self.install_dir = None
- self.force = 0
- self.outfiles = []
-
- def finalize_options(self):
- self.set_undefined_options('install',
- ('install_headers', 'install_dir'),
- ('force', 'force'))
-
-
- def run(self):
- headers = self.distribution.headers
- if not headers:
- return
-
- self.mkpath(self.install_dir)
- for header in headers:
- (out, _) = self.copy_file(header, self.install_dir)
- self.outfiles.append(out)
-
- def get_inputs(self):
- return self.distribution.headers or []
-
- def get_outputs(self):
- return self.outfiles