diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2023-02-06 18:40:51 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2023-02-06 18:40:51 -0500 |
commit | 43c6ee4b2b2ce4637bb1a36400fbaa548150ec8b (patch) | |
tree | a7cb3f207103241d8b3241724c45bc19aaa5991e /setuptools/_distutils/command | |
parent | 8032430d75cdfad9f9826d302d90cd7b23dea3ca (diff) | |
parent | 8c3c3d29bda85afb7f86c23a8ba66f7519f79e88 (diff) | |
download | python-setuptools-git-43c6ee4b2b2ce4637bb1a36400fbaa548150ec8b.tar.gz |
Merge https://github.com/pypa/distutils into distutils-8c3c3d29
Diffstat (limited to 'setuptools/_distutils/command')
-rw-r--r-- | setuptools/_distutils/command/bdist.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/bdist_dumb.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/bdist_rpm.py | 3 | ||||
-rw-r--r-- | setuptools/_distutils/command/build.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/build_clib.py | 9 | ||||
-rw-r--r-- | setuptools/_distutils/command/build_ext.py | 5 | ||||
-rw-r--r-- | setuptools/_distutils/command/build_py.py | 7 | ||||
-rw-r--r-- | setuptools/_distutils/command/build_scripts.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/clean.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/config.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/install.py | 3 | ||||
-rw-r--r-- | setuptools/_distutils/command/install_data.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/install_headers.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/install_lib.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/install_scripts.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/register.py | 1 | ||||
-rw-r--r-- | setuptools/_distutils/command/sdist.py | 5 | ||||
-rw-r--r-- | setuptools/_distutils/command/upload.py | 1 |
18 files changed, 13 insertions, 31 deletions
diff --git a/setuptools/_distutils/command/bdist.py b/setuptools/_distutils/command/bdist.py index bf0baab0..6329039c 100644 --- a/setuptools/_distutils/command/bdist.py +++ b/setuptools/_distutils/command/bdist.py @@ -33,7 +33,6 @@ class ListCompat(dict): class bdist(Command): - description = "create a built (binary) distribution" user_options = [ diff --git a/setuptools/_distutils/command/bdist_dumb.py b/setuptools/_distutils/command/bdist_dumb.py index 071da77e..01dd7907 100644 --- a/setuptools/_distutils/command/bdist_dumb.py +++ b/setuptools/_distutils/command/bdist_dumb.py @@ -14,7 +14,6 @@ from distutils._log import log class bdist_dumb(Command): - description = "create a \"dumb\" built distribution" user_options = [ diff --git a/setuptools/_distutils/command/bdist_rpm.py b/setuptools/_distutils/command/bdist_rpm.py index 340527b0..3ed608b4 100644 --- a/setuptools/_distutils/command/bdist_rpm.py +++ b/setuptools/_distutils/command/bdist_rpm.py @@ -21,7 +21,6 @@ from distutils._log import log class bdist_rpm(Command): - description = "create an RPM distribution" user_options = [ @@ -554,7 +553,7 @@ class bdist_rpm(Command): ('postun', 'post_uninstall', None), ] - for (rpm_opt, attr, default) in script_options: + for rpm_opt, attr, default in script_options: # Insert contents of file referred to, if no file is referred to # use 'default' as contents of script val = getattr(self, attr) diff --git a/setuptools/_distutils/command/build.py b/setuptools/_distutils/command/build.py index c3ab410f..cc9b367e 100644 --- a/setuptools/_distutils/command/build.py +++ b/setuptools/_distutils/command/build.py @@ -16,7 +16,6 @@ def show_compilers(): class build(Command): - description = "build everything needed to install" user_options = [ diff --git a/setuptools/_distutils/command/build_clib.py b/setuptools/_distutils/command/build_clib.py index f90c5664..b3f679b6 100644 --- a/setuptools/_distutils/command/build_clib.py +++ b/setuptools/_distutils/command/build_clib.py @@ -28,7 +28,6 @@ def show_compilers(): class build_clib(Command): - description = "build C/C++ libraries used by Python extensions" user_options = [ @@ -103,7 +102,7 @@ class build_clib(Command): self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples - for (name, value) in self.define: + for name, value in self.define: self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: @@ -155,14 +154,14 @@ class build_clib(Command): return None lib_names = [] - for (lib_name, build_info) in self.libraries: + for lib_name, build_info in self.libraries: lib_names.append(lib_name) return lib_names def get_source_files(self): self.check_library_list(self.libraries) filenames = [] - for (lib_name, build_info) in self.libraries: + for lib_name, build_info in self.libraries: sources = build_info.get('sources') if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError( @@ -175,7 +174,7 @@ class build_clib(Command): return filenames def build_libraries(self, libraries): - for (lib_name, build_info) in libraries: + for lib_name, build_info in libraries: sources = build_info.get('sources') if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError( diff --git a/setuptools/_distutils/command/build_ext.py b/setuptools/_distutils/command/build_ext.py index f4c0eccd..fbeec342 100644 --- a/setuptools/_distutils/command/build_ext.py +++ b/setuptools/_distutils/command/build_ext.py @@ -39,7 +39,6 @@ def show_compilers(): class build_ext(Command): - description = "build C/C++ extensions (compile/link to build directory)" # XXX thoughts on how to deal with complex command-line options like @@ -328,7 +327,7 @@ class build_ext(Command): self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples - for (name, value) in self.define: + for name, value in self.define: self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: @@ -721,7 +720,7 @@ class build_ext(Command): name = ext.name.split('.')[-1] try: # Unicode module name support as defined in PEP-489 - # https://www.python.org/dev/peps/pep-0489/#export-hook-name + # https://peps.python.org/pep-0489/#export-hook-name name.encode('ascii') except UnicodeEncodeError: suffix = 'U_' + name.encode('punycode').replace(b'-', b'_').decode('ascii') diff --git a/setuptools/_distutils/command/build_py.py b/setuptools/_distutils/command/build_py.py index 9f783244..d9df9592 100644 --- a/setuptools/_distutils/command/build_py.py +++ b/setuptools/_distutils/command/build_py.py @@ -14,7 +14,6 @@ from distutils._log import log class build_py(Command): - description = "\"build\" pure Python modules (copy to build directory)" user_options = [ @@ -310,7 +309,7 @@ class build_py(Command): def get_outputs(self, include_bytecode=1): modules = self.find_all_modules() outputs = [] - for (package, module, module_file) in modules: + for package, module, module_file in modules: package = package.split('.') filename = self.get_module_outfile(self.build_lib, package, module) outputs.append(filename) @@ -352,7 +351,7 @@ class build_py(Command): def build_modules(self): modules = self.find_modules() - for (package, module, module_file) in modules: + for package, module, module_file in modules: # Now "build" the module -- ie. copy the source file to # self.build_lib (the build directory for Python source). # (Actually, it gets copied to the directory for this package @@ -375,7 +374,7 @@ class build_py(Command): # Now loop over the modules we found, "building" each one (just # copy it to self.build_lib). - for (package_, module, module_file) in modules: + for package_, module, module_file in modules: assert package == package_ self.build_module(module, module_file, package) diff --git a/setuptools/_distutils/command/build_scripts.py b/setuptools/_distutils/command/build_scripts.py index 87174f6b..ce222f1e 100644 --- a/setuptools/_distutils/command/build_scripts.py +++ b/setuptools/_distutils/command/build_scripts.py @@ -22,7 +22,6 @@ first_line_re = shebang_pattern class build_scripts(Command): - description = "\"build\" scripts (copy and fixup #! line)" user_options = [ diff --git a/setuptools/_distutils/command/clean.py b/setuptools/_distutils/command/clean.py index d6eb3eba..9413f7cf 100644 --- a/setuptools/_distutils/command/clean.py +++ b/setuptools/_distutils/command/clean.py @@ -11,7 +11,6 @@ from distutils._log import log class clean(Command): - description = "clean up temporary files from 'build' command" user_options = [ ('build-base=', 'b', "base build directory (default: 'build.build-base')"), diff --git a/setuptools/_distutils/command/config.py b/setuptools/_distutils/command/config.py index 8bf0e489..494d97d1 100644 --- a/setuptools/_distutils/command/config.py +++ b/setuptools/_distutils/command/config.py @@ -21,7 +21,6 @@ LANG_EXT = {"c": ".c", "c++": ".cxx"} class config(Command): - description = "prepare to build" user_options = [ diff --git a/setuptools/_distutils/command/install.py b/setuptools/_distutils/command/install.py index 08d2f881..a7ac4e60 100644 --- a/setuptools/_distutils/command/install.py +++ b/setuptools/_distutils/command/install.py @@ -180,7 +180,6 @@ def _pypy_hack(name): class install(Command): - description = "install everything from build directory" user_options = [ @@ -609,7 +608,7 @@ class install(Command): for attr in attrs: val = getattr(self, attr) if val is not None: - if os.name == 'posix' or os.name == 'nt': + if os.name in ('posix', 'nt'): val = os.path.expanduser(val) val = subst_vars(val, self.config_vars) setattr(self, attr, val) diff --git a/setuptools/_distutils/command/install_data.py b/setuptools/_distutils/command/install_data.py index d92ed87a..7ba35eef 100644 --- a/setuptools/_distutils/command/install_data.py +++ b/setuptools/_distutils/command/install_data.py @@ -11,7 +11,6 @@ from ..util import change_root, convert_path class install_data(Command): - description = "install data files" user_options = [ diff --git a/setuptools/_distutils/command/install_headers.py b/setuptools/_distutils/command/install_headers.py index 1cdee823..085272c1 100644 --- a/setuptools/_distutils/command/install_headers.py +++ b/setuptools/_distutils/command/install_headers.py @@ -8,7 +8,6 @@ from ..core import Command # XXX force is never used class install_headers(Command): - description = "install C/C++ header files" user_options = [ diff --git a/setuptools/_distutils/command/install_lib.py b/setuptools/_distutils/command/install_lib.py index 840d3403..be4c2433 100644 --- a/setuptools/_distutils/command/install_lib.py +++ b/setuptools/_distutils/command/install_lib.py @@ -16,7 +16,6 @@ PYTHON_SOURCE_EXTENSION = ".py" class install_lib(Command): - description = "install all Python modules (extensions and pure Python)" # The byte-compilation options are a tad confusing. Here are the diff --git a/setuptools/_distutils/command/install_scripts.py b/setuptools/_distutils/command/install_scripts.py index ec6ec5ac..20f07aaa 100644 --- a/setuptools/_distutils/command/install_scripts.py +++ b/setuptools/_distutils/command/install_scripts.py @@ -12,7 +12,6 @@ from stat import ST_MODE class install_scripts(Command): - description = "install scripts (Python or otherwise)" user_options = [ diff --git a/setuptools/_distutils/command/register.py b/setuptools/_distutils/command/register.py index 55c1045e..c19aabb9 100644 --- a/setuptools/_distutils/command/register.py +++ b/setuptools/_distutils/command/register.py @@ -17,7 +17,6 @@ from distutils._log import log class register(PyPIRCCommand): - description = "register the distribution with the Python package index" user_options = PyPIRCCommand.user_options + [ ('list-classifiers', None, 'list the valid Trove classifiers'), diff --git a/setuptools/_distutils/command/sdist.py b/setuptools/_distutils/command/sdist.py index 5cfd4c14..ac489726 100644 --- a/setuptools/_distutils/command/sdist.py +++ b/setuptools/_distutils/command/sdist.py @@ -33,7 +33,6 @@ def show_formats(): class sdist(Command): - description = "create a source distribution (tarball, zip file, etc.)" def checking_metadata(self): @@ -235,7 +234,7 @@ class sdist(Command): """Add all the default files to self.filelist: - README or README.txt - setup.py - - test/test*.py + - tests/test*.py and test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files. @@ -293,7 +292,7 @@ class sdist(Command): self.warn("standard file '%s' not found" % fn) def _add_defaults_optional(self): - optional = ['test/test*.py', 'setup.cfg'] + optional = ['tests/test*.py', 'test/test*.py', 'setup.cfg'] for pattern in optional: files = filter(os.path.isfile, glob(pattern)) self.filelist.extend(files) diff --git a/setuptools/_distutils/command/upload.py b/setuptools/_distutils/command/upload.py index 16e15d8b..caf15f04 100644 --- a/setuptools/_distutils/command/upload.py +++ b/setuptools/_distutils/command/upload.py @@ -27,7 +27,6 @@ _FILE_CONTENT_DIGESTS = { class upload(PyPIRCCommand): - description = "upload binary package to PyPI" user_options = PyPIRCCommand.user_options + [ |