Skip to content
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

Remove dead-code from setup.py #4659

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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: 0 additions & 29 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python

import os
import sys
import textwrap

import setuptools
Expand All @@ -10,33 +9,6 @@
here = os.path.dirname(__file__)


package_data = {
"": ["LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*"],
"setuptools": ['script (dev).tmpl', 'script.tmpl', 'site-patch.py'],
}

force_windows_specific_files = os.environ.get(
"SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES", "1"
).lower() not in ("", "0", "false", "no")

include_windows_files = sys.platform == 'win32' or force_windows_specific_files

if include_windows_files:
package_data.setdefault('setuptools', []).extend(['*.exe'])
package_data.setdefault('setuptools.command', []).extend(['*.xml'])


def pypi_link(pkg_filename):
"""
Given the filename, including md5 fragment, construct the
dependency link for PyPI.
"""
root = 'https://files.pythonhosted.org/packages/source'
name, sep, rest = pkg_filename.partition('-')
parts = root, name[0], name, pkg_filename
return '/'.join(parts)


class install_with_pth(install):
"""
Custom install command to install a .pth file for distutils patching.
Expand Down Expand Up @@ -76,7 +48,7 @@
"""
Undo secondary effect of `extra_path` adding to `install_lib`
"""
suffix = os.path.relpath(self.install_lib, self.install_libbase)

Check warning on line 51 in setup.py

View workflow job for this annotation

GitHub Actions / pyright (3.8, ubuntu-latest)

No overloads for "relpath" match the provided arguments (reportCallIssue)

Check warning on line 51 in setup.py

View workflow job for this annotation

GitHub Actions / pyright (3.8, ubuntu-latest)

Argument of type "str | None" cannot be assigned to parameter "path" of type "StrPath" in function "relpath" (reportArgumentType)

if suffix.strip() == self._pth_contents.strip():
self.install_lib = self.install_libbase
Expand All @@ -84,7 +56,6 @@

setup_params = dict(
cmdclass={'install': install_with_pth},
package_data=package_data,
)

if __name__ == '__main__':
Expand Down
Loading