py2docfx 0.1.9.dev1897554__py3-none-any.whl → 0.1.9.dev1917798__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- py2docfx/convert_prepare/environment.py +25 -6
- py2docfx/convert_prepare/tests/test_generate_document.py +4 -4
- py2docfx/convert_prepare/tests/test_get_source.py +6 -6
- py2docfx/convert_prepare/tests/test_params.py +1 -1
- py2docfx/convert_prepare/tests/test_sphinx_caller.py +3 -3
- py2docfx/venv/basevenv/Lib/site-packages/_distutils_hack/__init__.py +2 -3
- py2docfx/venv/basevenv/Lib/site-packages/packaging/__init__.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_elffile.py +4 -4
- py2docfx/venv/basevenv/Lib/site-packages/packaging/_manylinux.py +1 -0
- py2docfx/venv/basevenv/Lib/site-packages/packaging/licenses/__init__.py +145 -0
- py2docfx/venv/basevenv/Lib/site-packages/packaging/licenses/_spdx.py +759 -0
- py2docfx/venv/basevenv/Lib/site-packages/packaging/markers.py +15 -9
- py2docfx/venv/basevenv/Lib/site-packages/packaging/metadata.py +83 -24
- py2docfx/venv/basevenv/Lib/site-packages/packaging/specifiers.py +19 -8
- py2docfx/venv/basevenv/Lib/site-packages/packaging/tags.py +78 -29
- py2docfx/venv/basevenv/Lib/site-packages/packaging/utils.py +33 -44
- py2docfx/venv/basevenv/Lib/site-packages/packaging/version.py +26 -7
- py2docfx/venv/basevenv/Lib/site-packages/pkg_resources/__init__.py +27 -32
- py2docfx/venv/basevenv/Lib/site-packages/pkg_resources/tests/test_pkg_resources.py +4 -4
- py2docfx/venv/basevenv/Lib/site-packages/pkg_resources/tests/test_resources.py +7 -7
- py2docfx/venv/basevenv/Lib/site-packages/pkg_resources/tests/test_working_set.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/__init__.py +7 -9
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compat/py38.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/dir_util.py +3 -8
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/tests/test_dir_util.py +22 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_importlib.py +1 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_path.py +5 -8
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_reqs.py +2 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_shutil.py +53 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/__init__.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/_elffile.py +4 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/_manylinux.py +1 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/licenses/__init__.py +145 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/licenses/_spdx.py +759 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/markers.py +15 -9
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/metadata.py +83 -24
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/specifiers.py +19 -8
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/tags.py +78 -29
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/utils.py +33 -44
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/packaging/version.py +26 -7
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/archive_util.py +6 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/build_meta.py +23 -17
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/__init__.py +9 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/_requirestxt.py +4 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/alias.py +3 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_egg.py +27 -13
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_rpm.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_wheel.py +18 -45
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/build.py +3 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/build_clib.py +2 -9
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/build_ext.py +13 -12
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/build_py.py +17 -16
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/develop.py +4 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/dist_info.py +3 -7
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/easy_install.py +55 -78
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/editable_wheel.py +19 -21
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/egg_info.py +29 -30
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install.py +31 -13
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install_egg_info.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install_lib.py +10 -7
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install_scripts.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/rotate.py +6 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/sdist.py +9 -8
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/setopt.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/config/_apply_pyprojecttoml.py +19 -14
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/config/expand.py +22 -16
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/config/pyprojecttoml.py +25 -10
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/config/setupcfg.py +39 -47
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/depends.py +26 -7
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/discovery.py +21 -14
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/dist.py +48 -45
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/errors.py +21 -26
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/extension.py +18 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/glob.py +35 -15
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/installer.py +6 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/launch.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/logging.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/modified.py +16 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/monkey.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/msvc.py +25 -14
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/namespaces.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/package_index.py +42 -43
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/sandbox.py +19 -12
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/downloads/__init__.py +5 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_apply_pyprojecttoml.py +7 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_expand.py +3 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml.py +9 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py +21 -11
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_setupcfg.py +12 -16
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/integration/test_pip_install_sdist.py +10 -11
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_bdist_egg.py +7 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_bdist_wheel.py +10 -33
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_ext.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_meta.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_py.py +6 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_config_discovery.py +4 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_core_metadata.py +3 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_dist.py +11 -13
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_dist_info.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_distutils_adoption.py +44 -5
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_easy_install.py +32 -26
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_editable_install.py +10 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_egg_info.py +15 -15
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_glob.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_logging.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_manifest.py +2 -8
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_packageindex.py +6 -17
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_setuptools.py +4 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_shutil_wrapper.py +23 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_wheel.py +29 -20
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_windows_wrappers.py +3 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/warnings.py +5 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/wheel.py +4 -4
- py2docfx/venv/basevenv/Lib/site-packages/wheel/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/wheel/_bdist_wheel.py +9 -0
- py2docfx/venv/basevenv/Lib/site-packages/wheel/bdist_wheel.py +17 -2
- py2docfx/venv/basevenv/Lib/site-packages/wheel/cli/convert.py +280 -220
- py2docfx/venv/basevenv/Lib/site-packages/wheel/util.py +0 -9
- py2docfx/venv/venv1/Lib/site-packages/_distutils_hack/__init__.py +2 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/_enum_meta.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/_pipeline_client.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/_pipeline_client_async.py +5 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/credentials.py +6 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/exceptions.py +13 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/core/messaging.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/paging.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/__init__.py +16 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/_base.py +15 -4
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/_base_async.py +20 -10
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/_tools.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_authentication.py +55 -19
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_authentication_async.py +46 -15
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_custom_hook.py +8 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_distributed_tracing.py +9 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_redirect.py +9 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_redirect_async.py +4 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_retry.py +27 -8
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_retry_async.py +6 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_sensitive_header_cleanup_policy.py +4 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_universal.py +6 -10
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/policies/_utils.py +101 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_aiohttp.py +9 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_base.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_base_async.py +7 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_requests_asyncio.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_requests_basic.py +11 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/pipeline/transport/_requests_trio.py +11 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/polling/_async_poller.py +5 -2
- py2docfx/venv/venv1/Lib/site-packages/azure/core/polling/_poller.py +4 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/polling/async_base_polling.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/polling/base_polling.py +47 -16
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_helpers.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_http_response_impl.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/rest/_requests_basic.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/serialization.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/settings.py +15 -3
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/_abstract_span.py +15 -5
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/common.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/decorator.py +12 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/decorator_async.py +24 -4
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/ext/opencensus_span/__init__.py +119 -110
- py2docfx/venv/venv1/Lib/site-packages/azure/core/tracing/ext/opencensus_span/_version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/azure/core/utils/_pipeline_transport_rest_shared_async.py +10 -1
- py2docfx/venv/venv1/Lib/site-packages/google/api/client_pb2.py +41 -39
- py2docfx/venv/venv1/Lib/site-packages/google/api/error_reason_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/api/httpbody_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/api/metric_pb2.py +17 -11
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/client_options.py +17 -13
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/protobuf_helpers.py +1 -3
- py2docfx/venv/venv1/Lib/site-packages/google/api_core/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/_default.py +4 -0
- py2docfx/venv/venv1/Lib/site-packages/google/auth/compute_engine/_metadata.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/iam.py +25 -8
- py2docfx/venv/venv1/Lib/site-packages/google/auth/impersonated_credentials.py +34 -16
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/_requests_base.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/google/auth/transport/requests.py +2 -3
- py2docfx/venv/venv1/Lib/site-packages/google/auth/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/oauth2/_client.py +10 -2
- py2docfx/venv/venv1/Lib/site-packages/google/oauth2/service_account.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/api_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/compiler/plugin_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/duration_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/empty_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/field_mask_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/runtime_version.py +1 -7
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/source_context_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/struct_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/timestamp_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/type_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/wrappers_pb2.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/pkg_resources/__init__.py +27 -32
- py2docfx/venv/venv1/Lib/site-packages/pkg_resources/tests/test_pkg_resources.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/pkg_resources/tests/test_resources.py +7 -7
- py2docfx/venv/venv1/Lib/site-packages/pkg_resources/tests/test_working_set.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/proto/enums.py +3 -1
- py2docfx/venv/venv1/Lib/site-packages/proto/marshal/collections/repeated.py +7 -2
- py2docfx/venv/venv1/Lib/site-packages/proto/marshal/compat.py +18 -21
- py2docfx/venv/venv1/Lib/site-packages/proto/marshal/rules/message.py +7 -3
- py2docfx/venv/venv1/Lib/site-packages/proto/message.py +6 -35
- py2docfx/venv/venv1/Lib/site-packages/proto/version.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/__init__.py +7 -9
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compat/py38.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/dir_util.py +3 -8
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/tests/test_dir_util.py +22 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_importlib.py +1 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_path.py +5 -8
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_reqs.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_shutil.py +53 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/__init__.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/_elffile.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/_manylinux.py +1 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/licenses/__init__.py +145 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/licenses/_spdx.py +759 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/markers.py +15 -9
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/metadata.py +83 -24
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/specifiers.py +19 -8
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/tags.py +78 -29
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/utils.py +33 -44
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/packaging/version.py +26 -7
- py2docfx/venv/venv1/Lib/site-packages/setuptools/archive_util.py +6 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/build_meta.py +23 -17
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/__init__.py +9 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/_requirestxt.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/alias.py +3 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_egg.py +27 -13
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_rpm.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_wheel.py +18 -45
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/build.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/build_clib.py +2 -9
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/build_ext.py +13 -12
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/build_py.py +17 -16
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/develop.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/dist_info.py +3 -7
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/easy_install.py +55 -78
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/editable_wheel.py +19 -21
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/egg_info.py +29 -30
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install.py +31 -13
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install_egg_info.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install_lib.py +10 -7
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install_scripts.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/rotate.py +6 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/sdist.py +9 -8
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/setopt.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/config/_apply_pyprojecttoml.py +19 -14
- py2docfx/venv/venv1/Lib/site-packages/setuptools/config/expand.py +22 -16
- py2docfx/venv/venv1/Lib/site-packages/setuptools/config/pyprojecttoml.py +25 -10
- py2docfx/venv/venv1/Lib/site-packages/setuptools/config/setupcfg.py +39 -47
- py2docfx/venv/venv1/Lib/site-packages/setuptools/depends.py +26 -7
- py2docfx/venv/venv1/Lib/site-packages/setuptools/discovery.py +21 -14
- py2docfx/venv/venv1/Lib/site-packages/setuptools/dist.py +48 -45
- py2docfx/venv/venv1/Lib/site-packages/setuptools/errors.py +21 -26
- py2docfx/venv/venv1/Lib/site-packages/setuptools/extension.py +18 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/glob.py +35 -15
- py2docfx/venv/venv1/Lib/site-packages/setuptools/installer.py +6 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/launch.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/logging.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/modified.py +16 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/monkey.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/msvc.py +25 -14
- py2docfx/venv/venv1/Lib/site-packages/setuptools/namespaces.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/package_index.py +42 -43
- py2docfx/venv/venv1/Lib/site-packages/setuptools/sandbox.py +19 -12
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/downloads/__init__.py +5 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_apply_pyprojecttoml.py +7 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_expand.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml.py +9 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py +21 -11
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_setupcfg.py +12 -16
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/integration/test_pip_install_sdist.py +10 -11
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_bdist_egg.py +7 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_bdist_wheel.py +10 -33
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_ext.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_meta.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_py.py +6 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_config_discovery.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_core_metadata.py +3 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_dist.py +11 -13
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_dist_info.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_distutils_adoption.py +44 -5
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_easy_install.py +32 -26
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_editable_install.py +10 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_egg_info.py +15 -15
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_glob.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_logging.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_manifest.py +2 -8
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_packageindex.py +6 -17
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_setuptools.py +4 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_shutil_wrapper.py +23 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_wheel.py +29 -20
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_windows_wrappers.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/warnings.py +5 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/wheel.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/wheel/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/wheel/_bdist_wheel.py +9 -0
- py2docfx/venv/venv1/Lib/site-packages/wheel/bdist_wheel.py +17 -2
- py2docfx/venv/venv1/Lib/site-packages/wheel/cli/convert.py +280 -220
- py2docfx/venv/venv1/Lib/site-packages/wheel/util.py +0 -9
- {py2docfx-0.1.9.dev1897554.dist-info → py2docfx-0.1.9.dev1917798.dist-info}/METADATA +1 -1
- {py2docfx-0.1.9.dev1897554.dist-info → py2docfx-0.1.9.dev1917798.dist-info}/RECORD +307 -367
- {py2docfx-0.1.9.dev1897554.dist-info → py2docfx-0.1.9.dev1917798.dist-info}/WHEEL +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/__init__.py +0 -36
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/_adapters.py +0 -168
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/_common.py +0 -210
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/_itertools.py +0 -38
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/abc.py +0 -171
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/compat/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/compat/py38.py +0 -11
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/compat/py39.py +0 -10
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/functional.py +0 -81
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/future/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/future/adapters.py +0 -95
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/readers.py +0 -194
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/simple.py +0 -106
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/_path.py +0 -56
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/compat/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/compat/py312.py +0 -18
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/compat/py39.py +0 -10
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data01/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data01/subdirectory/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data02/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data02/one/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data02/two/__init__.py +0 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_compatibilty_files.py +0 -104
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_contents.py +0 -43
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_custom.py +0 -47
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_files.py +0 -117
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_functional.py +0 -242
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_open.py +0 -89
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_path.py +0 -65
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_read.py +0 -97
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_reader.py +0 -145
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_resource.py +0 -241
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/util.py +0 -164
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/zip.py +0 -32
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/__init__.py +0 -36
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/_adapters.py +0 -168
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/_common.py +0 -210
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/_itertools.py +0 -38
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/abc.py +0 -171
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/compat/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/compat/py38.py +0 -11
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/compat/py39.py +0 -10
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/functional.py +0 -81
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/future/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/future/adapters.py +0 -95
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/readers.py +0 -194
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/simple.py +0 -106
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/_path.py +0 -56
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/compat/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/compat/py312.py +0 -18
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/compat/py39.py +0 -10
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data01/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data01/subdirectory/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data02/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data02/one/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/data02/two/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_compatibilty_files.py +0 -104
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_contents.py +0 -43
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_custom.py +0 -47
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_files.py +0 -117
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_functional.py +0 -242
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_open.py +0 -89
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_path.py +0 -65
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_read.py +0 -97
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_reader.py +0 -145
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/test_resource.py +0 -241
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/util.py +0 -164
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/importlib_resources/tests/zip.py +0 -32
- {py2docfx-0.1.9.dev1897554.dist-info → py2docfx-0.1.9.dev1917798.dist-info}/top_level.txt +0 -0
@@ -25,13 +25,14 @@ import importlib
|
|
25
25
|
import os
|
26
26
|
import pathlib
|
27
27
|
import sys
|
28
|
+
from collections.abc import Iterable, Iterator, Mapping
|
28
29
|
from configparser import ConfigParser
|
29
30
|
from glob import iglob
|
30
31
|
from importlib.machinery import ModuleSpec, all_suffixes
|
31
32
|
from itertools import chain
|
32
33
|
from pathlib import Path
|
33
34
|
from types import ModuleType, TracebackType
|
34
|
-
from typing import TYPE_CHECKING, Any, Callable,
|
35
|
+
from typing import TYPE_CHECKING, Any, Callable, TypeVar
|
35
36
|
|
36
37
|
from .._path import StrPath, same_path as _same_path
|
37
38
|
from ..discovery import find_package_path
|
@@ -45,13 +46,13 @@ if TYPE_CHECKING:
|
|
45
46
|
from setuptools.dist import Distribution
|
46
47
|
|
47
48
|
_K = TypeVar("_K")
|
48
|
-
|
49
|
+
_V_co = TypeVar("_V_co", covariant=True)
|
49
50
|
|
50
51
|
|
51
52
|
class StaticModule:
|
52
53
|
"""Proxy to a module object that avoids executing arbitrary code."""
|
53
54
|
|
54
|
-
def __init__(self, name: str, spec: ModuleSpec):
|
55
|
+
def __init__(self, name: str, spec: ModuleSpec) -> None:
|
55
56
|
module = ast.parse(pathlib.Path(spec.origin).read_bytes()) # type: ignore[arg-type] # Let it raise an error on None
|
56
57
|
vars(self).update(locals())
|
57
58
|
del self.self
|
@@ -203,7 +204,8 @@ def _load_spec(spec: ModuleSpec, module_name: str) -> ModuleType:
|
|
203
204
|
return sys.modules[name]
|
204
205
|
module = importlib.util.module_from_spec(spec)
|
205
206
|
sys.modules[name] = module # cache (it also ensures `==` works on loaded items)
|
206
|
-
spec.loader
|
207
|
+
assert spec.loader is not None
|
208
|
+
spec.loader.exec_module(module)
|
207
209
|
return module
|
208
210
|
|
209
211
|
|
@@ -285,10 +287,11 @@ def find_packages(
|
|
285
287
|
|
286
288
|
from setuptools.discovery import construct_package_dir
|
287
289
|
|
288
|
-
|
289
|
-
|
290
|
+
# check "not namespaces" first due to python/mypy#6232
|
291
|
+
if not namespaces:
|
292
|
+
from setuptools.discovery import PackageFinder
|
290
293
|
else:
|
291
|
-
from setuptools.discovery import
|
294
|
+
from setuptools.discovery import PEP420PackageFinder as PackageFinder
|
292
295
|
|
293
296
|
root_dir = root_dir or os.curdir
|
294
297
|
where = kwargs.pop('where', ['.'])
|
@@ -352,14 +355,17 @@ def canonic_data_files(
|
|
352
355
|
]
|
353
356
|
|
354
357
|
|
355
|
-
def entry_points(
|
358
|
+
def entry_points(
|
359
|
+
text: str, text_source: str = "entry-points"
|
360
|
+
) -> dict[str, dict[str, str]]:
|
356
361
|
"""Given the contents of entry-points file,
|
357
362
|
process it into a 2-level dictionary (``dict[str, dict[str, str]]``).
|
358
363
|
The first level keys are entry-point groups, the second level keys are
|
359
364
|
entry-point names, and the second level values are references to objects
|
360
365
|
(that correspond to the entry-point value).
|
361
366
|
"""
|
362
|
-
|
367
|
+
# Using undocumented behaviour, see python/typeshed#12700
|
368
|
+
parser = ConfigParser(default_section=None, delimiters=("=",)) # type: ignore[call-overload]
|
363
369
|
parser.optionxform = str # case sensitive
|
364
370
|
parser.read_string(text, text_source)
|
365
371
|
groups = {k: dict(v.items()) for k, v in parser.items()}
|
@@ -377,7 +383,7 @@ class EnsurePackagesDiscovered:
|
|
377
383
|
and those might not have been processed yet.
|
378
384
|
"""
|
379
385
|
|
380
|
-
def __init__(self, distribution: Distribution):
|
386
|
+
def __init__(self, distribution: Distribution) -> None:
|
381
387
|
self._dist = distribution
|
382
388
|
self._called = False
|
383
389
|
|
@@ -395,7 +401,7 @@ class EnsurePackagesDiscovered:
|
|
395
401
|
exc_type: type[BaseException] | None,
|
396
402
|
exc_value: BaseException | None,
|
397
403
|
traceback: TracebackType | None,
|
398
|
-
)
|
404
|
+
):
|
399
405
|
if self._called:
|
400
406
|
self._dist.set_defaults.analyse_name() # Now we can set a default name
|
401
407
|
|
@@ -410,7 +416,7 @@ class EnsurePackagesDiscovered:
|
|
410
416
|
return LazyMappingProxy(self._get_package_dir)
|
411
417
|
|
412
418
|
|
413
|
-
class LazyMappingProxy(Mapping[_K,
|
419
|
+
class LazyMappingProxy(Mapping[_K, _V_co]):
|
414
420
|
"""Mapping proxy that delays resolving the target object, until really needed.
|
415
421
|
|
416
422
|
>>> def obtain_mapping():
|
@@ -424,16 +430,16 @@ class LazyMappingProxy(Mapping[_K, _V]):
|
|
424
430
|
'other value'
|
425
431
|
"""
|
426
432
|
|
427
|
-
def __init__(self, obtain_mapping_value: Callable[[], Mapping[_K,
|
433
|
+
def __init__(self, obtain_mapping_value: Callable[[], Mapping[_K, _V_co]]) -> None:
|
428
434
|
self._obtain = obtain_mapping_value
|
429
|
-
self._value: Mapping[_K,
|
435
|
+
self._value: Mapping[_K, _V_co] | None = None
|
430
436
|
|
431
|
-
def _target(self) -> Mapping[_K,
|
437
|
+
def _target(self) -> Mapping[_K, _V_co]:
|
432
438
|
if self._value is None:
|
433
439
|
self._value = self._obtain()
|
434
440
|
return self._value
|
435
441
|
|
436
|
-
def __getitem__(self, key: _K) ->
|
442
|
+
def __getitem__(self, key: _K) -> _V_co:
|
437
443
|
return self._target()[key]
|
438
444
|
|
439
445
|
def __len__(self) -> int:
|
@@ -13,10 +13,11 @@ from __future__ import annotations
|
|
13
13
|
|
14
14
|
import logging
|
15
15
|
import os
|
16
|
+
from collections.abc import Mapping
|
16
17
|
from contextlib import contextmanager
|
17
18
|
from functools import partial
|
18
19
|
from types import TracebackType
|
19
|
-
from typing import TYPE_CHECKING, Any, Callable
|
20
|
+
from typing import TYPE_CHECKING, Any, Callable
|
20
21
|
|
21
22
|
from .._path import StrPath
|
22
23
|
from ..errors import FileError, InvalidConfigError
|
@@ -40,12 +41,25 @@ def load_file(filepath: StrPath) -> dict:
|
|
40
41
|
|
41
42
|
|
42
43
|
def validate(config: dict, filepath: StrPath) -> bool:
|
44
|
+
skip = os.getenv("SETUPTOOLS_DANGEROUSLY_SKIP_PYPROJECT_VALIDATION", "false")
|
45
|
+
if skip.lower() == "true": # https://github.com/pypa/setuptools/issues/4459
|
46
|
+
SetuptoolsWarning.emit(
|
47
|
+
"Skipping the validation of `pyproject.toml`.",
|
48
|
+
"""
|
49
|
+
Please note that some setuptools functionalities rely on the validation of
|
50
|
+
`pyproject.toml` against misconfiguration to ensure proper operation.
|
51
|
+
By skipping the automatic checks, you taking responsibility for making sure
|
52
|
+
the file is valid. Otherwise unexpected behaviours may occur.
|
53
|
+
""",
|
54
|
+
)
|
55
|
+
return True
|
56
|
+
|
43
57
|
from . import _validate_pyproject as validator
|
44
58
|
|
45
59
|
trove_classifier = validator.FORMAT_FUNCTIONS.get("trove-classifier")
|
46
60
|
if hasattr(trove_classifier, "_disable_download"):
|
47
|
-
# Improve reproducibility by default. See
|
48
|
-
trove_classifier._disable_download() # type: ignore
|
61
|
+
# Improve reproducibility by default. See abravalheri/validate-pyproject#31
|
62
|
+
trove_classifier._disable_download() # type: ignore[union-attr]
|
49
63
|
|
50
64
|
try:
|
51
65
|
return validator.validate(config)
|
@@ -63,7 +77,7 @@ def validate(config: dict, filepath: StrPath) -> bool:
|
|
63
77
|
def apply_configuration(
|
64
78
|
dist: Distribution,
|
65
79
|
filepath: StrPath,
|
66
|
-
ignore_option_errors=False,
|
80
|
+
ignore_option_errors: bool = False,
|
67
81
|
) -> Distribution:
|
68
82
|
"""Apply the configuration from a ``pyproject.toml`` file into an existing
|
69
83
|
distribution object.
|
@@ -74,8 +88,8 @@ def apply_configuration(
|
|
74
88
|
|
75
89
|
def read_configuration(
|
76
90
|
filepath: StrPath,
|
77
|
-
expand=True,
|
78
|
-
ignore_option_errors=False,
|
91
|
+
expand: bool = True,
|
92
|
+
ignore_option_errors: bool = False,
|
79
93
|
dist: Distribution | None = None,
|
80
94
|
) -> dict[str, Any]:
|
81
95
|
"""Read given configuration file and returns options from it as a dict.
|
@@ -175,7 +189,7 @@ class _ConfigExpander:
|
|
175
189
|
root_dir: StrPath | None = None,
|
176
190
|
ignore_option_errors: bool = False,
|
177
191
|
dist: Distribution | None = None,
|
178
|
-
):
|
192
|
+
) -> None:
|
179
193
|
self.config = config
|
180
194
|
self.root_dir = root_dir or os.getcwd()
|
181
195
|
self.project_cfg = config.get("project", {})
|
@@ -330,7 +344,7 @@ class _ConfigExpander:
|
|
330
344
|
|
331
345
|
def _obtain_entry_points(
|
332
346
|
self, dist: Distribution, package_dir: Mapping[str, str]
|
333
|
-
) -> dict[str, dict] | None:
|
347
|
+
) -> dict[str, dict[str, Any]] | None:
|
334
348
|
fields = ("entry-points", "scripts", "gui-scripts")
|
335
349
|
if not any(field in self.dynamic for field in fields):
|
336
350
|
return None
|
@@ -340,7 +354,8 @@ class _ConfigExpander:
|
|
340
354
|
return None
|
341
355
|
|
342
356
|
groups = _expand.entry_points(text)
|
343
|
-
|
357
|
+
# Any is str | dict[str, str], but causes variance issues
|
358
|
+
expanded: dict[str, dict[str, Any]] = {"entry-points": groups}
|
344
359
|
|
345
360
|
def _set_scripts(field: str, group: str):
|
346
361
|
if group in groups:
|
@@ -411,7 +426,7 @@ def _ignore_errors(ignore_option_errors: bool):
|
|
411
426
|
class _EnsurePackagesDiscovered(_expand.EnsurePackagesDiscovered):
|
412
427
|
def __init__(
|
413
428
|
self, distribution: Distribution, project_cfg: dict, setuptools_cfg: dict
|
414
|
-
):
|
429
|
+
) -> None:
|
415
430
|
super().__init__(distribution)
|
416
431
|
self._project_cfg = project_cfg
|
417
432
|
self._setuptools_cfg = setuptools_cfg
|
@@ -15,21 +15,9 @@ import contextlib
|
|
15
15
|
import functools
|
16
16
|
import os
|
17
17
|
from collections import defaultdict
|
18
|
+
from collections.abc import Iterable, Iterator
|
18
19
|
from functools import partial, wraps
|
19
|
-
from typing import
|
20
|
-
TYPE_CHECKING,
|
21
|
-
Any,
|
22
|
-
Callable,
|
23
|
-
Dict,
|
24
|
-
Generic,
|
25
|
-
Iterable,
|
26
|
-
Iterator,
|
27
|
-
List,
|
28
|
-
Tuple,
|
29
|
-
TypeVar,
|
30
|
-
Union,
|
31
|
-
cast,
|
32
|
-
)
|
20
|
+
from typing import TYPE_CHECKING, Any, Callable, ClassVar, Generic, TypeVar, cast
|
33
21
|
|
34
22
|
from packaging.markers import default_environment as marker_env
|
35
23
|
from packaging.requirements import InvalidRequirement, Requirement
|
@@ -42,22 +30,25 @@ from ..warnings import SetuptoolsDeprecationWarning
|
|
42
30
|
from . import expand
|
43
31
|
|
44
32
|
if TYPE_CHECKING:
|
33
|
+
from typing_extensions import TypeAlias
|
34
|
+
|
45
35
|
from setuptools.dist import Distribution
|
46
36
|
|
47
37
|
from distutils.dist import DistributionMetadata
|
48
38
|
|
49
|
-
SingleCommandOptions =
|
39
|
+
SingleCommandOptions: TypeAlias = dict[str, tuple[str, Any]]
|
50
40
|
"""Dict that associate the name of the options of a particular command to a
|
51
41
|
tuple. The first element of the tuple indicates the origin of the option value
|
52
42
|
(e.g. the name of the configuration file where it was read from),
|
53
43
|
while the second element of the tuple is the option value itself
|
54
44
|
"""
|
55
|
-
AllCommandOptions =
|
56
|
-
|
45
|
+
AllCommandOptions: TypeAlias = dict[str, SingleCommandOptions]
|
46
|
+
"""cmd name => its options"""
|
47
|
+
Target = TypeVar("Target", "Distribution", "DistributionMetadata")
|
57
48
|
|
58
49
|
|
59
50
|
def read_configuration(
|
60
|
-
filepath: StrPath, find_others=False, ignore_option_errors=False
|
51
|
+
filepath: StrPath, find_others: bool = False, ignore_option_errors: bool = False
|
61
52
|
) -> dict:
|
62
53
|
"""Read given configuration file and returns options from it as a dict.
|
63
54
|
|
@@ -96,7 +87,7 @@ def _apply(
|
|
96
87
|
filepath: StrPath,
|
97
88
|
other_files: Iterable[StrPath] = (),
|
98
89
|
ignore_option_errors: bool = False,
|
99
|
-
) -> tuple[
|
90
|
+
) -> tuple[ConfigMetadataHandler, ConfigOptionsHandler]:
|
100
91
|
"""Read configuration from ``filepath`` and applies to the ``dist`` object."""
|
101
92
|
from setuptools.dist import _Distribution
|
102
93
|
|
@@ -111,7 +102,7 @@ def _apply(
|
|
111
102
|
|
112
103
|
try:
|
113
104
|
# TODO: Temporary cast until mypy 1.12 is released with upstream fixes from typeshed
|
114
|
-
_Distribution.parse_config_files(dist, filenames=cast(
|
105
|
+
_Distribution.parse_config_files(dist, filenames=cast(list[str], filenames))
|
115
106
|
handlers = parse_configuration(
|
116
107
|
dist, dist.command_options, ignore_option_errors=ignore_option_errors
|
117
108
|
)
|
@@ -122,7 +113,7 @@ def _apply(
|
|
122
113
|
return handlers
|
123
114
|
|
124
115
|
|
125
|
-
def _get_option(target_obj:
|
116
|
+
def _get_option(target_obj: Distribution | DistributionMetadata, key: str):
|
126
117
|
"""
|
127
118
|
Given a target object and option key, get that option from
|
128
119
|
the target object, either through a get_{key} method or
|
@@ -134,10 +125,14 @@ def _get_option(target_obj: Target, key: str):
|
|
134
125
|
return getter()
|
135
126
|
|
136
127
|
|
137
|
-
def configuration_to_dict(
|
128
|
+
def configuration_to_dict(
|
129
|
+
handlers: Iterable[
|
130
|
+
ConfigHandler[Distribution] | ConfigHandler[DistributionMetadata]
|
131
|
+
],
|
132
|
+
) -> dict:
|
138
133
|
"""Returns configuration data gathered by given handlers as a dict.
|
139
134
|
|
140
|
-
:param
|
135
|
+
:param Iterable[ConfigHandler] handlers: Handlers list,
|
141
136
|
usually from parse_configuration()
|
142
137
|
|
143
138
|
:rtype: dict
|
@@ -155,7 +150,7 @@ def configuration_to_dict(handlers: tuple[ConfigHandler, ...]) -> dict:
|
|
155
150
|
def parse_configuration(
|
156
151
|
distribution: Distribution,
|
157
152
|
command_options: AllCommandOptions,
|
158
|
-
ignore_option_errors=False,
|
153
|
+
ignore_option_errors: bool = False,
|
159
154
|
) -> tuple[ConfigMetadataHandler, ConfigOptionsHandler]:
|
160
155
|
"""Performs additional parsing of configuration options
|
161
156
|
for a distribution.
|
@@ -239,7 +234,7 @@ class ConfigHandler(Generic[Target]):
|
|
239
234
|
|
240
235
|
"""
|
241
236
|
|
242
|
-
aliases: dict[str, str] = {}
|
237
|
+
aliases: ClassVar[dict[str, str]] = {}
|
243
238
|
"""Options aliases.
|
244
239
|
For compatibility with various packages. E.g.: d2to1 and pbr.
|
245
240
|
Note: `-` in keys is replaced with `_` by config parser.
|
@@ -252,9 +247,9 @@ class ConfigHandler(Generic[Target]):
|
|
252
247
|
options: AllCommandOptions,
|
253
248
|
ignore_option_errors,
|
254
249
|
ensure_discovered: expand.EnsurePackagesDiscovered,
|
255
|
-
):
|
250
|
+
) -> None:
|
256
251
|
self.ignore_option_errors = ignore_option_errors
|
257
|
-
self.target_obj = target_obj
|
252
|
+
self.target_obj: Target = target_obj
|
258
253
|
self.sections = dict(self._section_options(options))
|
259
254
|
self.set_options: list[str] = []
|
260
255
|
self.ensure_discovered = ensure_discovered
|
@@ -268,7 +263,7 @@ class ConfigHandler(Generic[Target]):
|
|
268
263
|
cls, options: AllCommandOptions
|
269
264
|
) -> Iterator[tuple[str, SingleCommandOptions]]:
|
270
265
|
for full_name, value in options.items():
|
271
|
-
pre,
|
266
|
+
pre, _sep, name = full_name.partition(cls.section_prefix)
|
272
267
|
if pre:
|
273
268
|
continue
|
274
269
|
yield name.lstrip('.'), value
|
@@ -301,7 +296,7 @@ class ConfigHandler(Generic[Target]):
|
|
301
296
|
return
|
302
297
|
|
303
298
|
simple_setter = functools.partial(target_obj.__setattr__, option_name)
|
304
|
-
setter = getattr(target_obj,
|
299
|
+
setter = getattr(target_obj, f"set_{option_name}", simple_setter)
|
305
300
|
setter(parsed)
|
306
301
|
|
307
302
|
self.set_options.append(option_name)
|
@@ -369,14 +364,14 @@ class ConfigHandler(Generic[Target]):
|
|
369
364
|
exclude_directive = 'file:'
|
370
365
|
if value.startswith(exclude_directive):
|
371
366
|
raise ValueError(
|
372
|
-
'Only strings are accepted for the {
|
373
|
-
'files are not accepted'
|
367
|
+
f'Only strings are accepted for the {key} field, '
|
368
|
+
'files are not accepted'
|
374
369
|
)
|
375
370
|
return value
|
376
371
|
|
377
372
|
return parser
|
378
373
|
|
379
|
-
def _parse_file(self, value, root_dir: StrPath):
|
374
|
+
def _parse_file(self, value, root_dir: StrPath | None):
|
380
375
|
"""Represents value as a string, allowing including text
|
381
376
|
from nearest files using `file:` directive.
|
382
377
|
|
@@ -470,7 +465,7 @@ class ConfigHandler(Generic[Target]):
|
|
470
465
|
parser = (lambda _, v: values_parser(v)) if values_parser else (lambda _, v: v)
|
471
466
|
return cls._parse_section_to_dict_with_key(section_options, parser)
|
472
467
|
|
473
|
-
def parse_section(self, section_options):
|
468
|
+
def parse_section(self, section_options) -> None:
|
474
469
|
"""Parses configuration file section.
|
475
470
|
|
476
471
|
:param dict section_options:
|
@@ -488,12 +483,12 @@ class ConfigHandler(Generic[Target]):
|
|
488
483
|
for section_name, section_options in self.sections.items():
|
489
484
|
method_postfix = ''
|
490
485
|
if section_name: # [section.option] variant
|
491
|
-
method_postfix =
|
486
|
+
method_postfix = f"_{section_name}"
|
492
487
|
|
493
488
|
section_parser_method: Callable | None = getattr(
|
494
489
|
self,
|
495
490
|
# Dots in section names are translated into dunderscores.
|
496
|
-
|
491
|
+
f'parse_section{method_postfix}'.replace('.', '__'),
|
497
492
|
None,
|
498
493
|
)
|
499
494
|
|
@@ -544,8 +539,8 @@ class ConfigMetadataHandler(ConfigHandler["DistributionMetadata"]):
|
|
544
539
|
ignore_option_errors: bool,
|
545
540
|
ensure_discovered: expand.EnsurePackagesDiscovered,
|
546
541
|
package_dir: dict | None = None,
|
547
|
-
root_dir: StrPath = os.curdir,
|
548
|
-
):
|
542
|
+
root_dir: StrPath | None = os.curdir,
|
543
|
+
) -> None:
|
549
544
|
super().__init__(target_obj, options, ignore_option_errors, ensure_discovered)
|
550
545
|
self.package_dir = package_dir
|
551
546
|
self.root_dir = root_dir
|
@@ -607,7 +602,7 @@ class ConfigOptionsHandler(ConfigHandler["Distribution"]):
|
|
607
602
|
options: AllCommandOptions,
|
608
603
|
ignore_option_errors: bool,
|
609
604
|
ensure_discovered: expand.EnsurePackagesDiscovered,
|
610
|
-
):
|
605
|
+
) -> None:
|
611
606
|
super().__init__(target_obj, options, ignore_option_errors, ensure_discovered)
|
612
607
|
self.root_dir = target_obj.src_root
|
613
608
|
self.package_dir: dict[str, str] = {} # To be filled by `find_packages`
|
@@ -698,10 +693,7 @@ class ConfigOptionsHandler(ConfigHandler["Distribution"]):
|
|
698
693
|
section_data = self._parse_section_to_dict(section_options, self._parse_list)
|
699
694
|
|
700
695
|
valid_keys = ['where', 'include', 'exclude']
|
701
|
-
|
702
|
-
find_kwargs = dict([
|
703
|
-
(k, v) for k, v in section_data.items() if k in valid_keys and v
|
704
|
-
])
|
696
|
+
find_kwargs = {k: v for k, v in section_data.items() if k in valid_keys and v}
|
705
697
|
|
706
698
|
where = find_kwargs.get('where')
|
707
699
|
if where is not None:
|
@@ -709,7 +701,7 @@ class ConfigOptionsHandler(ConfigHandler["Distribution"]):
|
|
709
701
|
|
710
702
|
return find_kwargs
|
711
703
|
|
712
|
-
def parse_section_entry_points(self, section_options):
|
704
|
+
def parse_section_entry_points(self, section_options) -> None:
|
713
705
|
"""Parses `entry_points` configuration file section.
|
714
706
|
|
715
707
|
:param dict section_options:
|
@@ -721,21 +713,21 @@ class ConfigOptionsHandler(ConfigHandler["Distribution"]):
|
|
721
713
|
package_data = self._parse_section_to_dict(section_options, self._parse_list)
|
722
714
|
return expand.canonic_package_data(package_data)
|
723
715
|
|
724
|
-
def parse_section_package_data(self, section_options):
|
716
|
+
def parse_section_package_data(self, section_options) -> None:
|
725
717
|
"""Parses `package_data` configuration file section.
|
726
718
|
|
727
719
|
:param dict section_options:
|
728
720
|
"""
|
729
721
|
self['package_data'] = self._parse_package_data(section_options)
|
730
722
|
|
731
|
-
def parse_section_exclude_package_data(self, section_options):
|
723
|
+
def parse_section_exclude_package_data(self, section_options) -> None:
|
732
724
|
"""Parses `exclude_package_data` configuration file section.
|
733
725
|
|
734
726
|
:param dict section_options:
|
735
727
|
"""
|
736
728
|
self['exclude_package_data'] = self._parse_package_data(section_options)
|
737
729
|
|
738
|
-
def parse_section_extras_require(self, section_options):
|
730
|
+
def parse_section_extras_require(self, section_options) -> None:
|
739
731
|
"""Parses `extras_require` configuration file section.
|
740
732
|
|
741
733
|
:param dict section_options:
|
@@ -747,7 +739,7 @@ class ConfigOptionsHandler(ConfigHandler["Distribution"]):
|
|
747
739
|
|
748
740
|
self['extras_require'] = parsed
|
749
741
|
|
750
|
-
def parse_section_data_files(self, section_options):
|
742
|
+
def parse_section_data_files(self, section_options) -> None:
|
751
743
|
"""Parses `data_files` configuration file section.
|
752
744
|
|
753
745
|
:param dict section_options:
|
@@ -1,13 +1,19 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
1
3
|
import contextlib
|
2
4
|
import dis
|
3
5
|
import marshal
|
4
6
|
import sys
|
7
|
+
from types import CodeType
|
8
|
+
from typing import Any, Literal, TypeVar
|
5
9
|
|
6
10
|
from packaging.version import Version
|
7
11
|
|
8
12
|
from . import _imp
|
9
13
|
from ._imp import PY_COMPILED, PY_FROZEN, PY_SOURCE, find_module
|
10
14
|
|
15
|
+
_T = TypeVar("_T")
|
16
|
+
|
11
17
|
__all__ = ['Require', 'find_module']
|
12
18
|
|
13
19
|
|
@@ -15,8 +21,14 @@ class Require:
|
|
15
21
|
"""A prerequisite to building or installing a distribution"""
|
16
22
|
|
17
23
|
def __init__(
|
18
|
-
self,
|
19
|
-
|
24
|
+
self,
|
25
|
+
name,
|
26
|
+
requested_version,
|
27
|
+
module,
|
28
|
+
homepage: str = '',
|
29
|
+
attribute=None,
|
30
|
+
format=None,
|
31
|
+
) -> None:
|
20
32
|
if format is None and requested_version is not None:
|
21
33
|
format = Version
|
22
34
|
|
@@ -43,7 +55,9 @@ class Require:
|
|
43
55
|
and self.format(version) >= self.requested_version
|
44
56
|
)
|
45
57
|
|
46
|
-
def get_version(
|
58
|
+
def get_version(
|
59
|
+
self, paths=None, default: _T | Literal["unknown"] = "unknown"
|
60
|
+
) -> _T | Literal["unknown"] | None | Any:
|
47
61
|
"""Get version number of installed module, 'None', or 'default'
|
48
62
|
|
49
63
|
Search 'paths' for module. If not found, return 'None'. If found,
|
@@ -56,7 +70,7 @@ class Require:
|
|
56
70
|
|
57
71
|
if self.attribute is None:
|
58
72
|
try:
|
59
|
-
f,
|
73
|
+
f, _p, _i = find_module(self.module, paths)
|
60
74
|
except ImportError:
|
61
75
|
return None
|
62
76
|
if f:
|
@@ -98,7 +112,9 @@ def maybe_close(f):
|
|
98
112
|
# XXX it'd be better to test assertions about bytecode instead.
|
99
113
|
if not sys.platform.startswith('java') and sys.platform != 'cli':
|
100
114
|
|
101
|
-
def get_module_constant(
|
115
|
+
def get_module_constant(
|
116
|
+
module, symbol, default: _T | int = -1, paths=None
|
117
|
+
) -> _T | int | None | Any:
|
102
118
|
"""Find 'module' by searching 'paths', and extract 'symbol'
|
103
119
|
|
104
120
|
Return 'None' if 'module' does not exist on 'paths', or it does not define
|
@@ -106,7 +122,7 @@ if not sys.platform.startswith('java') and sys.platform != 'cli':
|
|
106
122
|
constant. Otherwise, return 'default'."""
|
107
123
|
|
108
124
|
try:
|
109
|
-
f, path, (
|
125
|
+
f, path, (_suffix, _mode, kind) = info = find_module(module, paths)
|
110
126
|
except ImportError:
|
111
127
|
# Module doesn't exist
|
112
128
|
return None
|
@@ -126,7 +142,9 @@ if not sys.platform.startswith('java') and sys.platform != 'cli':
|
|
126
142
|
|
127
143
|
return extract_constant(code, symbol, default)
|
128
144
|
|
129
|
-
def extract_constant(
|
145
|
+
def extract_constant(
|
146
|
+
code: CodeType, symbol: str, default: _T | int = -1
|
147
|
+
) -> _T | int | None | Any:
|
130
148
|
"""Extract the constant value of 'symbol' from 'code'
|
131
149
|
|
132
150
|
If the name 'symbol' is bound to a constant value by the Python code
|
@@ -155,6 +173,7 @@ if not sys.platform.startswith('java') and sys.platform != 'cli':
|
|
155
173
|
arg = byte_code.arg
|
156
174
|
|
157
175
|
if op == LOAD_CONST:
|
176
|
+
assert arg is not None
|
158
177
|
const = code.co_consts[arg]
|
159
178
|
elif arg == name_idx and (op == STORE_NAME or op == STORE_GLOBAL):
|
160
179
|
return const
|
@@ -41,10 +41,11 @@ from __future__ import annotations
|
|
41
41
|
|
42
42
|
import itertools
|
43
43
|
import os
|
44
|
+
from collections.abc import Iterable, Iterator, Mapping
|
44
45
|
from fnmatch import fnmatchcase
|
45
46
|
from glob import glob
|
46
47
|
from pathlib import Path
|
47
|
-
from typing import TYPE_CHECKING,
|
48
|
+
from typing import TYPE_CHECKING, ClassVar
|
48
49
|
|
49
50
|
import _distutils_hack.override # noqa: F401
|
50
51
|
|
@@ -53,13 +54,11 @@ from ._path import StrPath
|
|
53
54
|
from distutils import log
|
54
55
|
from distutils.util import convert_path
|
55
56
|
|
56
|
-
StrIter = Iterator[str]
|
57
|
-
|
58
|
-
chain_iter = itertools.chain.from_iterable
|
59
|
-
|
60
57
|
if TYPE_CHECKING:
|
61
58
|
from setuptools import Distribution
|
62
59
|
|
60
|
+
chain_iter = itertools.chain.from_iterable
|
61
|
+
|
63
62
|
|
64
63
|
def _valid_name(path: StrPath) -> bool:
|
65
64
|
# Ignore invalid names that cannot be imported directly
|
@@ -72,7 +71,7 @@ class _Filter:
|
|
72
71
|
the input matches at least one of the patterns.
|
73
72
|
"""
|
74
73
|
|
75
|
-
def __init__(self, *patterns: str):
|
74
|
+
def __init__(self, *patterns: str) -> None:
|
76
75
|
self._patterns = dict.fromkeys(patterns)
|
77
76
|
|
78
77
|
def __call__(self, item: str) -> bool:
|
@@ -85,8 +84,8 @@ class _Filter:
|
|
85
84
|
class _Finder:
|
86
85
|
"""Base class that exposes functionality for module/package finders"""
|
87
86
|
|
88
|
-
ALWAYS_EXCLUDE: tuple[str, ...] = ()
|
89
|
-
DEFAULT_EXCLUDE: tuple[str, ...] = ()
|
87
|
+
ALWAYS_EXCLUDE: ClassVar[tuple[str, ...]] = ()
|
88
|
+
DEFAULT_EXCLUDE: ClassVar[tuple[str, ...]] = ()
|
90
89
|
|
91
90
|
@classmethod
|
92
91
|
def find(
|
@@ -124,7 +123,9 @@ class _Finder:
|
|
124
123
|
)
|
125
124
|
|
126
125
|
@classmethod
|
127
|
-
def _find_iter(
|
126
|
+
def _find_iter(
|
127
|
+
cls, where: StrPath, exclude: _Filter, include: _Filter
|
128
|
+
) -> Iterator[str]:
|
128
129
|
raise NotImplementedError
|
129
130
|
|
130
131
|
|
@@ -136,7 +137,9 @@ class PackageFinder(_Finder):
|
|
136
137
|
ALWAYS_EXCLUDE = ("ez_setup", "*__pycache__")
|
137
138
|
|
138
139
|
@classmethod
|
139
|
-
def _find_iter(
|
140
|
+
def _find_iter(
|
141
|
+
cls, where: StrPath, exclude: _Filter, include: _Filter
|
142
|
+
) -> Iterator[str]:
|
140
143
|
"""
|
141
144
|
All the packages found in 'where' that pass the 'include' filter, but
|
142
145
|
not the 'exclude' filter.
|
@@ -185,7 +188,9 @@ class ModuleFinder(_Finder):
|
|
185
188
|
"""
|
186
189
|
|
187
190
|
@classmethod
|
188
|
-
def _find_iter(
|
191
|
+
def _find_iter(
|
192
|
+
cls, where: StrPath, exclude: _Filter, include: _Filter
|
193
|
+
) -> Iterator[str]:
|
189
194
|
for file in glob(os.path.join(where, "*.py")):
|
190
195
|
module, _ext = os.path.splitext(os.path.basename(file))
|
191
196
|
|
@@ -295,7 +300,7 @@ class ConfigDiscovery:
|
|
295
300
|
(from other metadata/options, the file system or conventions)
|
296
301
|
"""
|
297
302
|
|
298
|
-
def __init__(self, distribution: Distribution):
|
303
|
+
def __init__(self, distribution: Distribution) -> None:
|
299
304
|
self.dist = distribution
|
300
305
|
self._called = False
|
301
306
|
self._disabled = False
|
@@ -328,7 +333,9 @@ class ConfigDiscovery:
|
|
328
333
|
return {}
|
329
334
|
return self.dist.package_dir
|
330
335
|
|
331
|
-
def __call__(
|
336
|
+
def __call__(
|
337
|
+
self, force: bool = False, name: bool = True, ignore_ext_modules: bool = False
|
338
|
+
):
|
332
339
|
"""Automatically discover missing configuration fields
|
333
340
|
and modifies the given ``distribution`` object in-place.
|
334
341
|
|
@@ -472,7 +479,7 @@ class ConfigDiscovery:
|
|
472
479
|
"""
|
473
480
|
raise PackageDiscoveryError(cleandoc(msg))
|
474
481
|
|
475
|
-
def analyse_name(self):
|
482
|
+
def analyse_name(self) -> None:
|
476
483
|
"""The packages/modules are the essential contribution of the author.
|
477
484
|
Therefore the name of the distribution can be derived from them.
|
478
485
|
"""
|