Skip to content

Remove distutils.command.install_data #2611

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

Closed
Closed
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
29 changes: 4 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,9 @@
if TYPE_CHECKING:
from setuptools._distutils import ccompiler
from setuptools._distutils._msvccompiler import MSVCCompiler
from setuptools._distutils.command.install_data import install_data
else:
from distutils import ccompiler
from distutils._msvccompiler import MSVCCompiler
from distutils.command.install_data import install_data


def my_new_compiler(**kw):
Expand Down Expand Up @@ -942,22 +940,6 @@ def set_libraries(self, libs):
self.libraries.extend(libs)


################################################################


class my_install_data(install_data):
"""A custom install_data command, which will install it's files
into the standard directories (normally lib/site-packages).
"""

def finalize_options(self):
if self.install_dir is None:
installobj = self.distribution.get_command_obj("install")
self.install_dir = installobj.install_lib
print("Installing data files to %s" % self.install_dir)
install_data.finalize_options(self)


################################################################

pywintypes = WinExt_system32(
Expand Down Expand Up @@ -1990,12 +1972,6 @@ def convert_optional_data_files(files):
win32_extensions + com_extensions + pythonwin_extensions + other_extensions
)

cmdclass = {
"build": my_build,
"build_ext": my_build_ext,
"install_data": my_install_data,
}

classifiers = [
"Environment :: Win32 (MS Windows)",
"Intended Audience :: Developers",
Expand Down Expand Up @@ -2023,7 +1999,10 @@ def convert_optional_data_files(files):
url="https://github.com/mhammond/pywin32",
license="PSF",
classifiers=classifiers,
cmdclass=cmdclass,
cmdclass={
"build": my_build,
"build_ext": my_build_ext,
},
# This adds the scripts under Python3XX/Scripts, but doesn't actually do much
scripts=[
"win32/scripts/pywin32_postinstall.py",
Expand Down
Loading