diff --git a/.gitattributes b/.gitattributes index 4990a8ced9187cf97e8525034db1ccb3601f2515..315cb262f22e3af99a45f23ed97984510cfbcd33 100644 --- a/.gitattributes +++ b/.gitattributes @@ -470,3 +470,210 @@ TTS/Kokoro/.venv/Lib/site-packages/babel/locale-data/th.dat filter=lfs diff=lfs TTS/Kokoro/.venv/Lib/site-packages/babel/locale-data/tg.dat filter=lfs diff=lfs merge=lfs -text TTS/Kokoro/.venv/Lib/site-packages/babel/locale-data/tk.dat filter=lfs diff=lfs merge=lfs -text TTS/Kokoro/.venv/Lib/site-packages/babel/locale-data/to.dat filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/control/__pycache__/lti.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/control/tests/__pycache__/test_lti.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/mechanics/tests/__pycache__/test_joint.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/quantum/__pycache__/spin.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/quantum/tests/__pycache__/test_spin.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/plotting/__pycache__/series.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/plotting/tests/__pycache__/test_series.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/compatibility.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polyclasses.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polyquinticconst.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polytools.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/rings.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/benchmarks/__pycache__/bench_solvers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/domains/tests/__pycache__/test_domains.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/matrices/__pycache__/domainmatrix.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/matrices/tests/__pycache__/test_domainmatrix.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/numberfields/__pycache__/resolvent_lookup.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/tests/__pycache__/test_polytools.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/tests/__pycache__/test_rings.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/__pycache__/latex.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/__pycache__/mathml.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/pretty/__pycache__/pretty.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/pretty/tests/__pycache__/test_pretty.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/tests/__pycache__/test_latex.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/tests/__pycache__/test_mathml.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/series/tests/__pycache__/test_limits.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/__pycache__/sets.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/tests/__pycache__/test_fancysets.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/tests/__pycache__/test_sets.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/simplify/__pycache__/hyperexpand.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/__pycache__/solvers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/__pycache__/solveset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/diophantine/__pycache__/diophantine.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/__pycache__/ode.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/__pycache__/single.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_ode.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_single.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_systems.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/tests/__pycache__/test_solvers.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/tests/__pycache__/test_solveset.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/__pycache__/crv_types.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/__pycache__/stochastic_process_types.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/tests/__pycache__/test_continuous_rv.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/__pycache__/tensor.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/array/expressions/__pycache__/array_expressions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/tests/__pycache__/test_tensor.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/__pycache__/iterables.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/tests/__pycache__/test_lambdify.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/tests/__pycache__/test_wester.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/thinc/backends/cblas.cp312-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/thinc/backends/numpy_ops.cp312-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/thinc/extra/search.cp312-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/thinc/layers/premap_ids.cp312-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/thinc/layers/sparselinear.cp312-win_amd64.pyd filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/bin/protoc.exe filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/c10.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/cpuinfo.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/fmt.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/libittnotify.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/microkernels-prod.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/c10.dll filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/pthreadpool.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/libiomp5md.dll filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/sleef.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_python.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_cpu.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/XNNPACK.lib filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_python.dll filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/uv.dll filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_cpu.dll filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/overrides.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_meta_registrations.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_tensor_docs.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_torch_docs.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/__init__.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/backends/_nnapi/__pycache__/serializer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/__pycache__/distributed_c10d.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/fsdp/__pycache__/fully_sharded_data_parallel.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/fsdp/__pycache__/_flat_param.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/pipelining/__pycache__/schedules.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/fx/__pycache__/graph.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/fx/experimental/__pycache__/proxy_tensor.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/fx/experimental/__pycache__/symbolic_shapes.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/linalg/__pycache__/__init__.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/nested/_internal/__pycache__/ops.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/nn/__pycache__/functional.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/nn/modules/__pycache__/loss.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/nn/modules/__pycache__/module.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/nn/parallel/__pycache__/distributed.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset9.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/optim/__pycache__/lr_scheduler.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/sparse/__pycache__/_triton_ops_meta.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_methods_invocations.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_modules.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_nn.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_quantization.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/__pycache__/distributed_test.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/dist_autograd_test.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/rpc_test.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/generated/__pycache__/annotated_fn_args.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/opinfo/__pycache__/core.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/utils/__pycache__/cpp_extension.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/utils/hipify/__pycache__/cuda_to_hip_mappings.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_decomp/__pycache__/decompositions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/eval_frame.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/guards.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/output_graph.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/symbolic_convert.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/trace_rules.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/builder.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/builtin.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/functions.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/higher_order_ops.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/torch.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/user_defined.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_export/serde/__pycache__/serialize.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_functorch/__pycache__/partitioners.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/codecache.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/compile_fx.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/cudagraph_trees.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/graph.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/ir.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/lowering.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/pattern_matcher.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/scheduler.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/select_algorithm.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/common.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/cpp.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/cpp_wrapper_cpu.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/simd.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/triton.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/wrapper.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/fx_passes/__pycache__/quantization.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/fx_passes/__pycache__/split_cat.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_refs/__pycache__/__init__.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_subclasses/__pycache__/fake_tensor.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/runtime/__pycache__/triton_heuristics.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/template_heuristics/__pycache__/triton.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torchgen/__pycache__/gen.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/torchgen/__pycache__/model.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/modeling_outputs.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/modeling_utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/testing_utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/tokenization_utils_base.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/trainer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/training_args.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/generation/__pycache__/logits_process.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/generation/__pycache__/utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/integrations/__pycache__/integration_utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/autoformer/__pycache__/modeling_autoformer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/bigbird_pegasus/__pycache__/modeling_bigbird_pegasus.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/big_bird/__pycache__/modeling_big_bird.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/d_fine/__pycache__/modeling_d_fine.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/edgetam_video/__pycache__/modeling_edgetam_video.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/ernie4_5_vl_moe/__pycache__/modeling_ernie4_5_vl_moe.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/esm/__pycache__/modeling_esmfold.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/gemma3n/__pycache__/modeling_gemma3n.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/gemma3n/__pycache__/modular_gemma3n.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/glm4v_moe/__pycache__/modeling_glm4v_moe.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/grounding_dino/__pycache__/modeling_grounding_dino.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/informer/__pycache__/modeling_informer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/led/__pycache__/modeling_led.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/oneformer/__pycache__/modeling_oneformer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/mm_grounding_dino/__pycache__/modeling_mm_grounding_dino.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/moshi/__pycache__/modeling_moshi.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/longformer/__pycache__/modeling_longformer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/luke/__pycache__/modeling_luke.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/mask2former/__pycache__/modeling_mask2former.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/perceiver/__pycache__/modeling_perceiver.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/pp_doclayout_v3/__pycache__/modeling_pp_doclayout_v3.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen2_5_omni/__pycache__/modeling_qwen2_5_omni.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen2_5_omni/__pycache__/modular_qwen2_5_omni.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_5/__pycache__/modeling_qwen3_5.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_5_moe/__pycache__/modeling_qwen3_5_moe.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modular_qwen3_omni_moe.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modeling_qwen3_omni_moe.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_vl_moe/__pycache__/modeling_qwen3_vl_moe.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/reformer/__pycache__/modeling_reformer.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam2_video/__pycache__/modeling_sam2_video.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam2_video/__pycache__/modular_sam2_video.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam3/__pycache__/modeling_sam3.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam3_tracker_video/__pycache__/modeling_sam3_tracker_video.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/seamless_m4t/__pycache__/modeling_seamless_m4t.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/seamless_m4t_v2/__pycache__/modeling_seamless_m4t_v2.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/speecht5/__pycache__/modeling_speecht5.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/wav2vec2/__pycache__/modeling_wav2vec2.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/tapas/__pycache__/tokenization_tapas.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/models/xlnet/__pycache__/modeling_xlnet.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Kokoro/.venv/Lib/site-packages/transformers/utils/__pycache__/import_utils.cpython-312.pyc filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/af_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/ar_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/cmn_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/da_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/en_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/fa_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/hu_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/ia_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/it_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/lb_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/phondata filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/ru_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/ta_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/ur_dict filter=lfs diff=lfs merge=lfs -text +TTS/Piper/espeak-ng-data/yue_dict filter=lfs diff=lfs merge=lfs -text diff --git a/TTS/Kokoro/.venv/Lib/site-packages/_distutils_hack/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/_distutils_hack/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d386537bd4962c29282390beccecee30e1c326f7 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/_distutils_hack/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/_distutils_hack/__pycache__/override.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/_distutils_hack/__pycache__/override.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..661bae915e705fdbb0254554f9ea28c97fd42b4a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/_distutils_hack/__pycache__/override.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/_soundfile_data/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/_soundfile_data/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a0e459bdffe38e0c616239105913bd0e6810988c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/_soundfile_data/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5bb0ab737d9fec8210ce26a3ba1605cd10d49394 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/_yaml/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b8770a1d0a24b299f767753fc1ac29431efd170 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_entry_points.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_entry_points.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e059989a5597c0e1f5ee2700cab4940381188c9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_entry_points.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_imp.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_imp.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a194272b34247669667c086b069b0b932f23057d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_imp.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_importlib.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_importlib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c60e474f67b8c009e2994bc3dcff0f831d3180d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_importlib.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_itertools.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_itertools.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..24e90b6cfd8ff453b2ac0ba412e7996ae0760a65 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_itertools.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_normalization.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_normalization.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..17f566a6250da6d90ae38bb74eb4e5cb1a84c59b Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_normalization.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_path.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_path.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2231d9349b3ff1339058678be455750284d4f4b8 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_path.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_reqs.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_reqs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..41af148406835f7bcc7a1f241022bd2e72d39cd4 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_reqs.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_scripts.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_scripts.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..87a1164f6100b300b1cfbd60df0bc28c2593138c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_scripts.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_shutil.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_shutil.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5215f2664fa664b798db4c95d891ddb69a7e9dbe Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_shutil.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_static.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_static.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dc34d9b1ab4407603e4928b4363bd8a9c20fe47e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/__pycache__/_static.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9875201d9bc07db48d3940af7405a7ed50f2aedf Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_log.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_log.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d603f7bf955cd2d40eb35cae58e6b09447ebb079 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_log.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_macos_compat.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_macos_compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4bb29c2675ecf42016a437c01cccb502935653d7 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_macos_compat.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_modified.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_modified.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66601ad423dc8c919b878c06a8307a313d7bfe2a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_modified.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_msvccompiler.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_msvccompiler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7e361d2a84550939676ec5f992c8aeff802855be Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/_msvccompiler.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/archive_util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/archive_util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fde770b6b10203c555594710eeb874c37ab67a8c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/archive_util.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/ccompiler.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/ccompiler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bdf19b4d1c68573749e397f36580d4a72fc5421a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/ccompiler.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/cmd.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/cmd.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe576ccbc8ec3b9d0c97a5012948e77cbf9f849f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/cmd.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/core.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/core.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1cf37a4859695d5584ae34542f28ed808093336c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/core.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/cygwinccompiler.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/cygwinccompiler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b7679a525c8634f3ef59ee49c2833ada5c7b1794 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/cygwinccompiler.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/debug.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/debug.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2d9c420e707972220609559019b34bf359dbc57 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/debug.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dep_util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dep_util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0ec7e6142401604f26af82671c8040a4a60782fb Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dep_util.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dir_util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dir_util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9dbcbd708cd613d13c9f7e76a0262e814ca760db Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dir_util.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dist.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dist.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad208c7de27f447def31abcbfdf577c0844df4be Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/dist.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/errors.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/errors.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..444187c5d8b4e8b9e2cf5ba00417e422a975c6b9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/errors.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/extension.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/extension.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8d7dffb18089ea9837318df40fd9d36237875d3d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/extension.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/fancy_getopt.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/fancy_getopt.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..65abfc84ce5be90cd8ebab04c2f929c1fc08be61 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/fancy_getopt.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/file_util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/file_util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..583b126dcd4c72b8b3a6d4d575d197b70464867f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/file_util.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/filelist.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/filelist.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0bea3fc182a874b638e96680c7fee261aab758ab Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/filelist.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/log.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/log.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..39a18d9038dcd59e59d91105e147515358c56998 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/log.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/spawn.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/spawn.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c89e34b74ff0756ba1e695e9465c7e0d8e43b6c4 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/spawn.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/sysconfig.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/sysconfig.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa27c79d7901ef6fe095d0d34c4f1d49f07de0f7 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/sysconfig.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/text_file.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/text_file.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a74694184054627d230c824cd064e34e914f5502 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/text_file.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/unixccompiler.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/unixccompiler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e1f2115b9e1ab97221d91cddbba6b9bca1498ba7 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/unixccompiler.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d5be910e5920ab32335cfbb39078d1d8d52c1dea Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/util.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/version.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/version.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..71eaffd076f58d4e123670ea9d4718797c34b504 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/version.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/versionpredicate.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/versionpredicate.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8ca108d863f143281935f92f315c4d17866862c3 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/versionpredicate.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/zosccompiler.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/zosccompiler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4a2edf6e0fea1d390fcfdd83e10d6e8ce826456c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/__pycache__/zosccompiler.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0f8a1692ba96f5e03167e7307c1c2ff5776b74d6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__init__.py @@ -0,0 +1,23 @@ +"""distutils.command + +Package containing implementation of all the standard Distutils +commands.""" + +__all__ = [ + 'build', + 'build_py', + 'build_ext', + 'build_clib', + 'build_scripts', + 'clean', + 'install', + 'install_lib', + 'install_headers', + 'install_scripts', + 'install_data', + 'sdist', + 'bdist', + 'bdist_dumb', + 'bdist_rpm', + 'check', +] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8c599434e36d9aae76182cb4a74dae1573885199 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/_framework_compat.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/_framework_compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d847b8893974821aee2fc1584ef0b381a18c971d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/_framework_compat.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ab48a7a6a10d229245a73c2eca73db14f4cfade9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist_dumb.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist_dumb.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ccad1c0b1e3e0ddb285a0aa25d8b18caf48fd28f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist_dumb.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist_rpm.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist_rpm.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1220f5f2b2c137bc827946a9d8b0f5722df1044e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/bdist_rpm.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8aca22861db42d0d8364cfa1c4ee5722483275f6 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_clib.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_clib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae623942eb27cb021de227cffec64ae376260192 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_clib.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_ext.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_ext.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8889ac249f580284d76ae702861877526f289164 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_ext.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_py.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_py.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31fc5529179e61bc9fc8561dd8494aa4c8e6b127 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_py.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_scripts.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_scripts.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dcc040af4394020bef765e20328dbf0434bf868c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/build_scripts.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/check.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/check.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1356a8670ec93704c4493a7d572d83e799b11093 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/check.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/clean.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/clean.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b4d3e02db290c0f948cf0152fe9fd082296d0ce5 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/clean.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/config.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a914c32102c6c84a5bf6591e36028e3d0df74f30 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/config.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f2ad286a17c81e93a80d5e8e26a1480930070d9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_data.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_data.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3f44783d4c0154d634de466fdd081b76e91f5ead Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_data.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_egg_info.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_egg_info.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2f77de9ea099155b6f308a85514520567e2bff9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_egg_info.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_headers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_headers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..53bf2f739770be86bd4f46376808f3666bcc57c1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_headers.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_lib.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_lib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..581009542dc956a88a481f70a14476542d5d9aa9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_lib.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_scripts.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_scripts.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7c9c3f1f917425c9e4522d6831588ee6e236e610 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/install_scripts.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/sdist.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/sdist.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31e1bd575387dce2302691581aeb2bde0556ce2e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/__pycache__/sdist.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/_framework_compat.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/_framework_compat.py new file mode 100644 index 0000000000000000000000000000000000000000..00d34bc7d8c85126dbae716ebfa48e35b0833222 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/_framework_compat.py @@ -0,0 +1,54 @@ +""" +Backward compatibility for homebrew builds on macOS. +""" + +import functools +import os +import subprocess +import sys +import sysconfig + + +@functools.lru_cache +def enabled(): + """ + Only enabled for Python 3.9 framework homebrew builds + except ensurepip and venv. + """ + PY39 = (3, 9) < sys.version_info < (3, 10) + framework = sys.platform == 'darwin' and sys._framework + homebrew = "Cellar" in sysconfig.get_config_var('projectbase') + venv = sys.prefix != sys.base_prefix + ensurepip = os.environ.get("ENSUREPIP_OPTIONS") + return PY39 and framework and homebrew and not venv and not ensurepip + + +schemes = dict( + osx_framework_library=dict( + stdlib='{installed_base}/{platlibdir}/python{py_version_short}', + platstdlib='{platbase}/{platlibdir}/python{py_version_short}', + purelib='{homebrew_prefix}/lib/python{py_version_short}/site-packages', + platlib='{homebrew_prefix}/{platlibdir}/python{py_version_short}/site-packages', + include='{installed_base}/include/python{py_version_short}{abiflags}', + platinclude='{installed_platbase}/include/python{py_version_short}{abiflags}', + scripts='{homebrew_prefix}/bin', + data='{homebrew_prefix}', + ) +) + + +@functools.lru_cache +def vars(): + if not enabled(): + return {} + homebrew_prefix = subprocess.check_output(['brew', '--prefix'], text=True).strip() + return locals() + + +def scheme(name): + """ + Override the selected scheme for posix_prefix. + """ + if not enabled() or not name.endswith('_prefix'): + return name + return 'osx_framework_library' diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist.py new file mode 100644 index 0000000000000000000000000000000000000000..07811aab27ad7fcd2303883024243e2f52c2bbcb --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist.py @@ -0,0 +1,167 @@ +"""distutils.command.bdist + +Implements the Distutils 'bdist' command (create a built [binary] +distribution).""" + +from __future__ import annotations + +import os +import warnings +from collections.abc import Callable +from typing import TYPE_CHECKING, ClassVar + +from ..core import Command +from ..errors import DistutilsOptionError, DistutilsPlatformError +from ..util import get_platform + +if TYPE_CHECKING: + from typing_extensions import deprecated +else: + + def deprecated(message): + return lambda fn: fn + + +def show_formats(): + """Print list of available formats (arguments to "--format" option).""" + from ..fancy_getopt import FancyGetopt + + formats = [ + ("formats=" + format, None, bdist.format_commands[format][1]) + for format in bdist.format_commands + ] + pretty_printer = FancyGetopt(formats) + pretty_printer.print_help("List of available distribution formats:") + + +class ListCompat(dict[str, tuple[str, str]]): + # adapter to allow for Setuptools compatibility in format_commands + @deprecated("format_commands is now a dict. append is deprecated.") + def append(self, item: object) -> None: + warnings.warn( + "format_commands is now a dict. append is deprecated.", + DeprecationWarning, + stacklevel=2, + ) + + +class bdist(Command): + description = "create a built (binary) distribution" + + user_options = [ + ('bdist-base=', 'b', "temporary directory for creating built distributions"), + ( + 'plat-name=', + 'p', + "platform name to embed in generated filenames " + f"[default: {get_platform()}]", + ), + ('formats=', None, "formats for distribution (comma-separated list)"), + ( + 'dist-dir=', + 'd', + "directory to put final built distributions in [default: dist]", + ), + ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ( + 'owner=', + 'u', + "Owner name used when creating a tar file [default: current user]", + ), + ( + 'group=', + 'g', + "Group name used when creating a tar file [default: current group]", + ), + ] + + boolean_options: ClassVar[list[str]] = ['skip-build'] + + help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [ + ('help-formats', None, "lists available distribution formats", show_formats), + ] + + # The following commands do not take a format option from bdist + no_format_option: ClassVar[tuple[str, ...]] = ('bdist_rpm',) + + # This won't do in reality: will need to distinguish RPM-ish Linux, + # Debian-ish Linux, Solaris, FreeBSD, ..., Windows, Mac OS. + default_format: ClassVar[dict[str, str]] = {'posix': 'gztar', 'nt': 'zip'} + + # Define commands in preferred order for the --help-formats option + format_commands = ListCompat({ + 'rpm': ('bdist_rpm', "RPM distribution"), + 'gztar': ('bdist_dumb', "gzip'ed tar file"), + 'bztar': ('bdist_dumb', "bzip2'ed tar file"), + 'xztar': ('bdist_dumb', "xz'ed tar file"), + 'ztar': ('bdist_dumb', "compressed tar file"), + 'tar': ('bdist_dumb', "tar file"), + 'zip': ('bdist_dumb', "ZIP file"), + }) + + # for compatibility until consumers only reference format_commands + format_command = format_commands + + def initialize_options(self): + self.bdist_base = None + self.plat_name = None + self.formats = None + self.dist_dir = None + self.skip_build = False + self.group = None + self.owner = None + + def finalize_options(self) -> None: + # have to finalize 'plat_name' before 'bdist_base' + if self.plat_name is None: + if self.skip_build: + self.plat_name = get_platform() + else: + self.plat_name = self.get_finalized_command('build').plat_name + + # 'bdist_base' -- parent of per-built-distribution-format + # temporary directories (eg. we'll probably have + # "build/bdist./dumb", "build/bdist./rpm", etc.) + if self.bdist_base is None: + build_base = self.get_finalized_command('build').build_base + self.bdist_base = os.path.join(build_base, 'bdist.' + self.plat_name) + + self.ensure_string_list('formats') + if self.formats is None: + try: + self.formats = [self.default_format[os.name]] + except KeyError: + raise DistutilsPlatformError( + "don't know how to create built distributions " + f"on platform {os.name}" + ) + + if self.dist_dir is None: + self.dist_dir = "dist" + + def run(self) -> None: + # Figure out which sub-commands we need to run. + commands = [] + for format in self.formats: + try: + commands.append(self.format_commands[format][0]) + except KeyError: + raise DistutilsOptionError(f"invalid format '{format}'") + + # Reinitialize and run each command. + for i in range(len(self.formats)): + cmd_name = commands[i] + sub_cmd = self.reinitialize_command(cmd_name) + if cmd_name not in self.no_format_option: + sub_cmd.format = self.formats[i] + + # passing the owner and group names for tar archiving + if cmd_name == 'bdist_dumb': + sub_cmd.owner = self.owner + sub_cmd.group = self.group + + # If we're going to need to run this command again, tell it to + # keep its temporary files around so subsequent runs go faster. + if cmd_name in commands[i + 1 :]: + sub_cmd.keep_temp = True + self.run_command(cmd_name) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py new file mode 100644 index 0000000000000000000000000000000000000000..c49ef253b47cd0791aae1fc65c005c668cb1e97b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py @@ -0,0 +1,141 @@ +"""distutils.command.bdist_dumb + +Implements the Distutils 'bdist_dumb' command (create a "dumb" built +distribution -- i.e., just an archive to be unpacked under $prefix or +$exec_prefix).""" + +import os +from distutils._log import log +from typing import ClassVar + +from ..core import Command +from ..dir_util import ensure_relative, remove_tree +from ..errors import DistutilsPlatformError +from ..sysconfig import get_python_version +from ..util import get_platform + + +class bdist_dumb(Command): + description = "create a \"dumb\" built distribution" + + user_options = [ + ('bdist-dir=', 'd', "temporary directory for creating the distribution"), + ( + 'plat-name=', + 'p', + "platform name to embed in generated filenames " + f"[default: {get_platform()}]", + ), + ( + 'format=', + 'f', + "archive format to create (tar, gztar, bztar, xztar, ztar, zip)", + ), + ( + 'keep-temp', + 'k', + "keep the pseudo-installation tree around after creating the distribution archive", + ), + ('dist-dir=', 'd', "directory to put final built distributions in"), + ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + ( + 'relative', + None, + "build the archive using relative paths [default: false]", + ), + ( + 'owner=', + 'u', + "Owner name used when creating a tar file [default: current user]", + ), + ( + 'group=', + 'g', + "Group name used when creating a tar file [default: current group]", + ), + ] + + boolean_options: ClassVar[list[str]] = ['keep-temp', 'skip-build', 'relative'] + + default_format = {'posix': 'gztar', 'nt': 'zip'} + + def initialize_options(self): + self.bdist_dir = None + self.plat_name = None + self.format = None + self.keep_temp = False + self.dist_dir = None + self.skip_build = None + self.relative = False + self.owner = None + self.group = None + + def finalize_options(self): + if self.bdist_dir is None: + bdist_base = self.get_finalized_command('bdist').bdist_base + self.bdist_dir = os.path.join(bdist_base, 'dumb') + + if self.format is None: + try: + self.format = self.default_format[os.name] + except KeyError: + raise DistutilsPlatformError( + "don't know how to create dumb built distributions " + f"on platform {os.name}" + ) + + self.set_undefined_options( + 'bdist', + ('dist_dir', 'dist_dir'), + ('plat_name', 'plat_name'), + ('skip_build', 'skip_build'), + ) + + def run(self): + if not self.skip_build: + self.run_command('build') + + install = self.reinitialize_command('install', reinit_subcommands=True) + install.root = self.bdist_dir + install.skip_build = self.skip_build + install.warn_dir = False + + log.info("installing to %s", self.bdist_dir) + self.run_command('install') + + # And make an archive relative to the root of the + # pseudo-installation tree. + archive_basename = f"{self.distribution.get_fullname()}.{self.plat_name}" + + pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) + if not self.relative: + archive_root = self.bdist_dir + else: + if self.distribution.has_ext_modules() and ( + install.install_base != install.install_platbase + ): + raise DistutilsPlatformError( + "can't make a dumb built distribution where " + f"base and platbase are different ({install.install_base!r}, {install.install_platbase!r})" + ) + else: + archive_root = os.path.join( + self.bdist_dir, ensure_relative(install.install_base) + ) + + # Make the archive + filename = self.make_archive( + pseudoinstall_root, + self.format, + root_dir=archive_root, + owner=self.owner, + group=self.group, + ) + if self.distribution.has_ext_modules(): + pyversion = get_python_version() + else: + pyversion = 'any' + self.distribution.dist_files.append(('bdist_dumb', pyversion, filename)) + + if not self.keep_temp: + remove_tree(self.bdist_dir) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py new file mode 100644 index 0000000000000000000000000000000000000000..dfa5f99dda095af76d8ffac33e1dd8bfd6aad931 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py @@ -0,0 +1,597 @@ +"""distutils.command.bdist_rpm + +Implements the Distutils 'bdist_rpm' command (create RPM source and binary +distributions).""" + +import os +import subprocess +import sys +from distutils._log import log +from typing import ClassVar + +from ..core import Command +from ..debug import DEBUG +from ..errors import ( + DistutilsExecError, + DistutilsFileError, + DistutilsOptionError, + DistutilsPlatformError, +) +from ..file_util import write_file +from ..sysconfig import get_python_version + + +class bdist_rpm(Command): + description = "create an RPM distribution" + + user_options = [ + ('bdist-base=', None, "base directory for creating built distributions"), + ( + 'rpm-base=', + None, + "base directory for creating RPMs (defaults to \"rpm\" under " + "--bdist-base; must be specified for RPM 2)", + ), + ( + 'dist-dir=', + 'd', + "directory to put final RPM files in (and .spec files if --spec-only)", + ), + ( + 'python=', + None, + "path to Python interpreter to hard-code in the .spec file " + "[default: \"python\"]", + ), + ( + 'fix-python', + None, + "hard-code the exact path to the current Python interpreter in " + "the .spec file", + ), + ('spec-only', None, "only regenerate spec file"), + ('source-only', None, "only generate source RPM"), + ('binary-only', None, "only generate binary RPM"), + ('use-bzip2', None, "use bzip2 instead of gzip to create source distribution"), + # More meta-data: too RPM-specific to put in the setup script, + # but needs to go in the .spec file -- so we make these options + # to "bdist_rpm". The idea is that packagers would put this + # info in setup.cfg, although they are of course free to + # supply it on the command line. + ( + 'distribution-name=', + None, + "name of the (Linux) distribution to which this " + "RPM applies (*not* the name of the module distribution!)", + ), + ('group=', None, "package classification [default: \"Development/Libraries\"]"), + ('release=', None, "RPM release number"), + ('serial=', None, "RPM serial number"), + ( + 'vendor=', + None, + "RPM \"vendor\" (eg. \"Joe Blow \") " + "[default: maintainer or author from setup script]", + ), + ( + 'packager=', + None, + "RPM packager (eg. \"Jane Doe \") [default: vendor]", + ), + ('doc-files=', None, "list of documentation files (space or comma-separated)"), + ('changelog=', None, "RPM changelog"), + ('icon=', None, "name of icon file"), + ('provides=', None, "capabilities provided by this package"), + ('requires=', None, "capabilities required by this package"), + ('conflicts=', None, "capabilities which conflict with this package"), + ('build-requires=', None, "capabilities required to build this package"), + ('obsoletes=', None, "capabilities made obsolete by this package"), + ('no-autoreq', None, "do not automatically calculate dependencies"), + # Actions to take when building RPM + ('keep-temp', 'k', "don't clean up RPM build directory"), + ('no-keep-temp', None, "clean up RPM build directory [default]"), + ( + 'use-rpm-opt-flags', + None, + "compile with RPM_OPT_FLAGS when building from source RPM", + ), + ('no-rpm-opt-flags', None, "do not pass any RPM CFLAGS to compiler"), + ('rpm3-mode', None, "RPM 3 compatibility mode (default)"), + ('rpm2-mode', None, "RPM 2 compatibility mode"), + # Add the hooks necessary for specifying custom scripts + ('prep-script=', None, "Specify a script for the PREP phase of RPM building"), + ('build-script=', None, "Specify a script for the BUILD phase of RPM building"), + ( + 'pre-install=', + None, + "Specify a script for the pre-INSTALL phase of RPM building", + ), + ( + 'install-script=', + None, + "Specify a script for the INSTALL phase of RPM building", + ), + ( + 'post-install=', + None, + "Specify a script for the post-INSTALL phase of RPM building", + ), + ( + 'pre-uninstall=', + None, + "Specify a script for the pre-UNINSTALL phase of RPM building", + ), + ( + 'post-uninstall=', + None, + "Specify a script for the post-UNINSTALL phase of RPM building", + ), + ('clean-script=', None, "Specify a script for the CLEAN phase of RPM building"), + ( + 'verify-script=', + None, + "Specify a script for the VERIFY phase of the RPM build", + ), + # Allow a packager to explicitly force an architecture + ('force-arch=', None, "Force an architecture onto the RPM build process"), + ('quiet', 'q', "Run the INSTALL phase of RPM building in quiet mode"), + ] + + boolean_options: ClassVar[list[str]] = [ + 'keep-temp', + 'use-rpm-opt-flags', + 'rpm3-mode', + 'no-autoreq', + 'quiet', + ] + + negative_opt: ClassVar[dict[str, str]] = { + 'no-keep-temp': 'keep-temp', + 'no-rpm-opt-flags': 'use-rpm-opt-flags', + 'rpm2-mode': 'rpm3-mode', + } + + def initialize_options(self): + self.bdist_base = None + self.rpm_base = None + self.dist_dir = None + self.python = None + self.fix_python = None + self.spec_only = None + self.binary_only = None + self.source_only = None + self.use_bzip2 = None + + self.distribution_name = None + self.group = None + self.release = None + self.serial = None + self.vendor = None + self.packager = None + self.doc_files = None + self.changelog = None + self.icon = None + + self.prep_script = None + self.build_script = None + self.install_script = None + self.clean_script = None + self.verify_script = None + self.pre_install = None + self.post_install = None + self.pre_uninstall = None + self.post_uninstall = None + self.prep = None + self.provides = None + self.requires = None + self.conflicts = None + self.build_requires = None + self.obsoletes = None + + self.keep_temp = False + self.use_rpm_opt_flags = True + self.rpm3_mode = True + self.no_autoreq = False + + self.force_arch = None + self.quiet = False + + def finalize_options(self) -> None: + self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) + if self.rpm_base is None: + if not self.rpm3_mode: + raise DistutilsOptionError("you must specify --rpm-base in RPM 2 mode") + self.rpm_base = os.path.join(self.bdist_base, "rpm") + + if self.python is None: + if self.fix_python: + self.python = sys.executable + else: + self.python = "python3" + elif self.fix_python: + raise DistutilsOptionError( + "--python and --fix-python are mutually exclusive options" + ) + + if os.name != 'posix': + raise DistutilsPlatformError( + f"don't know how to create RPM distributions on platform {os.name}" + ) + if self.binary_only and self.source_only: + raise DistutilsOptionError( + "cannot supply both '--source-only' and '--binary-only'" + ) + + # don't pass CFLAGS to pure python distributions + if not self.distribution.has_ext_modules(): + self.use_rpm_opt_flags = False + + self.set_undefined_options('bdist', ('dist_dir', 'dist_dir')) + self.finalize_package_data() + + def finalize_package_data(self) -> None: + self.ensure_string('group', "Development/Libraries") + self.ensure_string( + 'vendor', + f"{self.distribution.get_contact()} <{self.distribution.get_contact_email()}>", + ) + self.ensure_string('packager') + self.ensure_string_list('doc_files') + if isinstance(self.doc_files, list): + for readme in ('README', 'README.txt'): + if os.path.exists(readme) and readme not in self.doc_files: + self.doc_files.append(readme) + + self.ensure_string('release', "1") + self.ensure_string('serial') # should it be an int? + + self.ensure_string('distribution_name') + + self.ensure_string('changelog') + # Format changelog correctly + self.changelog = self._format_changelog(self.changelog) + + self.ensure_filename('icon') + + self.ensure_filename('prep_script') + self.ensure_filename('build_script') + self.ensure_filename('install_script') + self.ensure_filename('clean_script') + self.ensure_filename('verify_script') + self.ensure_filename('pre_install') + self.ensure_filename('post_install') + self.ensure_filename('pre_uninstall') + self.ensure_filename('post_uninstall') + + # XXX don't forget we punted on summaries and descriptions -- they + # should be handled here eventually! + + # Now *this* is some meta-data that belongs in the setup script... + self.ensure_string_list('provides') + self.ensure_string_list('requires') + self.ensure_string_list('conflicts') + self.ensure_string_list('build_requires') + self.ensure_string_list('obsoletes') + + self.ensure_string('force_arch') + + def run(self) -> None: # noqa: C901 + if DEBUG: + print("before _get_package_data():") + print("vendor =", self.vendor) + print("packager =", self.packager) + print("doc_files =", self.doc_files) + print("changelog =", self.changelog) + + # make directories + if self.spec_only: + spec_dir = self.dist_dir + self.mkpath(spec_dir) + else: + rpm_dir = {} + for d in ('SOURCES', 'SPECS', 'BUILD', 'RPMS', 'SRPMS'): + rpm_dir[d] = os.path.join(self.rpm_base, d) + self.mkpath(rpm_dir[d]) + spec_dir = rpm_dir['SPECS'] + + # Spec file goes into 'dist_dir' if '--spec-only specified', + # build/rpm. otherwise. + spec_path = os.path.join(spec_dir, f"{self.distribution.get_name()}.spec") + self.execute( + write_file, (spec_path, self._make_spec_file()), f"writing '{spec_path}'" + ) + + if self.spec_only: # stop if requested + return + + # Make a source distribution and copy to SOURCES directory with + # optional icon. + saved_dist_files = self.distribution.dist_files[:] + sdist = self.reinitialize_command('sdist') + if self.use_bzip2: + sdist.formats = ['bztar'] + else: + sdist.formats = ['gztar'] + self.run_command('sdist') + self.distribution.dist_files = saved_dist_files + + source = sdist.get_archive_files()[0] + source_dir = rpm_dir['SOURCES'] + self.copy_file(source, source_dir) + + if self.icon: + if os.path.exists(self.icon): + self.copy_file(self.icon, source_dir) + else: + raise DistutilsFileError(f"icon file '{self.icon}' does not exist") + + # build package + log.info("building RPMs") + rpm_cmd = ['rpmbuild'] + + if self.source_only: # what kind of RPMs? + rpm_cmd.append('-bs') + elif self.binary_only: + rpm_cmd.append('-bb') + else: + rpm_cmd.append('-ba') + rpm_cmd.extend(['--define', f'__python {self.python}']) + if self.rpm3_mode: + rpm_cmd.extend(['--define', f'_topdir {os.path.abspath(self.rpm_base)}']) + if not self.keep_temp: + rpm_cmd.append('--clean') + + if self.quiet: + rpm_cmd.append('--quiet') + + rpm_cmd.append(spec_path) + # Determine the binary rpm names that should be built out of this spec + # file + # Note that some of these may not be really built (if the file + # list is empty) + nvr_string = "%{name}-%{version}-%{release}" + src_rpm = nvr_string + ".src.rpm" + non_src_rpm = "%{arch}/" + nvr_string + ".%{arch}.rpm" + q_cmd = rf"rpm -q --qf '{src_rpm} {non_src_rpm}\n' --specfile '{spec_path}'" + + out = os.popen(q_cmd) + try: + binary_rpms = [] + source_rpm = None + while True: + line = out.readline() + if not line: + break + ell = line.strip().split() + assert len(ell) == 2 + binary_rpms.append(ell[1]) + # The source rpm is named after the first entry in the spec file + if source_rpm is None: + source_rpm = ell[0] + + status = out.close() + if status: + raise DistutilsExecError(f"Failed to execute: {q_cmd!r}") + + finally: + out.close() + + self.spawn(rpm_cmd) + + if self.distribution.has_ext_modules(): + pyversion = get_python_version() + else: + pyversion = 'any' + + if not self.binary_only: + srpm = os.path.join(rpm_dir['SRPMS'], source_rpm) + assert os.path.exists(srpm) + self.move_file(srpm, self.dist_dir) + filename = os.path.join(self.dist_dir, source_rpm) + self.distribution.dist_files.append(('bdist_rpm', pyversion, filename)) + + if not self.source_only: + for rpm in binary_rpms: + rpm = os.path.join(rpm_dir['RPMS'], rpm) + if os.path.exists(rpm): + self.move_file(rpm, self.dist_dir) + filename = os.path.join(self.dist_dir, os.path.basename(rpm)) + self.distribution.dist_files.append(( + 'bdist_rpm', + pyversion, + filename, + )) + + def _dist_path(self, path): + return os.path.join(self.dist_dir, os.path.basename(path)) + + def _make_spec_file(self): # noqa: C901 + """Generate the text of an RPM spec file and return it as a + list of strings (one per line). + """ + # definitions and headers + spec_file = [ + '%define name ' + self.distribution.get_name(), + '%define version ' + self.distribution.get_version().replace('-', '_'), + '%define unmangled_version ' + self.distribution.get_version(), + '%define release ' + self.release.replace('-', '_'), + '', + 'Summary: ' + (self.distribution.get_description() or "UNKNOWN"), + ] + + # Workaround for #14443 which affects some RPM based systems such as + # RHEL6 (and probably derivatives) + vendor_hook = subprocess.getoutput('rpm --eval %{__os_install_post}') + # Generate a potential replacement value for __os_install_post (whilst + # normalizing the whitespace to simplify the test for whether the + # invocation of brp-python-bytecompile passes in __python): + vendor_hook = '\n'.join([ + f' {line.strip()} \\' for line in vendor_hook.splitlines() + ]) + problem = "brp-python-bytecompile \\\n" + fixed = "brp-python-bytecompile %{__python} \\\n" + fixed_hook = vendor_hook.replace(problem, fixed) + if fixed_hook != vendor_hook: + spec_file.append('# Workaround for https://bugs.python.org/issue14443') + spec_file.append('%define __os_install_post ' + fixed_hook + '\n') + + # put locale summaries into spec file + # XXX not supported for now (hard to put a dictionary + # in a config file -- arg!) + # for locale in self.summaries.keys(): + # spec_file.append('Summary(%s): %s' % (locale, + # self.summaries[locale])) + + spec_file.extend([ + 'Name: %{name}', + 'Version: %{version}', + 'Release: %{release}', + ]) + + # XXX yuck! this filename is available from the "sdist" command, + # but only after it has run: and we create the spec file before + # running "sdist", in case of --spec-only. + if self.use_bzip2: + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.bz2') + else: + spec_file.append('Source0: %{name}-%{unmangled_version}.tar.gz') + + spec_file.extend([ + 'License: ' + (self.distribution.get_license() or "UNKNOWN"), + 'Group: ' + self.group, + 'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot', + 'Prefix: %{_prefix}', + ]) + + if not self.force_arch: + # noarch if no extension modules + if not self.distribution.has_ext_modules(): + spec_file.append('BuildArch: noarch') + else: + spec_file.append(f'BuildArch: {self.force_arch}') + + for field in ( + 'Vendor', + 'Packager', + 'Provides', + 'Requires', + 'Conflicts', + 'Obsoletes', + ): + val = getattr(self, field.lower()) + if isinstance(val, list): + spec_file.append('{}: {}'.format(field, ' '.join(val))) + elif val is not None: + spec_file.append(f'{field}: {val}') + + if self.distribution.get_url(): + spec_file.append('Url: ' + self.distribution.get_url()) + + if self.distribution_name: + spec_file.append('Distribution: ' + self.distribution_name) + + if self.build_requires: + spec_file.append('BuildRequires: ' + ' '.join(self.build_requires)) + + if self.icon: + spec_file.append('Icon: ' + os.path.basename(self.icon)) + + if self.no_autoreq: + spec_file.append('AutoReq: 0') + + spec_file.extend([ + '', + '%description', + self.distribution.get_long_description() or "", + ]) + + # put locale descriptions into spec file + # XXX again, suppressed because config file syntax doesn't + # easily support this ;-( + # for locale in self.descriptions.keys(): + # spec_file.extend([ + # '', + # '%description -l ' + locale, + # self.descriptions[locale], + # ]) + + # rpm scripts + # figure out default build script + def_setup_call = f"{self.python} {os.path.basename(sys.argv[0])}" + def_build = f"{def_setup_call} build" + if self.use_rpm_opt_flags: + def_build = 'env CFLAGS="$RPM_OPT_FLAGS" ' + def_build + + # insert contents of files + + # XXX this is kind of misleading: user-supplied options are files + # that we open and interpolate into the spec file, but the defaults + # are just text that we drop in as-is. Hmmm. + + install_cmd = f'{def_setup_call} install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES' + + script_options = [ + ('prep', 'prep_script', "%setup -n %{name}-%{unmangled_version}"), + ('build', 'build_script', def_build), + ('install', 'install_script', install_cmd), + ('clean', 'clean_script', "rm -rf $RPM_BUILD_ROOT"), + ('verifyscript', 'verify_script', None), + ('pre', 'pre_install', None), + ('post', 'post_install', None), + ('preun', 'pre_uninstall', None), + ('postun', 'post_uninstall', None), + ] + + 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) + if val or default: + spec_file.extend([ + '', + '%' + rpm_opt, + ]) + if val: + with open(val) as f: + spec_file.extend(f.read().split('\n')) + else: + spec_file.append(default) + + # files section + spec_file.extend([ + '', + '%files -f INSTALLED_FILES', + '%defattr(-,root,root)', + ]) + + if self.doc_files: + spec_file.append('%doc ' + ' '.join(self.doc_files)) + + if self.changelog: + spec_file.extend([ + '', + '%changelog', + ]) + spec_file.extend(self.changelog) + + return spec_file + + def _format_changelog(self, changelog): + """Format the changelog correctly and convert it to a list of strings""" + if not changelog: + return changelog + new_changelog = [] + for line in changelog.strip().split('\n'): + line = line.strip() + if line[0] == '*': + new_changelog.extend(['', line]) + elif line[0] == '-': + new_changelog.append(line) + else: + new_changelog.append(' ' + line) + + # strip trailing newline inserted by first changelog entry + if not new_changelog[0]: + del new_changelog[0] + + return new_changelog diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build.py new file mode 100644 index 0000000000000000000000000000000000000000..6a8303a954ea705c547e2014dc6b51d9d987a532 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build.py @@ -0,0 +1,156 @@ +"""distutils.command.build + +Implements the Distutils 'build' command.""" + +from __future__ import annotations + +import os +import sys +import sysconfig +from collections.abc import Callable +from typing import ClassVar + +from ..ccompiler import show_compilers +from ..core import Command +from ..errors import DistutilsOptionError +from ..util import get_platform + + +class build(Command): + description = "build everything needed to install" + + user_options = [ + ('build-base=', 'b', "base directory for build library"), + ('build-purelib=', None, "build directory for platform-neutral distributions"), + ('build-platlib=', None, "build directory for platform-specific distributions"), + ( + 'build-lib=', + None, + "build directory for all distribution (defaults to either build-purelib or build-platlib", + ), + ('build-scripts=', None, "build directory for scripts"), + ('build-temp=', 't', "temporary build directory"), + ( + 'plat-name=', + 'p', + f"platform name to build for, if supported [default: {get_platform()}]", + ), + ('compiler=', 'c', "specify the compiler type"), + ('parallel=', 'j', "number of parallel build jobs"), + ('debug', 'g', "compile extensions and libraries with debugging information"), + ('force', 'f', "forcibly build everything (ignore file timestamps)"), + ('executable=', 'e', "specify final destination interpreter path (build.py)"), + ] + + boolean_options: ClassVar[list[str]] = ['debug', 'force'] + + help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [ + ('help-compiler', None, "list available compilers", show_compilers), + ] + + def initialize_options(self): + self.build_base = 'build' + # these are decided only after 'build_base' has its final value + # (unless overridden by the user or client) + self.build_purelib = None + self.build_platlib = None + self.build_lib = None + self.build_temp = None + self.build_scripts = None + self.compiler = None + self.plat_name = None + self.debug = None + self.force = False + self.executable = None + self.parallel = None + + def finalize_options(self) -> None: # noqa: C901 + if self.plat_name is None: + self.plat_name = get_platform() + else: + # plat-name only supported for windows (other platforms are + # supported via ./configure flags, if at all). Avoid misleading + # other platforms. + if os.name != 'nt': + raise DistutilsOptionError( + "--plat-name only supported on Windows (try " + "using './configure --help' on your platform)" + ) + + plat_specifier = f".{self.plat_name}-{sys.implementation.cache_tag}" + + # Python 3.13+ with --disable-gil shouldn't share build directories + if sysconfig.get_config_var('Py_GIL_DISABLED'): + plat_specifier += 't' + + # Make it so Python 2.x and Python 2.x with --with-pydebug don't + # share the same build directories. Doing so confuses the build + # process for C modules + if hasattr(sys, 'gettotalrefcount'): + plat_specifier += '-pydebug' + + # 'build_purelib' and 'build_platlib' just default to 'lib' and + # 'lib.' under the base build directory. We only use one of + # them for a given distribution, though -- + if self.build_purelib is None: + self.build_purelib = os.path.join(self.build_base, 'lib') + if self.build_platlib is None: + self.build_platlib = os.path.join(self.build_base, 'lib' + plat_specifier) + + # 'build_lib' is the actual directory that we will use for this + # particular module distribution -- if user didn't supply it, pick + # one of 'build_purelib' or 'build_platlib'. + if self.build_lib is None: + if self.distribution.has_ext_modules(): + self.build_lib = self.build_platlib + else: + self.build_lib = self.build_purelib + + # 'build_temp' -- temporary directory for compiler turds, + # "build/temp." + if self.build_temp is None: + self.build_temp = os.path.join(self.build_base, 'temp' + plat_specifier) + if self.build_scripts is None: + self.build_scripts = os.path.join( + self.build_base, + f'scripts-{sys.version_info.major}.{sys.version_info.minor}', + ) + + if self.executable is None and sys.executable: + self.executable = os.path.normpath(sys.executable) + + if isinstance(self.parallel, str): + try: + self.parallel = int(self.parallel) + except ValueError: + raise DistutilsOptionError("parallel should be an integer") + + def run(self) -> None: + # Run all relevant sub-commands. This will be some subset of: + # - build_py - pure Python modules + # - build_clib - standalone C libraries + # - build_ext - Python extensions + # - build_scripts - (Python) scripts + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + + # -- Predicates for the sub-command list --------------------------- + + def has_pure_modules(self): + return self.distribution.has_pure_modules() + + def has_c_libraries(self): + return self.distribution.has_c_libraries() + + def has_ext_modules(self): + return self.distribution.has_ext_modules() + + def has_scripts(self): + return self.distribution.has_scripts() + + sub_commands = [ + ('build_py', has_pure_modules), + ('build_clib', has_c_libraries), + ('build_ext', has_ext_modules), + ('build_scripts', has_scripts), + ] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_clib.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_clib.py new file mode 100644 index 0000000000000000000000000000000000000000..8de5df239c793ac74265d5aac6b113c99b1934fd --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_clib.py @@ -0,0 +1,199 @@ +"""distutils.command.build_clib + +Implements the Distutils 'build_clib' command, to build a C/C++ library +that is included in the module distribution and needed by an extension +module.""" + +# XXX this module has *lots* of code ripped-off quite transparently from +# build_ext.py -- not surprisingly really, as the work required to build +# a static library from a collection of C source files is not really all +# that different from what's required to build a shared object file from +# a collection of C source files. Nevertheless, I haven't done the +# necessary refactoring to account for the overlap in code between the +# two modules, mainly because a number of subtle details changed in the +# cut 'n paste. Sigh. +from __future__ import annotations + +import os +from collections.abc import Callable +from distutils._log import log +from typing import ClassVar + +from ..ccompiler import new_compiler, show_compilers +from ..core import Command +from ..errors import DistutilsSetupError +from ..sysconfig import customize_compiler + + +class build_clib(Command): + description = "build C/C++ libraries used by Python extensions" + + user_options: ClassVar[list[tuple[str, str, str]]] = [ + ('build-clib=', 'b', "directory to build C/C++ libraries to"), + ('build-temp=', 't', "directory to put temporary build by-products"), + ('debug', 'g', "compile with debugging information"), + ('force', 'f', "forcibly build everything (ignore file timestamps)"), + ('compiler=', 'c', "specify the compiler type"), + ] + + boolean_options: ClassVar[list[str]] = ['debug', 'force'] + + help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [ + ('help-compiler', None, "list available compilers", show_compilers), + ] + + def initialize_options(self): + self.build_clib = None + self.build_temp = None + + # List of libraries to build + self.libraries = None + + # Compilation options for all libraries + self.include_dirs = None + self.define = None + self.undef = None + self.debug = None + self.force = False + self.compiler = None + + def finalize_options(self) -> None: + # This might be confusing: both build-clib and build-temp default + # to build-temp as defined by the "build" command. This is because + # I think that C libraries are really just temporary build + # by-products, at least from the point of view of building Python + # extensions -- but I want to keep my options open. + self.set_undefined_options( + 'build', + ('build_temp', 'build_clib'), + ('build_temp', 'build_temp'), + ('compiler', 'compiler'), + ('debug', 'debug'), + ('force', 'force'), + ) + + self.libraries = self.distribution.libraries + if self.libraries: + self.check_library_list(self.libraries) + + if self.include_dirs is None: + self.include_dirs = self.distribution.include_dirs or [] + if isinstance(self.include_dirs, str): + self.include_dirs = self.include_dirs.split(os.pathsep) + + # XXX same as for build_ext -- what about 'self.define' and + # 'self.undef' ? + + def run(self) -> None: + if not self.libraries: + return + + self.compiler = new_compiler(compiler=self.compiler, force=self.force) + customize_compiler(self.compiler) + + if self.include_dirs is not None: + 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: + self.compiler.define_macro(name, value) + if self.undef is not None: + for macro in self.undef: + self.compiler.undefine_macro(macro) + + self.build_libraries(self.libraries) + + def check_library_list(self, libraries) -> None: + """Ensure that the list of libraries is valid. + + `library` is presumably provided as a command option 'libraries'. + This method checks that it is a list of 2-tuples, where the tuples + are (library_name, build_info_dict). + + Raise DistutilsSetupError if the structure is invalid anywhere; + just returns otherwise. + """ + if not isinstance(libraries, list): + raise DistutilsSetupError("'libraries' option must be a list of tuples") + + for lib in libraries: + if not isinstance(lib, tuple) and len(lib) != 2: + raise DistutilsSetupError("each element of 'libraries' must a 2-tuple") + + name, build_info = lib + + if not isinstance(name, str): + raise DistutilsSetupError( + "first element of each tuple in 'libraries' " + "must be a string (the library name)" + ) + + if '/' in name or (os.sep != '/' and os.sep in name): + raise DistutilsSetupError( + f"bad library name '{lib[0]}': may not contain directory separators" + ) + + if not isinstance(build_info, dict): + raise DistutilsSetupError( + "second element of each tuple in 'libraries' " + "must be a dictionary (build info)" + ) + + def get_library_names(self): + # Assume the library list is valid -- 'check_library_list()' is + # called from 'finalize_options()', so it should be! + if not self.libraries: + return None + + lib_names = [] + 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: + sources = build_info.get('sources') + if sources is None or not isinstance(sources, (list, tuple)): + raise DistutilsSetupError( + f"in 'libraries' option (library '{lib_name}'), " + "'sources' must be present and must be " + "a list of source filenames" + ) + + filenames.extend(sources) + return filenames + + def build_libraries(self, libraries) -> None: + for lib_name, build_info in libraries: + sources = build_info.get('sources') + if sources is None or not isinstance(sources, (list, tuple)): + raise DistutilsSetupError( + f"in 'libraries' option (library '{lib_name}'), " + "'sources' must be present and must be " + "a list of source filenames" + ) + sources = list(sources) + + log.info("building '%s' library", lib_name) + + # First, compile the source code to object files in the library + # directory. (This should probably change to putting object + # files in a temporary build directory.) + macros = build_info.get('macros') + include_dirs = build_info.get('include_dirs') + objects = self.compiler.compile( + sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=include_dirs, + debug=self.debug, + ) + + # Now "link" the object files together into a static library. + # (On Unix at least, this isn't really linking -- it just + # builds an archive. Whatever.) + self.compiler.create_static_lib( + objects, lib_name, output_dir=self.build_clib, debug=self.debug + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_ext.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_ext.py new file mode 100644 index 0000000000000000000000000000000000000000..df623d7e0ef2f667bfce329283256513621eacf7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_ext.py @@ -0,0 +1,811 @@ +"""distutils.command.build_ext + +Implements the Distutils 'build_ext' command, for building extension +modules (currently limited to C extensions, should accommodate C++ +extensions ASAP).""" + +from __future__ import annotations + +import contextlib +import os +import re +import sys +from collections.abc import Callable +from distutils._log import log +from site import USER_BASE +from typing import ClassVar + +from .._modified import newer_group +from ..ccompiler import new_compiler, show_compilers +from ..core import Command +from ..errors import ( + CCompilerError, + CompileError, + DistutilsError, + DistutilsOptionError, + DistutilsPlatformError, + DistutilsSetupError, +) +from ..extension import Extension +from ..sysconfig import customize_compiler, get_config_h_filename, get_python_version +from ..util import get_platform, is_freethreaded, is_mingw + +# An extension name is just a dot-separated list of Python NAMEs (ie. +# the same as a fully-qualified module name). +extension_name_re = re.compile(r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$') + + +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 + # these, i.e. how to make it so fancy_getopt can suck them off the + # command line and make it look like setup.py defined the appropriate + # lists of tuples of what-have-you. + # - each command needs a callback to process its command-line options + # - Command.__init__() needs access to its share of the whole + # command line (must ultimately come from + # Distribution.parse_command_line()) + # - it then calls the current command class' option-parsing + # callback to deal with weird options like -D, which have to + # parse the option text and churn out some custom data + # structure + # - that data structure (in this case, a list of 2-tuples) + # will then be present in the command object by the time + # we get to finalize_options() (i.e. the constructor + # takes care of both command-line and client options + # in between initialize_options() and finalize_options()) + + sep_by = f" (separated by '{os.pathsep}')" + user_options = [ + ('build-lib=', 'b', "directory for compiled extension modules"), + ('build-temp=', 't', "directory for temporary files (build by-products)"), + ( + 'plat-name=', + 'p', + "platform name to cross-compile for, if supported " + f"[default: {get_platform()}]", + ), + ( + 'inplace', + 'i', + "ignore build-lib and put compiled extensions into the source " + "directory alongside your pure Python modules", + ), + ( + 'include-dirs=', + 'I', + "list of directories to search for header files" + sep_by, + ), + ('define=', 'D', "C preprocessor macros to define"), + ('undef=', 'U', "C preprocessor macros to undefine"), + ('libraries=', 'l', "external C libraries to link with"), + ( + 'library-dirs=', + 'L', + "directories to search for external C libraries" + sep_by, + ), + ('rpath=', 'R', "directories to search for shared C libraries at runtime"), + ('link-objects=', 'O', "extra explicit link objects to include in the link"), + ('debug', 'g', "compile/link with debugging information"), + ('force', 'f', "forcibly build everything (ignore file timestamps)"), + ('compiler=', 'c', "specify the compiler type"), + ('parallel=', 'j', "number of parallel build jobs"), + ('swig-cpp', None, "make SWIG create C++ files (default is C)"), + ('swig-opts=', None, "list of SWIG command line options"), + ('swig=', None, "path to the SWIG executable"), + ('user', None, "add user include, library and rpath"), + ] + + boolean_options: ClassVar[list[str]] = [ + 'inplace', + 'debug', + 'force', + 'swig-cpp', + 'user', + ] + + help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [ + ('help-compiler', None, "list available compilers", show_compilers), + ] + + def initialize_options(self): + self.extensions = None + self.build_lib = None + self.plat_name = None + self.build_temp = None + self.inplace = False + self.package = None + + self.include_dirs = None + self.define = None + self.undef = None + self.libraries = None + self.library_dirs = None + self.rpath = None + self.link_objects = None + self.debug = None + self.force = None + self.compiler = None + self.swig = None + self.swig_cpp = None + self.swig_opts = None + self.user = None + self.parallel = None + + @staticmethod + def _python_lib_dir(sysconfig): + """ + Resolve Python's library directory for building extensions + that rely on a shared Python library. + + See python/cpython#44264 and python/cpython#48686 + """ + if not sysconfig.get_config_var('Py_ENABLE_SHARED'): + return + + if sysconfig.python_build: + yield '.' + return + + if sys.platform == 'zos': + # On z/OS, a user is not required to install Python to + # a predetermined path, but can use Python portably + installed_dir = sysconfig.get_config_var('base') + lib_dir = sysconfig.get_config_var('platlibdir') + yield os.path.join(installed_dir, lib_dir) + else: + # building third party extensions + yield sysconfig.get_config_var('LIBDIR') + + def finalize_options(self) -> None: # noqa: C901 + from distutils import sysconfig + + self.set_undefined_options( + 'build', + ('build_lib', 'build_lib'), + ('build_temp', 'build_temp'), + ('compiler', 'compiler'), + ('debug', 'debug'), + ('force', 'force'), + ('parallel', 'parallel'), + ('plat_name', 'plat_name'), + ) + + if self.package is None: + self.package = self.distribution.ext_package + + self.extensions = self.distribution.ext_modules + + # Make sure Python's include directories (for Python.h, pyconfig.h, + # etc.) are in the include search path. + py_include = sysconfig.get_python_inc() + plat_py_include = sysconfig.get_python_inc(plat_specific=True) + if self.include_dirs is None: + self.include_dirs = self.distribution.include_dirs or [] + if isinstance(self.include_dirs, str): + self.include_dirs = self.include_dirs.split(os.pathsep) + + # If in a virtualenv, add its include directory + # Issue 16116 + if sys.exec_prefix != sys.base_exec_prefix: + self.include_dirs.append(os.path.join(sys.exec_prefix, 'include')) + + # Put the Python "system" include dir at the end, so that + # any local include dirs take precedence. + self.include_dirs.extend(py_include.split(os.path.pathsep)) + if plat_py_include != py_include: + self.include_dirs.extend(plat_py_include.split(os.path.pathsep)) + + self.ensure_string_list('libraries') + self.ensure_string_list('link_objects') + + # Life is easier if we're not forever checking for None, so + # simplify these options to empty lists if unset + if self.libraries is None: + self.libraries = [] + if self.library_dirs is None: + self.library_dirs = [] + elif isinstance(self.library_dirs, str): + self.library_dirs = self.library_dirs.split(os.pathsep) + + if self.rpath is None: + self.rpath = [] + elif isinstance(self.rpath, str): + self.rpath = self.rpath.split(os.pathsep) + + # for extensions under windows use different directories + # for Release and Debug builds. + # also Python's library directory must be appended to library_dirs + if os.name == 'nt' and not is_mingw(): + # the 'libs' directory is for binary installs - we assume that + # must be the *native* platform. But we don't really support + # cross-compiling via a binary install anyway, so we let it go. + self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs')) + if sys.base_exec_prefix != sys.prefix: # Issue 16116 + self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs')) + if self.debug: + self.build_temp = os.path.join(self.build_temp, "Debug") + else: + self.build_temp = os.path.join(self.build_temp, "Release") + + # Append the source distribution include and library directories, + # this allows distutils on windows to work in the source tree + self.include_dirs.append(os.path.dirname(get_config_h_filename())) + self.library_dirs.append(sys.base_exec_prefix) + + # Use the .lib files for the correct architecture + if self.plat_name == 'win32': + suffix = 'win32' + else: + # win-amd64 + suffix = self.plat_name[4:] + new_lib = os.path.join(sys.exec_prefix, 'PCbuild') + if suffix: + new_lib = os.path.join(new_lib, suffix) + self.library_dirs.append(new_lib) + + # For extensions under Cygwin, Python's library directory must be + # appended to library_dirs + if sys.platform[:6] == 'cygwin': + if not sysconfig.python_build: + # building third party extensions + self.library_dirs.append( + os.path.join( + sys.prefix, "lib", "python" + get_python_version(), "config" + ) + ) + else: + # building python standard extensions + self.library_dirs.append('.') + + self.library_dirs.extend(self._python_lib_dir(sysconfig)) + + # The argument parsing will result in self.define being a string, but + # it has to be a list of 2-tuples. All the preprocessor symbols + # specified by the 'define' option will be set to '1'. Multiple + # symbols can be separated with commas. + + if self.define: + defines = self.define.split(',') + self.define = [(symbol, '1') for symbol in defines] + + # The option for macros to undefine is also a string from the + # option parsing, but has to be a list. Multiple symbols can also + # be separated with commas here. + if self.undef: + self.undef = self.undef.split(',') + + if self.swig_opts is None: + self.swig_opts = [] + else: + self.swig_opts = self.swig_opts.split(' ') + + # Finally add the user include and library directories if requested + if self.user: + user_include = os.path.join(USER_BASE, "include") + user_lib = os.path.join(USER_BASE, "lib") + if os.path.isdir(user_include): + self.include_dirs.append(user_include) + if os.path.isdir(user_lib): + self.library_dirs.append(user_lib) + self.rpath.append(user_lib) + + if isinstance(self.parallel, str): + try: + self.parallel = int(self.parallel) + except ValueError: + raise DistutilsOptionError("parallel should be an integer") + + def run(self) -> None: # noqa: C901 + # 'self.extensions', as supplied by setup.py, is a list of + # Extension instances. See the documentation for Extension (in + # distutils.extension) for details. + # + # For backwards compatibility with Distutils 0.8.2 and earlier, we + # also allow the 'extensions' list to be a list of tuples: + # (ext_name, build_info) + # where build_info is a dictionary containing everything that + # Extension instances do except the name, with a few things being + # differently named. We convert these 2-tuples to Extension + # instances as needed. + + if not self.extensions: + return + + # If we were asked to build any C/C++ libraries, make sure that the + # directory where we put them is in the library search path for + # linking extensions. + if self.distribution.has_c_libraries(): + build_clib = self.get_finalized_command('build_clib') + self.libraries.extend(build_clib.get_library_names() or []) + self.library_dirs.append(build_clib.build_clib) + + # Setup the CCompiler object that we'll use to do all the + # compiling and linking + self.compiler = new_compiler( + compiler=self.compiler, + verbose=self.verbose, + force=self.force, + ) + customize_compiler(self.compiler) + # If we are cross-compiling, init the compiler now (if we are not + # cross-compiling, init would not hurt, but people may rely on + # late initialization of compiler even if they shouldn't...) + if os.name == 'nt' and self.plat_name != get_platform(): + self.compiler.initialize(self.plat_name) + + # The official Windows free threaded Python installer doesn't set + # Py_GIL_DISABLED because its pyconfig.h is shared with the + # default build, so define it here (pypa/setuptools#4662). + if os.name == 'nt' and is_freethreaded(): + self.compiler.define_macro('Py_GIL_DISABLED', '1') + + # And make sure that any compile/link-related options (which might + # come from the command-line or from the setup script) are set in + # that CCompiler object -- that way, they automatically apply to + # all compiling and linking done here. + if self.include_dirs is not None: + 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: + self.compiler.define_macro(name, value) + if self.undef is not None: + for macro in self.undef: + self.compiler.undefine_macro(macro) + if self.libraries is not None: + self.compiler.set_libraries(self.libraries) + if self.library_dirs is not None: + self.compiler.set_library_dirs(self.library_dirs) + if self.rpath is not None: + self.compiler.set_runtime_library_dirs(self.rpath) + if self.link_objects is not None: + self.compiler.set_link_objects(self.link_objects) + + # Now actually compile and link everything. + self.build_extensions() + + def check_extensions_list(self, extensions) -> None: # noqa: C901 + """Ensure that the list of extensions (presumably provided as a + command option 'extensions') is valid, i.e. it is a list of + Extension objects. We also support the old-style list of 2-tuples, + where the tuples are (ext_name, build_info), which are converted to + Extension instances here. + + Raise DistutilsSetupError if the structure is invalid anywhere; + just returns otherwise. + """ + if not isinstance(extensions, list): + raise DistutilsSetupError( + "'ext_modules' option must be a list of Extension instances" + ) + + for i, ext in enumerate(extensions): + if isinstance(ext, Extension): + continue # OK! (assume type-checking done + # by Extension constructor) + + if not isinstance(ext, tuple) or len(ext) != 2: + raise DistutilsSetupError( + "each element of 'ext_modules' option must be an " + "Extension instance or 2-tuple" + ) + + ext_name, build_info = ext + + log.warning( + "old-style (ext_name, build_info) tuple found in " + "ext_modules for extension '%s' " + "-- please convert to Extension instance", + ext_name, + ) + + if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)): + raise DistutilsSetupError( + "first element of each tuple in 'ext_modules' " + "must be the extension name (a string)" + ) + + if not isinstance(build_info, dict): + raise DistutilsSetupError( + "second element of each tuple in 'ext_modules' " + "must be a dictionary (build info)" + ) + + # OK, the (ext_name, build_info) dict is type-safe: convert it + # to an Extension instance. + ext = Extension(ext_name, build_info['sources']) + + # Easy stuff: one-to-one mapping from dict elements to + # instance attributes. + for key in ( + 'include_dirs', + 'library_dirs', + 'libraries', + 'extra_objects', + 'extra_compile_args', + 'extra_link_args', + ): + val = build_info.get(key) + if val is not None: + setattr(ext, key, val) + + # Medium-easy stuff: same syntax/semantics, different names. + ext.runtime_library_dirs = build_info.get('rpath') + if 'def_file' in build_info: + log.warning("'def_file' element of build info dict no longer supported") + + # Non-trivial stuff: 'macros' split into 'define_macros' + # and 'undef_macros'. + macros = build_info.get('macros') + if macros: + ext.define_macros = [] + ext.undef_macros = [] + for macro in macros: + if not (isinstance(macro, tuple) and len(macro) in (1, 2)): + raise DistutilsSetupError( + "'macros' element of build info dict must be 1- or 2-tuple" + ) + if len(macro) == 1: + ext.undef_macros.append(macro[0]) + elif len(macro) == 2: + ext.define_macros.append(macro) + + extensions[i] = ext + + def get_source_files(self): + self.check_extensions_list(self.extensions) + filenames = [] + + # Wouldn't it be neat if we knew the names of header files too... + for ext in self.extensions: + filenames.extend(ext.sources) + return filenames + + def get_outputs(self): + # Sanity check the 'extensions' list -- can't assume this is being + # done in the same run as a 'build_extensions()' call (in fact, we + # can probably assume that it *isn't*!). + self.check_extensions_list(self.extensions) + + # And build the list of output (built) filenames. Note that this + # ignores the 'inplace' flag, and assumes everything goes in the + # "build" tree. + return [self.get_ext_fullpath(ext.name) for ext in self.extensions] + + def build_extensions(self) -> None: + # First, sanity-check the 'extensions' list + self.check_extensions_list(self.extensions) + if self.parallel: + self._build_extensions_parallel() + else: + self._build_extensions_serial() + + def _build_extensions_parallel(self): + workers = self.parallel + if self.parallel is True: + workers = os.cpu_count() # may return None + try: + from concurrent.futures import ThreadPoolExecutor + except ImportError: + workers = None + + if workers is None: + self._build_extensions_serial() + return + + with ThreadPoolExecutor(max_workers=workers) as executor: + futures = [ + executor.submit(self.build_extension, ext) for ext in self.extensions + ] + for ext, fut in zip(self.extensions, futures): + with self._filter_build_errors(ext): + fut.result() + + def _build_extensions_serial(self): + for ext in self.extensions: + with self._filter_build_errors(ext): + self.build_extension(ext) + + @contextlib.contextmanager + def _filter_build_errors(self, ext): + try: + yield + except (CCompilerError, DistutilsError, CompileError) as e: + if not ext.optional: + raise + self.warn(f'building extension "{ext.name}" failed: {e}') + + def build_extension(self, ext) -> None: + sources = ext.sources + if sources is None or not isinstance(sources, (list, tuple)): + raise DistutilsSetupError( + f"in 'ext_modules' option (extension '{ext.name}'), " + "'sources' must be present and must be " + "a list of source filenames" + ) + # sort to make the resulting .so file build reproducible + sources = sorted(sources) + + ext_path = self.get_ext_fullpath(ext.name) + depends = sources + ext.depends + if not (self.force or newer_group(depends, ext_path, 'newer')): + log.debug("skipping '%s' extension (up-to-date)", ext.name) + return + else: + log.info("building '%s' extension", ext.name) + + # First, scan the sources for SWIG definition files (.i), run + # SWIG on 'em to create .c files, and modify the sources list + # accordingly. + sources = self.swig_sources(sources, ext) + + # Next, compile the source code to object files. + + # XXX not honouring 'define_macros' or 'undef_macros' -- the + # CCompiler API needs to change to accommodate this, and I + # want to do one thing at a time! + + # Two possible sources for extra compiler arguments: + # - 'extra_compile_args' in Extension object + # - CFLAGS environment variable (not particularly + # elegant, but people seem to expect it and I + # guess it's useful) + # The environment variable should take precedence, and + # any sensible compiler will give precedence to later + # command line args. Hence we combine them in order: + extra_args = ext.extra_compile_args or [] + + macros = ext.define_macros[:] + for undef in ext.undef_macros: + macros.append((undef,)) + + objects = self.compiler.compile( + sources, + output_dir=self.build_temp, + macros=macros, + include_dirs=ext.include_dirs, + debug=self.debug, + extra_postargs=extra_args, + depends=ext.depends, + ) + + # XXX outdated variable, kept here in case third-part code + # needs it. + self._built_objects = objects[:] + + # Now link the object files together into a "shared object" -- + # of course, first we have to figure out all the other things + # that go into the mix. + if ext.extra_objects: + objects.extend(ext.extra_objects) + extra_args = ext.extra_link_args or [] + + # Detect target language, if not provided + language = ext.language or self.compiler.detect_language(sources) + + self.compiler.link_shared_object( + objects, + ext_path, + libraries=self.get_libraries(ext), + library_dirs=ext.library_dirs, + runtime_library_dirs=ext.runtime_library_dirs, + extra_postargs=extra_args, + export_symbols=self.get_export_symbols(ext), + debug=self.debug, + build_temp=self.build_temp, + target_lang=language, + ) + + def swig_sources(self, sources, extension): + """Walk the list of source files in 'sources', looking for SWIG + interface (.i) files. Run SWIG on all that are found, and + return a modified 'sources' list with SWIG source files replaced + by the generated C (or C++) files. + """ + new_sources = [] + swig_sources = [] + swig_targets = {} + + # XXX this drops generated C/C++ files into the source tree, which + # is fine for developers who want to distribute the generated + # source -- but there should be an option to put SWIG output in + # the temp dir. + + if self.swig_cpp: + log.warning("--swig-cpp is deprecated - use --swig-opts=-c++") + + if ( + self.swig_cpp + or ('-c++' in self.swig_opts) + or ('-c++' in extension.swig_opts) + ): + target_ext = '.cpp' + else: + target_ext = '.c' + + for source in sources: + (base, ext) = os.path.splitext(source) + if ext == ".i": # SWIG interface file + new_sources.append(base + '_wrap' + target_ext) + swig_sources.append(source) + swig_targets[source] = new_sources[-1] + else: + new_sources.append(source) + + if not swig_sources: + return new_sources + + swig = self.swig or self.find_swig() + swig_cmd = [swig, "-python"] + swig_cmd.extend(self.swig_opts) + if self.swig_cpp: + swig_cmd.append("-c++") + + # Do not override commandline arguments + if not self.swig_opts: + swig_cmd.extend(extension.swig_opts) + + for source in swig_sources: + target = swig_targets[source] + log.info("swigging %s to %s", source, target) + self.spawn(swig_cmd + ["-o", target, source]) + + return new_sources + + def find_swig(self): + """Return the name of the SWIG executable. On Unix, this is + just "swig" -- it should be in the PATH. Tries a bit harder on + Windows. + """ + if os.name == "posix": + return "swig" + elif os.name == "nt": + # Look for SWIG in its standard installation directory on + # Windows (or so I presume!). If we find it there, great; + # if not, act like Unix and assume it's in the PATH. + for vers in ("1.3", "1.2", "1.1"): + fn = os.path.join(f"c:\\swig{vers}", "swig.exe") + if os.path.isfile(fn): + return fn + else: + return "swig.exe" + else: + raise DistutilsPlatformError( + f"I don't know how to find (much less run) SWIG on platform '{os.name}'" + ) + + # -- Name generators ----------------------------------------------- + # (extension names, filenames, whatever) + def get_ext_fullpath(self, ext_name: str) -> str: + """Returns the path of the filename for a given extension. + + The file is located in `build_lib` or directly in the package + (inplace option). + """ + fullname = self.get_ext_fullname(ext_name) + modpath = fullname.split('.') + filename = self.get_ext_filename(modpath[-1]) + + if not self.inplace: + # no further work needed + # returning : + # build_dir/package/path/filename + filename = os.path.join(*modpath[:-1] + [filename]) + return os.path.join(self.build_lib, filename) + + # the inplace option requires to find the package directory + # using the build_py command for that + package = '.'.join(modpath[0:-1]) + build_py = self.get_finalized_command('build_py') + package_dir = os.path.abspath(build_py.get_package_dir(package)) + + # returning + # package_dir/filename + return os.path.join(package_dir, filename) + + def get_ext_fullname(self, ext_name: str) -> str: + """Returns the fullname of a given extension name. + + Adds the `package.` prefix""" + if self.package is None: + return ext_name + else: + return self.package + '.' + ext_name + + def get_ext_filename(self, ext_name: str) -> str: + r"""Convert the name of an extension (eg. "foo.bar") into the name + of the file from which it will be loaded (eg. "foo/bar.so", or + "foo\bar.pyd"). + """ + from ..sysconfig import get_config_var + + ext_path = ext_name.split('.') + ext_suffix = get_config_var('EXT_SUFFIX') + return os.path.join(*ext_path) + ext_suffix + + def get_export_symbols(self, ext: Extension) -> list[str]: + """Return the list of symbols that a shared extension has to + export. This either uses 'ext.export_symbols' or, if it's not + provided, "PyInit_" + module_name. Only relevant on Windows, where + the .pyd file (DLL) must export the module "PyInit_" function. + """ + name = self._get_module_name_for_symbol(ext) + try: + # Unicode module name support as defined in PEP-489 + # https://peps.python.org/pep-0489/#export-hook-name + name.encode('ascii') + except UnicodeEncodeError: + suffix = 'U_' + name.encode('punycode').replace(b'-', b'_').decode('ascii') + else: + suffix = "_" + name + + initfunc_name = "PyInit" + suffix + if initfunc_name not in ext.export_symbols: + ext.export_symbols.append(initfunc_name) + return ext.export_symbols + + def _get_module_name_for_symbol(self, ext): + # Package name should be used for `__init__` modules + # https://github.com/python/cpython/issues/80074 + # https://github.com/pypa/setuptools/issues/4826 + parts = ext.name.split(".") + if parts[-1] == "__init__" and len(parts) >= 2: + return parts[-2] + return parts[-1] + + def get_libraries(self, ext: Extension) -> list[str]: # noqa: C901 + """Return the list of libraries to link against when building a + shared extension. On most platforms, this is just 'ext.libraries'; + on Windows, we add the Python library (eg. python20.dll). + """ + # The python library is always needed on Windows. For MSVC, this + # is redundant, since the library is mentioned in a pragma in + # pyconfig.h that MSVC groks. The other Windows compilers all seem + # to need it mentioned explicitly, though, so that's what we do. + # Append '_d' to the python import library on debug builds. + if sys.platform == "win32" and not is_mingw(): + from .._msvccompiler import MSVCCompiler + + if not isinstance(self.compiler, MSVCCompiler): + template = "python%d%d" + if self.debug: + template = template + '_d' + pythonlib = template % ( + sys.hexversion >> 24, + (sys.hexversion >> 16) & 0xFF, + ) + # don't extend ext.libraries, it may be shared with other + # extensions, it is a reference to the original list + return ext.libraries + [pythonlib] + else: + # On Android only the main executable and LD_PRELOADs are considered + # to be RTLD_GLOBAL, all the dependencies of the main executable + # remain RTLD_LOCAL and so the shared libraries must be linked with + # libpython when python is built with a shared python library (issue + # bpo-21536). + # On Cygwin (and if required, other POSIX-like platforms based on + # Windows like MinGW) it is simply necessary that all symbols in + # shared libraries are resolved at link time. + from ..sysconfig import get_config_var + + link_libpython = False + if get_config_var('Py_ENABLE_SHARED'): + # A native build on an Android device or on Cygwin + if hasattr(sys, 'getandroidapilevel'): + link_libpython = True + elif sys.platform == 'cygwin' or is_mingw(): + link_libpython = True + elif '_PYTHON_HOST_PLATFORM' in os.environ: + # We are cross-compiling for one of the relevant platforms + if get_config_var('ANDROID_API_LEVEL') != 0: + link_libpython = True + elif get_config_var('MACHDEP') == 'cygwin': + link_libpython = True + + if link_libpython: + ldversion = get_config_var('LDVERSION') + return ext.libraries + ['python' + ldversion] + + return ext.libraries diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_py.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_py.py new file mode 100644 index 0000000000000000000000000000000000000000..d6ec7d10d2a807e02f1856fcacf488057ec69081 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_py.py @@ -0,0 +1,404 @@ +"""distutils.command.build_py + +Implements the Distutils 'build_py' command.""" + +import glob +import importlib.util +import os +import sys +from distutils._log import log +from typing import ClassVar + +from ..core import Command +from ..errors import DistutilsFileError, DistutilsOptionError +from ..util import convert_path + + +class build_py(Command): + description = "\"build\" pure Python modules (copy to build directory)" + + user_options = [ + ('build-lib=', 'd', "directory to \"build\" (copy) to"), + ('compile', 'c', "compile .py to .pyc"), + ('no-compile', None, "don't compile .py files [default]"), + ( + 'optimize=', + 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]", + ), + ('force', 'f', "forcibly build everything (ignore file timestamps)"), + ] + + boolean_options: ClassVar[list[str]] = ['compile', 'force'] + negative_opt: ClassVar[dict[str, str]] = {'no-compile': 'compile'} + + def initialize_options(self): + self.build_lib = None + self.py_modules = None + self.package = None + self.package_data = None + self.package_dir = None + self.compile = False + self.optimize = 0 + self.force = None + + def finalize_options(self) -> None: + self.set_undefined_options( + 'build', ('build_lib', 'build_lib'), ('force', 'force') + ) + + # Get the distribution options that are aliases for build_py + # options -- list of packages and list of modules. + self.packages = self.distribution.packages + self.py_modules = self.distribution.py_modules + self.package_data = self.distribution.package_data + self.package_dir = {} + if self.distribution.package_dir: + for name, path in self.distribution.package_dir.items(): + self.package_dir[name] = convert_path(path) + self.data_files = self.get_data_files() + + # Ick, copied straight from install_lib.py (fancy_getopt needs a + # type system! Hell, *everything* needs a type system!!!) + if not isinstance(self.optimize, int): + try: + self.optimize = int(self.optimize) + assert 0 <= self.optimize <= 2 + except (ValueError, AssertionError): + raise DistutilsOptionError("optimize must be 0, 1, or 2") + + def run(self) -> None: + # XXX copy_file by default preserves atime and mtime. IMHO this is + # the right thing to do, but perhaps it should be an option -- in + # particular, a site administrator might want installed files to + # reflect the time of installation rather than the last + # modification time before the installed release. + + # XXX copy_file by default preserves mode, which appears to be the + # wrong thing to do: if a file is read-only in the working + # directory, we want it to be installed read/write so that the next + # installation of the same module distribution can overwrite it + # without problems. (This might be a Unix-specific issue.) Thus + # we turn off 'preserve_mode' when copying to the build directory, + # since the build directory is supposed to be exactly what the + # installation will look like (ie. we preserve mode when + # installing). + + # Two options control which modules will be installed: 'packages' + # and 'py_modules'. The former lets us work with whole packages, not + # specifying individual modules at all; the latter is for + # specifying modules one-at-a-time. + + if self.py_modules: + self.build_modules() + if self.packages: + self.build_packages() + self.build_package_data() + + self.byte_compile(self.get_outputs(include_bytecode=False)) + + def get_data_files(self): + """Generate list of '(package,src_dir,build_dir,filenames)' tuples""" + data = [] + if not self.packages: + return data + for package in self.packages: + # Locate package source directory + src_dir = self.get_package_dir(package) + + # Compute package build directory + build_dir = os.path.join(*([self.build_lib] + package.split('.'))) + + # Length of path to strip from found files + plen = 0 + if src_dir: + plen = len(src_dir) + 1 + + # Strip directory from globbed filenames + filenames = [file[plen:] for file in self.find_data_files(package, src_dir)] + data.append((package, src_dir, build_dir, filenames)) + return data + + def find_data_files(self, package, src_dir): + """Return filenames for package's data files in 'src_dir'""" + globs = self.package_data.get('', []) + self.package_data.get(package, []) + files = [] + for pattern in globs: + # Each pattern has to be converted to a platform-specific path + filelist = glob.glob( + os.path.join(glob.escape(src_dir), convert_path(pattern)) + ) + # Files that match more than one pattern are only added once + files.extend([ + fn for fn in filelist if fn not in files and os.path.isfile(fn) + ]) + return files + + def build_package_data(self) -> None: + """Copy data files into build directory""" + for _package, src_dir, build_dir, filenames in self.data_files: + for filename in filenames: + target = os.path.join(build_dir, filename) + self.mkpath(os.path.dirname(target)) + self.copy_file( + os.path.join(src_dir, filename), target, preserve_mode=False + ) + + def get_package_dir(self, package): + """Return the directory, relative to the top of the source + distribution, where package 'package' should be found + (at least according to the 'package_dir' option, if any).""" + path = package.split('.') + + if not self.package_dir: + if path: + return os.path.join(*path) + else: + return '' + else: + tail = [] + while path: + try: + pdir = self.package_dir['.'.join(path)] + except KeyError: + tail.insert(0, path[-1]) + del path[-1] + else: + tail.insert(0, pdir) + return os.path.join(*tail) + else: + # Oops, got all the way through 'path' without finding a + # match in package_dir. If package_dir defines a directory + # for the root (nameless) package, then fallback on it; + # otherwise, we might as well have not consulted + # package_dir at all, as we just use the directory implied + # by 'tail' (which should be the same as the original value + # of 'path' at this point). + pdir = self.package_dir.get('') + if pdir is not None: + tail.insert(0, pdir) + + if tail: + return os.path.join(*tail) + else: + return '' + + def check_package(self, package, package_dir): + # Empty dir name means current directory, which we can probably + # assume exists. Also, os.path.exists and isdir don't know about + # my "empty string means current dir" convention, so we have to + # circumvent them. + if package_dir != "": + if not os.path.exists(package_dir): + raise DistutilsFileError( + f"package directory '{package_dir}' does not exist" + ) + if not os.path.isdir(package_dir): + raise DistutilsFileError( + f"supposed package directory '{package_dir}' exists, " + "but is not a directory" + ) + + # Directories without __init__.py are namespace packages (PEP 420). + if package: + init_py = os.path.join(package_dir, "__init__.py") + if os.path.isfile(init_py): + return init_py + + # Either not in a package at all (__init__.py not expected), or + # __init__.py doesn't exist -- so don't return the filename. + return None + + def check_module(self, module, module_file): + if not os.path.isfile(module_file): + log.warning("file %s (for module %s) not found", module_file, module) + return False + else: + return True + + def find_package_modules(self, package, package_dir): + self.check_package(package, package_dir) + module_files = glob.glob(os.path.join(glob.escape(package_dir), "*.py")) + modules = [] + setup_script = os.path.abspath(self.distribution.script_name) + + for f in module_files: + abs_f = os.path.abspath(f) + if abs_f != setup_script: + module = os.path.splitext(os.path.basename(f))[0] + modules.append((package, module, f)) + else: + self.debug_print(f"excluding {setup_script}") + return modules + + def find_modules(self): + """Finds individually-specified Python modules, ie. those listed by + module name in 'self.py_modules'. Returns a list of tuples (package, + module_base, filename): 'package' is a tuple of the path through + package-space to the module; 'module_base' is the bare (no + packages, no dots) module name, and 'filename' is the path to the + ".py" file (relative to the distribution root) that implements the + module. + """ + # Map package names to tuples of useful info about the package: + # (package_dir, checked) + # package_dir - the directory where we'll find source files for + # this package + # checked - true if we have checked that the package directory + # is valid (exists, contains __init__.py, ... ?) + packages = {} + + # List of (package, module, filename) tuples to return + modules = [] + + # We treat modules-in-packages almost the same as toplevel modules, + # just the "package" for a toplevel is empty (either an empty + # string or empty list, depending on context). Differences: + # - don't check for __init__.py in directory for empty package + for module in self.py_modules: + path = module.split('.') + package = '.'.join(path[0:-1]) + module_base = path[-1] + + try: + (package_dir, checked) = packages[package] + except KeyError: + package_dir = self.get_package_dir(package) + checked = False + + if not checked: + init_py = self.check_package(package, package_dir) + packages[package] = (package_dir, 1) + if init_py: + modules.append((package, "__init__", init_py)) + + # XXX perhaps we should also check for just .pyc files + # (so greedy closed-source bastards can distribute Python + # modules too) + module_file = os.path.join(package_dir, module_base + ".py") + if not self.check_module(module, module_file): + continue + + modules.append((package, module_base, module_file)) + + return modules + + def find_all_modules(self): + """Compute the list of all modules that will be built, whether + they are specified one-module-at-a-time ('self.py_modules') or + by whole packages ('self.packages'). Return a list of tuples + (package, module, module_file), just like 'find_modules()' and + 'find_package_modules()' do.""" + modules = [] + if self.py_modules: + modules.extend(self.find_modules()) + if self.packages: + for package in self.packages: + package_dir = self.get_package_dir(package) + m = self.find_package_modules(package, package_dir) + modules.extend(m) + return modules + + def get_source_files(self): + return [module[-1] for module in self.find_all_modules()] + + def get_module_outfile(self, build_dir, package, module): + outfile_path = [build_dir] + list(package) + [module + ".py"] + return os.path.join(*outfile_path) + + def get_outputs(self, include_bytecode: bool = True) -> list[str]: + modules = self.find_all_modules() + outputs = [] + for package, module, _module_file in modules: + package = package.split('.') + filename = self.get_module_outfile(self.build_lib, package, module) + outputs.append(filename) + if include_bytecode: + if self.compile: + outputs.append( + importlib.util.cache_from_source(filename, optimization='') + ) + if self.optimize > 0: + outputs.append( + importlib.util.cache_from_source( + filename, optimization=self.optimize + ) + ) + + outputs += [ + os.path.join(build_dir, filename) + for package, src_dir, build_dir, filenames in self.data_files + for filename in filenames + ] + + return outputs + + def build_module(self, module, module_file, package): + if isinstance(package, str): + package = package.split('.') + elif not isinstance(package, (list, tuple)): + raise TypeError( + "'package' must be a string (dot-separated), list, or tuple" + ) + + # Now put the module source file into the "build" area -- this is + # easy, we just copy it somewhere under self.build_lib (the build + # directory for Python source). + outfile = self.get_module_outfile(self.build_lib, package, module) + dir = os.path.dirname(outfile) + self.mkpath(dir) + return self.copy_file(module_file, outfile, preserve_mode=False) + + def build_modules(self) -> None: + modules = self.find_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 + # under self.build_lib.) + self.build_module(module, module_file, package) + + def build_packages(self) -> None: + for package in self.packages: + # Get list of (package, module, module_file) tuples based on + # scanning the package directory. 'package' is only included + # in the tuple so that 'find_modules()' and + # 'find_package_tuples()' have a consistent interface; it's + # ignored here (apart from a sanity check). Also, 'module' is + # the *unqualified* module name (ie. no dots, no package -- we + # already know its package!), and 'module_file' is the path to + # the .py file, relative to the current directory + # (ie. including 'package_dir'). + package_dir = self.get_package_dir(package) + modules = self.find_package_modules(package, package_dir) + + # Now loop over the modules we found, "building" each one (just + # copy it to self.build_lib). + for package_, module, module_file in modules: + assert package == package_ + self.build_module(module, module_file, package) + + def byte_compile(self, files) -> None: + if sys.dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + + from ..util import byte_compile + + prefix = self.build_lib + if prefix[-1] != os.sep: + prefix = prefix + os.sep + + # XXX this code is essentially the same as the 'byte_compile() + # method of the "install_lib" command, except for the determination + # of the 'prefix' string. Hmmm. + if self.compile: + byte_compile(files, optimize=0, force=self.force, prefix=prefix) + if self.optimize > 0: + byte_compile( + files, + optimize=self.optimize, + force=self.force, + prefix=prefix, + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py new file mode 100644 index 0000000000000000000000000000000000000000..0b551d11be0200b4e9c620d1af387ff7c2752096 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py @@ -0,0 +1,150 @@ +"""distutils.command.build_scripts + +Implements the Distutils 'build_scripts' command.""" + +import os +import re +import tokenize +from distutils._log import log +from stat import ST_MODE +from typing import ClassVar + +from .._modified import newer +from ..core import Command +from ..util import convert_path + +shebang_pattern = re.compile('^#!.*python[0-9.]*([ \t].*)?$') +""" +Pattern matching a Python interpreter indicated in first line of a script. +""" + +# for Setuptools compatibility +first_line_re = shebang_pattern + + +class build_scripts(Command): + description = "\"build\" scripts (copy and fixup #! line)" + + user_options: ClassVar[list[tuple[str, str, str]]] = [ + ('build-dir=', 'd', "directory to \"build\" (copy) to"), + ('force', 'f', "forcibly build everything (ignore file timestamps"), + ('executable=', 'e', "specify final destination interpreter path"), + ] + + boolean_options: ClassVar[list[str]] = ['force'] + + def initialize_options(self): + self.build_dir = None + self.scripts = None + self.force = None + self.executable = None + + def finalize_options(self): + self.set_undefined_options( + 'build', + ('build_scripts', 'build_dir'), + ('force', 'force'), + ('executable', 'executable'), + ) + self.scripts = self.distribution.scripts + + def get_source_files(self): + return self.scripts + + def run(self): + if not self.scripts: + return + self.copy_scripts() + + def copy_scripts(self): + """ + Copy each script listed in ``self.scripts``. + + If a script is marked as a Python script (first line matches + 'shebang_pattern', i.e. starts with ``#!`` and contains + "python"), then adjust in the copy the first line to refer to + the current Python interpreter. + """ + self.mkpath(self.build_dir) + outfiles = [] + updated_files = [] + for script in self.scripts: + self._copy_script(script, outfiles, updated_files) + + self._change_modes(outfiles) + + return outfiles, updated_files + + def _copy_script(self, script, outfiles, updated_files): + shebang_match = None + script = convert_path(script) + outfile = os.path.join(self.build_dir, os.path.basename(script)) + outfiles.append(outfile) + + if not self.force and not newer(script, outfile): + log.debug("not copying %s (up-to-date)", script) + return + + # Always open the file, but ignore failures in dry-run mode + # in order to attempt to copy directly. + f = tokenize.open(script) + + first_line = f.readline() + if not first_line: + self.warn(f"{script} is an empty file (skipping)") + return + + shebang_match = shebang_pattern.match(first_line) + + updated_files.append(outfile) + if shebang_match: + log.info("copying and adjusting %s -> %s", script, self.build_dir) + post_interp = shebang_match.group(1) or '' + shebang = "#!" + self.executable + post_interp + "\n" + self._validate_shebang(shebang, f.encoding) + with open(outfile, "w", encoding=f.encoding) as outf: + outf.write(shebang) + outf.writelines(f.readlines()) + if f: + f.close() + else: + if f: + f.close() + self.copy_file(script, outfile) + + def _change_modes(self, outfiles): + if os.name != 'posix': + return + + for file in outfiles: + self._change_mode(file) + + def _change_mode(self, file): + oldmode = os.stat(file)[ST_MODE] & 0o7777 + newmode = (oldmode | 0o555) & 0o7777 + if newmode != oldmode: + log.info("changing mode of %s from %o to %o", file, oldmode, newmode) + os.chmod(file, newmode) + + @staticmethod + def _validate_shebang(shebang, encoding): + # Python parser starts to read a script using UTF-8 until + # it gets a #coding:xxx cookie. The shebang has to be the + # first line of a file, the #coding:xxx cookie cannot be + # written before. So the shebang has to be encodable to + # UTF-8. + try: + shebang.encode('utf-8') + except UnicodeEncodeError: + raise ValueError(f"The shebang ({shebang!r}) is not encodable to utf-8") + + # If the script is encoded to a custom encoding (use a + # #coding:xxx cookie), the shebang has to be encodable to + # the script encoding too. + try: + shebang.encode(encoding) + except UnicodeEncodeError: + raise ValueError( + f"The shebang ({shebang!r}) is not encodable " + f"to the script encoding ({encoding})" + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/check.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/check.py new file mode 100644 index 0000000000000000000000000000000000000000..58a823dd3904cf105ed432e458a45d94948fbb4c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/check.py @@ -0,0 +1,152 @@ +"""distutils.command.check + +Implements the Distutils 'check' command. +""" + +import contextlib +from typing import ClassVar + +from ..core import Command +from ..errors import DistutilsSetupError + +with contextlib.suppress(ImportError): + import docutils.frontend + import docutils.nodes + import docutils.parsers.rst + import docutils.utils + + class SilentReporter(docutils.utils.Reporter): + def __init__( + self, + source, + report_level, + halt_level, + stream=None, + debug=False, + encoding='ascii', + error_handler='replace', + ): + self.messages = [] + super().__init__( + source, report_level, halt_level, stream, debug, encoding, error_handler + ) + + def system_message(self, level, message, *children, **kwargs): + self.messages.append((level, message, children, kwargs)) + return docutils.nodes.system_message( + message, *children, level=level, type=self.levels[level], **kwargs + ) + + +class check(Command): + """This command checks the meta-data of the package.""" + + description = "perform some checks on the package" + user_options: ClassVar[list[tuple[str, str, str]]] = [ + ('metadata', 'm', 'Verify meta-data'), + ( + 'restructuredtext', + 'r', + 'Checks if long string meta-data syntax are reStructuredText-compliant', + ), + ('strict', 's', 'Will exit with an error if a check fails'), + ] + + boolean_options: ClassVar[list[str]] = ['metadata', 'restructuredtext', 'strict'] + + def initialize_options(self): + """Sets default values for options.""" + self.restructuredtext = False + self.metadata = 1 + self.strict = False + self._warnings = 0 + + def finalize_options(self): + pass + + def warn(self, msg): + """Counts the number of warnings that occurs.""" + self._warnings += 1 + return Command.warn(self, msg) + + def run(self): + """Runs the command.""" + # perform the various tests + if self.metadata: + self.check_metadata() + if self.restructuredtext: + if 'docutils' in globals(): + try: + self.check_restructuredtext() + except TypeError as exc: + raise DistutilsSetupError(str(exc)) + elif self.strict: + raise DistutilsSetupError('The docutils package is needed.') + + # let's raise an error in strict mode, if we have at least + # one warning + if self.strict and self._warnings > 0: + raise DistutilsSetupError('Please correct your package.') + + def check_metadata(self): + """Ensures that all required elements of meta-data are supplied. + + Required fields: + name, version + + Warns if any are missing. + """ + metadata = self.distribution.metadata + + missing = [ + attr for attr in ('name', 'version') if not getattr(metadata, attr, None) + ] + + if missing: + self.warn("missing required meta-data: {}".format(', '.join(missing))) + + def check_restructuredtext(self): + """Checks if the long string fields are reST-compliant.""" + data = self.distribution.get_long_description() + for warning in self._check_rst_data(data): + line = warning[-1].get('line') + if line is None: + warning = warning[1] + else: + warning = f'{warning[1]} (line {line})' + self.warn(warning) + + def _check_rst_data(self, data): + """Returns warnings when the provided data doesn't compile.""" + # the include and csv_table directives need this to be a path + source_path = self.distribution.script_name or 'setup.py' + parser = docutils.parsers.rst.Parser() + settings = docutils.frontend.OptionParser( + components=(docutils.parsers.rst.Parser,) + ).get_default_values() + settings.tab_width = 4 + settings.pep_references = None + settings.rfc_references = None + reporter = SilentReporter( + source_path, + settings.report_level, + settings.halt_level, + stream=settings.warning_stream, + debug=settings.debug, + encoding=settings.error_encoding, + error_handler=settings.error_encoding_error_handler, + ) + + document = docutils.nodes.document(settings, reporter, source=source_path) + document.note_source(source_path, -1) + try: + parser.parse(data, document) + except (AttributeError, TypeError) as e: + reporter.messages.append(( + -1, + f'Could not finish the parsing: {e}.', + '', + {}, + )) + + return reporter.messages diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/clean.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/clean.py new file mode 100644 index 0000000000000000000000000000000000000000..fc1711be8ef51e2bcd5fe2742588f95a65bcd153 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/clean.py @@ -0,0 +1,76 @@ +"""distutils.command.clean + +Implements the Distutils 'clean' command.""" + +# contributed by Bastian Kleineidam , added 2000-03-18 + +import os +from distutils._log import log +from typing import ClassVar + +from ..core import Command +from ..dir_util import remove_tree + + +class clean(Command): + description = "clean up temporary files from 'build' command" + user_options = [ + ('build-base=', 'b', "base build directory [default: 'build.build-base']"), + ( + 'build-lib=', + None, + "build directory for all modules [default: 'build.build-lib']", + ), + ('build-temp=', 't', "temporary build directory [default: 'build.build-temp']"), + ( + 'build-scripts=', + None, + "build directory for scripts [default: 'build.build-scripts']", + ), + ('bdist-base=', None, "temporary directory for built distributions"), + ('all', 'a', "remove all build output, not just temporary by-products"), + ] + + boolean_options: ClassVar[list[str]] = ['all'] + + def initialize_options(self): + self.build_base = None + self.build_lib = None + self.build_temp = None + self.build_scripts = None + self.bdist_base = None + self.all = None + + def finalize_options(self): + self.set_undefined_options( + 'build', + ('build_base', 'build_base'), + ('build_lib', 'build_lib'), + ('build_scripts', 'build_scripts'), + ('build_temp', 'build_temp'), + ) + self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) + + def run(self): + # remove the build/temp. directory (unless it's already + # gone) + if os.path.exists(self.build_temp): + remove_tree(self.build_temp) + else: + log.debug("'%s' does not exist -- can't clean it", self.build_temp) + + if self.all: + # remove build directories + for directory in (self.build_lib, self.bdist_base, self.build_scripts): + if os.path.exists(directory): + remove_tree(directory) + else: + log.warning("'%s' does not exist -- can't clean it", directory) + + # just for the heck of it, try to remove the base build directory: + # we might have emptied it right now, but if not we don't care + try: + os.rmdir(self.build_base) + log.info("removing '%s'", self.build_base) + except OSError: + pass diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/config.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/config.py new file mode 100644 index 0000000000000000000000000000000000000000..9818418f2675125631e7d9d1ad74c30487e9dd5b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/config.py @@ -0,0 +1,348 @@ +"""distutils.command.config + +Implements the Distutils 'config' command, a (mostly) empty command class +that exists mainly to be sub-classed by specific module distributions and +applications. The idea is that while every "config" command is different, +at least they're all named the same, and users always see "config" in the +list of standard commands. Also, this is a good place to put common +configure-like tasks: "try to compile this C code", or "figure out where +this header file lives". +""" + +from __future__ import annotations + +import os +import pathlib +import re +from collections.abc import Sequence +from distutils._log import log + +from ..ccompiler import CCompiler, CompileError, LinkError, new_compiler +from ..core import Command +from ..errors import DistutilsExecError +from ..sysconfig import customize_compiler + +LANG_EXT = {"c": ".c", "c++": ".cxx"} + + +class config(Command): + description = "prepare to build" + + user_options = [ + ('compiler=', None, "specify the compiler type"), + ('cc=', None, "specify the compiler executable"), + ('include-dirs=', 'I', "list of directories to search for header files"), + ('define=', 'D', "C preprocessor macros to define"), + ('undef=', 'U', "C preprocessor macros to undefine"), + ('libraries=', 'l', "external C libraries to link with"), + ('library-dirs=', 'L', "directories to search for external C libraries"), + ('noisy', None, "show every action (compile, link, run, ...) taken"), + ( + 'dump-source', + None, + "dump generated source files before attempting to compile them", + ), + ] + + # The three standard command methods: since the "config" command + # does nothing by default, these are empty. + + def initialize_options(self): + self.compiler = None + self.cc = None + self.include_dirs = None + self.libraries = None + self.library_dirs = None + + # maximal output for now + self.noisy = 1 + self.dump_source = 1 + + # list of temporary files generated along-the-way that we have + # to clean at some point + self.temp_files = [] + + def finalize_options(self): + if self.include_dirs is None: + self.include_dirs = self.distribution.include_dirs or [] + elif isinstance(self.include_dirs, str): + self.include_dirs = self.include_dirs.split(os.pathsep) + + if self.libraries is None: + self.libraries = [] + elif isinstance(self.libraries, str): + self.libraries = [self.libraries] + + if self.library_dirs is None: + self.library_dirs = [] + elif isinstance(self.library_dirs, str): + self.library_dirs = self.library_dirs.split(os.pathsep) + + def run(self): + pass + + # Utility methods for actual "config" commands. The interfaces are + # loosely based on Autoconf macros of similar names. Sub-classes + # may use these freely. + + def _check_compiler(self): + """Check that 'self.compiler' really is a CCompiler object; + if not, make it one. + """ + if not isinstance(self.compiler, CCompiler): + self.compiler = new_compiler(compiler=self.compiler, force=True) + customize_compiler(self.compiler) + if self.include_dirs: + self.compiler.set_include_dirs(self.include_dirs) + if self.libraries: + self.compiler.set_libraries(self.libraries) + if self.library_dirs: + self.compiler.set_library_dirs(self.library_dirs) + + def _gen_temp_sourcefile(self, body, headers, lang): + filename = "_configtest" + LANG_EXT[lang] + with open(filename, "w", encoding='utf-8') as file: + if headers: + for header in headers: + file.write(f"#include <{header}>\n") + file.write("\n") + file.write(body) + if body[-1] != "\n": + file.write("\n") + return filename + + def _preprocess(self, body, headers, include_dirs, lang): + src = self._gen_temp_sourcefile(body, headers, lang) + out = "_configtest.i" + self.temp_files.extend([src, out]) + self.compiler.preprocess(src, out, include_dirs=include_dirs) + return (src, out) + + def _compile(self, body, headers, include_dirs, lang): + src = self._gen_temp_sourcefile(body, headers, lang) + if self.dump_source: + dump_file(src, f"compiling '{src}':") + (obj,) = self.compiler.object_filenames([src]) + self.temp_files.extend([src, obj]) + self.compiler.compile([src], include_dirs=include_dirs) + return (src, obj) + + def _link(self, body, headers, include_dirs, libraries, library_dirs, lang): + (src, obj) = self._compile(body, headers, include_dirs, lang) + prog = os.path.splitext(os.path.basename(src))[0] + self.compiler.link_executable( + [obj], + prog, + libraries=libraries, + library_dirs=library_dirs, + target_lang=lang, + ) + + if self.compiler.exe_extension is not None: + prog = prog + self.compiler.exe_extension + self.temp_files.append(prog) + + return (src, obj, prog) + + def _clean(self, *filenames): + if not filenames: + filenames = self.temp_files + self.temp_files = [] + log.info("removing: %s", ' '.join(filenames)) + for filename in filenames: + try: + os.remove(filename) + except OSError: + pass + + # XXX need access to the header search path and maybe default macros. + + def try_cpp(self, body=None, headers=None, include_dirs=None, lang="c"): + """Construct a source file from 'body' (a string containing lines + of C/C++ code) and 'headers' (a list of header files to include) + and run it through the preprocessor. Return true if the + preprocessor succeeded, false if there were any errors. + ('body' probably isn't of much use, but what the heck.) + """ + self._check_compiler() + ok = True + try: + self._preprocess(body, headers, include_dirs, lang) + except CompileError: + ok = False + + self._clean() + return ok + + def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, lang="c"): + """Construct a source file (just like 'try_cpp()'), run it through + the preprocessor, and return true if any line of the output matches + 'pattern'. 'pattern' should either be a compiled regex object or a + string containing a regex. If both 'body' and 'headers' are None, + preprocesses an empty file -- which can be useful to determine the + symbols the preprocessor and compiler set by default. + """ + self._check_compiler() + src, out = self._preprocess(body, headers, include_dirs, lang) + + if isinstance(pattern, str): + pattern = re.compile(pattern) + + with open(out, encoding='utf-8') as file: + match = any(pattern.search(line) for line in file) + + self._clean() + return match + + def try_compile(self, body, headers=None, include_dirs=None, lang="c"): + """Try to compile a source file built from 'body' and 'headers'. + Return true on success, false otherwise. + """ + self._check_compiler() + try: + self._compile(body, headers, include_dirs, lang) + ok = True + except CompileError: + ok = False + + log.info(ok and "success!" or "failure.") + self._clean() + return ok + + def try_link( + self, + body, + headers=None, + include_dirs=None, + libraries=None, + library_dirs=None, + lang="c", + ): + """Try to compile and link a source file, built from 'body' and + 'headers', to executable form. Return true on success, false + otherwise. + """ + self._check_compiler() + try: + self._link(body, headers, include_dirs, libraries, library_dirs, lang) + ok = True + except (CompileError, LinkError): + ok = False + + log.info(ok and "success!" or "failure.") + self._clean() + return ok + + def try_run( + self, + body, + headers=None, + include_dirs=None, + libraries=None, + library_dirs=None, + lang="c", + ): + """Try to compile, link to an executable, and run a program + built from 'body' and 'headers'. Return true on success, false + otherwise. + """ + self._check_compiler() + try: + src, obj, exe = self._link( + body, headers, include_dirs, libraries, library_dirs, lang + ) + self.spawn([exe]) + ok = True + except (CompileError, LinkError, DistutilsExecError): + ok = False + + log.info(ok and "success!" or "failure.") + self._clean() + return ok + + # -- High-level methods -------------------------------------------- + # (these are the ones that are actually likely to be useful + # when implementing a real-world config command!) + + def check_func( + self, + func, + headers=None, + include_dirs=None, + libraries=None, + library_dirs=None, + decl=False, + call=False, + ): + """Determine if function 'func' is available by constructing a + source file that refers to 'func', and compiles and links it. + If everything succeeds, returns true; otherwise returns false. + + The constructed source file starts out by including the header + files listed in 'headers'. If 'decl' is true, it then declares + 'func' (as "int func()"); you probably shouldn't supply 'headers' + and set 'decl' true in the same call, or you might get errors about + a conflicting declarations for 'func'. Finally, the constructed + 'main()' function either references 'func' or (if 'call' is true) + calls it. 'libraries' and 'library_dirs' are used when + linking. + """ + self._check_compiler() + body = [] + if decl: + body.append(f"int {func} ();") + body.append("int main () {") + if call: + body.append(f" {func}();") + else: + body.append(f" {func};") + body.append("}") + body = "\n".join(body) + "\n" + + return self.try_link(body, headers, include_dirs, libraries, library_dirs) + + def check_lib( + self, + library, + library_dirs=None, + headers=None, + include_dirs=None, + other_libraries: Sequence[str] = [], + ): + """Determine if 'library' is available to be linked against, + without actually checking that any particular symbols are provided + by it. 'headers' will be used in constructing the source file to + be compiled, but the only effect of this is to check if all the + header files listed are available. Any libraries listed in + 'other_libraries' will be included in the link, in case 'library' + has symbols that depend on other libraries. + """ + self._check_compiler() + return self.try_link( + "int main (void) { }", + headers, + include_dirs, + [library] + list(other_libraries), + library_dirs, + ) + + def check_header(self, header, include_dirs=None, library_dirs=None, lang="c"): + """Determine if the system header file named by 'header_file' + exists and can be found by the preprocessor; return true if so, + false otherwise. + """ + return self.try_cpp( + body="/* No body */", headers=[header], include_dirs=include_dirs + ) + + +def dump_file(filename, head=None): + """Dumps a file content into log.info. + + If head is not None, will be dumped before the file content. + """ + if head is None: + log.info('%s', filename) + else: + log.info(head) + log.info(pathlib.Path(filename).read_text(encoding='utf-8')) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install.py new file mode 100644 index 0000000000000000000000000000000000000000..dc17e56a8070b26f0e3d09c82250e006f1aed826 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install.py @@ -0,0 +1,805 @@ +"""distutils.command.install + +Implements the Distutils 'install' command.""" + +from __future__ import annotations + +import collections +import contextlib +import itertools +import os +import sys +import sysconfig +from distutils._log import log +from site import USER_BASE, USER_SITE +from typing import ClassVar + +from ..core import Command +from ..debug import DEBUG +from ..errors import DistutilsOptionError, DistutilsPlatformError +from ..file_util import write_file +from ..sysconfig import get_config_vars +from ..util import change_root, convert_path, get_platform, subst_vars +from . import _framework_compat as fw + +HAS_USER_SITE = True + +WINDOWS_SCHEME = { + 'purelib': '{base}/Lib/site-packages', + 'platlib': '{base}/Lib/site-packages', + 'headers': '{base}/Include/{dist_name}', + 'scripts': '{base}/Scripts', + 'data': '{base}', +} + +INSTALL_SCHEMES = { + 'posix_prefix': { + 'purelib': '{base}/lib/{implementation_lower}{py_version_short}/site-packages', + 'platlib': '{platbase}/{platlibdir}/{implementation_lower}' + '{py_version_short}/site-packages', + 'headers': '{base}/include/{implementation_lower}' + '{py_version_short}{abiflags}/{dist_name}', + 'scripts': '{base}/bin', + 'data': '{base}', + }, + 'posix_home': { + 'purelib': '{base}/lib/{implementation_lower}', + 'platlib': '{base}/{platlibdir}/{implementation_lower}', + 'headers': '{base}/include/{implementation_lower}/{dist_name}', + 'scripts': '{base}/bin', + 'data': '{base}', + }, + 'nt': WINDOWS_SCHEME, + 'pypy': { + 'purelib': '{base}/site-packages', + 'platlib': '{base}/site-packages', + 'headers': '{base}/include/{dist_name}', + 'scripts': '{base}/bin', + 'data': '{base}', + }, + 'pypy_nt': { + 'purelib': '{base}/site-packages', + 'platlib': '{base}/site-packages', + 'headers': '{base}/include/{dist_name}', + 'scripts': '{base}/Scripts', + 'data': '{base}', + }, +} + +# user site schemes +if HAS_USER_SITE: + INSTALL_SCHEMES['nt_user'] = { + 'purelib': '{usersite}', + 'platlib': '{usersite}', + 'headers': '{userbase}/{implementation}{py_version_nodot_plat}' + '/Include/{dist_name}', + 'scripts': '{userbase}/{implementation}{py_version_nodot_plat}/Scripts', + 'data': '{userbase}', + } + + INSTALL_SCHEMES['posix_user'] = { + 'purelib': '{usersite}', + 'platlib': '{usersite}', + 'headers': '{userbase}/include/{implementation_lower}' + '{py_version_short}{abiflags}/{dist_name}', + 'scripts': '{userbase}/bin', + 'data': '{userbase}', + } + + +INSTALL_SCHEMES.update(fw.schemes) + + +# The keys to an installation scheme; if any new types of files are to be +# installed, be sure to add an entry to every installation scheme above, +# and to SCHEME_KEYS here. +SCHEME_KEYS = ('purelib', 'platlib', 'headers', 'scripts', 'data') + + +def _load_sysconfig_schemes(): + with contextlib.suppress(AttributeError): + return { + scheme: sysconfig.get_paths(scheme, expand=False) + for scheme in sysconfig.get_scheme_names() + } + + +def _load_schemes(): + """ + Extend default schemes with schemes from sysconfig. + """ + + sysconfig_schemes = _load_sysconfig_schemes() or {} + + return { + scheme: { + **INSTALL_SCHEMES.get(scheme, {}), + **sysconfig_schemes.get(scheme, {}), + } + for scheme in set(itertools.chain(INSTALL_SCHEMES, sysconfig_schemes)) + } + + +def _get_implementation(): + if hasattr(sys, 'pypy_version_info'): + return 'PyPy' + else: + return 'Python' + + +def _select_scheme(ob, name): + scheme = _inject_headers(name, _load_scheme(_resolve_scheme(name))) + vars(ob).update(_remove_set(ob, _scheme_attrs(scheme))) + + +def _remove_set(ob, attrs): + """ + Include only attrs that are None in ob. + """ + return {key: value for key, value in attrs.items() if getattr(ob, key) is None} + + +def _resolve_scheme(name): + os_name, sep, key = name.partition('_') + try: + resolved = sysconfig.get_preferred_scheme(key) + except Exception: + resolved = fw.scheme(name) + return resolved + + +def _load_scheme(name): + return _load_schemes()[name] + + +def _inject_headers(name, scheme): + """ + Given a scheme name and the resolved scheme, + if the scheme does not include headers, resolve + the fallback scheme for the name and use headers + from it. pypa/distutils#88 + """ + # Bypass the preferred scheme, which may not + # have defined headers. + fallback = _load_scheme(name) + scheme.setdefault('headers', fallback['headers']) + return scheme + + +def _scheme_attrs(scheme): + """Resolve install directories by applying the install schemes.""" + return {f'install_{key}': scheme[key] for key in SCHEME_KEYS} + + +class install(Command): + description = "install everything from build directory" + + user_options = [ + # Select installation scheme and set base director(y|ies) + ('prefix=', None, "installation prefix"), + ('exec-prefix=', None, "(Unix only) prefix for platform-specific files"), + ('home=', None, "(Unix only) home directory to install under"), + # Or, just set the base director(y|ies) + ( + 'install-base=', + None, + "base installation directory (instead of --prefix or --home)", + ), + ( + 'install-platbase=', + None, + "base installation directory for platform-specific files (instead of --exec-prefix or --home)", + ), + ('root=', None, "install everything relative to this alternate root directory"), + # Or, explicitly set the installation scheme + ( + 'install-purelib=', + None, + "installation directory for pure Python module distributions", + ), + ( + 'install-platlib=', + None, + "installation directory for non-pure module distributions", + ), + ( + 'install-lib=', + None, + "installation directory for all module distributions (overrides --install-purelib and --install-platlib)", + ), + ('install-headers=', None, "installation directory for C/C++ headers"), + ('install-scripts=', None, "installation directory for Python scripts"), + ('install-data=', None, "installation directory for data files"), + # Byte-compilation options -- see install_lib.py for details, as + # these are duplicated from there (but only install_lib does + # anything with them). + ('compile', 'c', "compile .py to .pyc [default]"), + ('no-compile', None, "don't compile .py files"), + ( + 'optimize=', + 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]", + ), + # Miscellaneous control options + ('force', 'f', "force installation (overwrite any existing files)"), + ('skip-build', None, "skip rebuilding everything (for testing/debugging)"), + # Where to install documentation (eventually!) + # ('doc-format=', None, "format of documentation to generate"), + # ('install-man=', None, "directory for Unix man pages"), + # ('install-html=', None, "directory for HTML documentation"), + # ('install-info=', None, "directory for GNU info files"), + ('record=', None, "filename in which to record list of installed files"), + ] + + boolean_options: ClassVar[list[str]] = ['compile', 'force', 'skip-build'] + + if HAS_USER_SITE: + user_options.append(( + 'user', + None, + f"install in user site-package '{USER_SITE}'", + )) + boolean_options.append('user') + + negative_opt: ClassVar[dict[str, str]] = {'no-compile': 'compile'} + + def initialize_options(self) -> None: + """Initializes options.""" + # High-level options: these select both an installation base + # and scheme. + self.prefix: str | None = None + self.exec_prefix: str | None = None + self.home: str | None = None + self.user = False + + # These select only the installation base; it's up to the user to + # specify the installation scheme (currently, that means supplying + # the --install-{platlib,purelib,scripts,data} options). + self.install_base = None + self.install_platbase = None + self.root: str | None = None + + # These options are the actual installation directories; if not + # supplied by the user, they are filled in using the installation + # scheme implied by prefix/exec-prefix/home and the contents of + # that installation scheme. + self.install_purelib = None # for pure module distributions + self.install_platlib = None # non-pure (dists w/ extensions) + self.install_headers = None # for C/C++ headers + self.install_lib: str | None = None # set to either purelib or platlib + self.install_scripts = None + self.install_data = None + self.install_userbase = USER_BASE + self.install_usersite = USER_SITE + + self.compile = None + self.optimize = None + + # Deprecated + # These two are for putting non-packagized distributions into their + # own directory and creating a .pth file if it makes sense. + # 'extra_path' comes from the setup file; 'install_path_file' can + # be turned off if it makes no sense to install a .pth file. (But + # better to install it uselessly than to guess wrong and not + # install it when it's necessary and would be used!) Currently, + # 'install_path_file' is always true unless some outsider meddles + # with it. + self.extra_path = None + self.install_path_file = True + + # 'force' forces installation, even if target files are not + # out-of-date. 'skip_build' skips running the "build" command, + # handy if you know it's not necessary. 'warn_dir' (which is *not* + # a user option, it's just there so the bdist_* commands can turn + # it off) determines whether we warn about installing to a + # directory not in sys.path. + self.force = False + self.skip_build = False + self.warn_dir = True + + # These are only here as a conduit from the 'build' command to the + # 'install_*' commands that do the real work. ('build_base' isn't + # actually used anywhere, but it might be useful in future.) They + # are not user options, because if the user told the install + # command where the build directory is, that wouldn't affect the + # build command. + self.build_base = None + self.build_lib = None + + # Not defined yet because we don't know anything about + # documentation yet. + # self.install_man = None + # self.install_html = None + # self.install_info = None + + self.record = None + + # -- Option finalizing methods ------------------------------------- + # (This is rather more involved than for most commands, + # because this is where the policy for installing third- + # party Python modules on various platforms given a wide + # array of user input is decided. Yes, it's quite complex!) + + def finalize_options(self) -> None: # noqa: C901 + """Finalizes options.""" + # This method (and its helpers, like 'finalize_unix()', + # 'finalize_other()', and 'select_scheme()') is where the default + # installation directories for modules, extension modules, and + # anything else we care to install from a Python module + # distribution. Thus, this code makes a pretty important policy + # statement about how third-party stuff is added to a Python + # installation! Note that the actual work of installation is done + # by the relatively simple 'install_*' commands; they just take + # their orders from the installation directory options determined + # here. + + # Check for errors/inconsistencies in the options; first, stuff + # that's wrong on any platform. + + if (self.prefix or self.exec_prefix or self.home) and ( + self.install_base or self.install_platbase + ): + raise DistutilsOptionError( + "must supply either prefix/exec-prefix/home or install-base/install-platbase -- not both" + ) + + if self.home and (self.prefix or self.exec_prefix): + raise DistutilsOptionError( + "must supply either home or prefix/exec-prefix -- not both" + ) + + if self.user and ( + self.prefix + or self.exec_prefix + or self.home + or self.install_base + or self.install_platbase + ): + raise DistutilsOptionError( + "can't combine user with prefix, " + "exec_prefix/home, or install_(plat)base" + ) + + # Next, stuff that's wrong (or dubious) only on certain platforms. + if os.name != "posix": + if self.exec_prefix: + self.warn("exec-prefix option ignored on this platform") + self.exec_prefix = None + + # Now the interesting logic -- so interesting that we farm it out + # to other methods. The goal of these methods is to set the final + # values for the install_{lib,scripts,data,...} options, using as + # input a heady brew of prefix, exec_prefix, home, install_base, + # install_platbase, user-supplied versions of + # install_{purelib,platlib,lib,scripts,data,...}, and the + # install schemes. Phew! + + self.dump_dirs("pre-finalize_{unix,other}") + + if os.name == 'posix': + self.finalize_unix() + else: + self.finalize_other() + + self.dump_dirs("post-finalize_{unix,other}()") + + # Expand configuration variables, tilde, etc. in self.install_base + # and self.install_platbase -- that way, we can use $base or + # $platbase in the other installation directories and not worry + # about needing recursive variable expansion (shudder). + + py_version = sys.version.split()[0] + (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix') + try: + abiflags = sys.abiflags + except AttributeError: + # sys.abiflags may not be defined on all platforms. + abiflags = '' + local_vars = { + 'dist_name': self.distribution.get_name(), + 'dist_version': self.distribution.get_version(), + 'dist_fullname': self.distribution.get_fullname(), + 'py_version': py_version, + 'py_version_short': f'{sys.version_info.major}.{sys.version_info.minor}', + 'py_version_nodot': f'{sys.version_info.major}{sys.version_info.minor}', + 'sys_prefix': prefix, + 'prefix': prefix, + 'sys_exec_prefix': exec_prefix, + 'exec_prefix': exec_prefix, + 'abiflags': abiflags, + 'platlibdir': getattr(sys, 'platlibdir', 'lib'), + 'implementation_lower': _get_implementation().lower(), + 'implementation': _get_implementation(), + } + + # vars for compatibility on older Pythons + compat_vars = dict( + # Python 3.9 and earlier + py_version_nodot_plat=getattr(sys, 'winver', '').replace('.', ''), + ) + + if HAS_USER_SITE: + local_vars['userbase'] = self.install_userbase + local_vars['usersite'] = self.install_usersite + + self.config_vars = collections.ChainMap( + local_vars, + sysconfig.get_config_vars(), + compat_vars, + fw.vars(), + ) + + self.expand_basedirs() + + self.dump_dirs("post-expand_basedirs()") + + # Now define config vars for the base directories so we can expand + # everything else. + local_vars['base'] = self.install_base + local_vars['platbase'] = self.install_platbase + + if DEBUG: + from pprint import pprint + + print("config vars:") + pprint(dict(self.config_vars)) + + # Expand "~" and configuration variables in the installation + # directories. + self.expand_dirs() + + self.dump_dirs("post-expand_dirs()") + + # Create directories in the home dir: + if self.user: + self.create_home_path() + + # Pick the actual directory to install all modules to: either + # install_purelib or install_platlib, depending on whether this + # module distribution is pure or not. Of course, if the user + # already specified install_lib, use their selection. + if self.install_lib is None: + if self.distribution.has_ext_modules(): # has extensions: non-pure + self.install_lib = self.install_platlib + else: + self.install_lib = self.install_purelib + + # Convert directories from Unix /-separated syntax to the local + # convention. + self.convert_paths( + 'lib', + 'purelib', + 'platlib', + 'scripts', + 'data', + 'headers', + 'userbase', + 'usersite', + ) + + # Deprecated + # Well, we're not actually fully completely finalized yet: we still + # have to deal with 'extra_path', which is the hack for allowing + # non-packagized module distributions (hello, Numerical Python!) to + # get their own directories. + self.handle_extra_path() + self.install_libbase = self.install_lib # needed for .pth file + self.install_lib = os.path.join(self.install_lib, self.extra_dirs) + + # If a new root directory was supplied, make all the installation + # dirs relative to it. + if self.root is not None: + self.change_roots( + 'libbase', 'lib', 'purelib', 'platlib', 'scripts', 'data', 'headers' + ) + + self.dump_dirs("after prepending root") + + # Find out the build directories, ie. where to install from. + self.set_undefined_options( + 'build', ('build_base', 'build_base'), ('build_lib', 'build_lib') + ) + + # Punt on doc directories for now -- after all, we're punting on + # documentation completely! + + def dump_dirs(self, msg) -> None: + """Dumps the list of user options.""" + if not DEBUG: + return + from ..fancy_getopt import longopt_xlate + + log.debug(msg + ":") + for opt in self.user_options: + opt_name = opt[0] + if opt_name[-1] == "=": + opt_name = opt_name[0:-1] + if opt_name in self.negative_opt: + opt_name = self.negative_opt[opt_name] + opt_name = opt_name.translate(longopt_xlate) + val = not getattr(self, opt_name) + else: + opt_name = opt_name.translate(longopt_xlate) + val = getattr(self, opt_name) + log.debug(" %s: %s", opt_name, val) + + def finalize_unix(self) -> None: + """Finalizes options for posix platforms.""" + if self.install_base is not None or self.install_platbase is not None: + incomplete_scheme = ( + ( + self.install_lib is None + and self.install_purelib is None + and self.install_platlib is None + ) + or self.install_headers is None + or self.install_scripts is None + or self.install_data is None + ) + if incomplete_scheme: + raise DistutilsOptionError( + "install-base or install-platbase supplied, but " + "installation scheme is incomplete" + ) + return + + if self.user: + if self.install_userbase is None: + raise DistutilsPlatformError("User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + self.select_scheme("posix_user") + elif self.home is not None: + self.install_base = self.install_platbase = self.home + self.select_scheme("posix_home") + else: + if self.prefix is None: + if self.exec_prefix is not None: + raise DistutilsOptionError( + "must not supply exec-prefix without prefix" + ) + + # Allow Fedora to add components to the prefix + _prefix_addition = getattr(sysconfig, '_prefix_addition', "") + + self.prefix = os.path.normpath(sys.prefix) + _prefix_addition + self.exec_prefix = os.path.normpath(sys.exec_prefix) + _prefix_addition + + else: + if self.exec_prefix is None: + self.exec_prefix = self.prefix + + self.install_base = self.prefix + self.install_platbase = self.exec_prefix + self.select_scheme("posix_prefix") + + def finalize_other(self) -> None: + """Finalizes options for non-posix platforms""" + if self.user: + if self.install_userbase is None: + raise DistutilsPlatformError("User base directory is not specified") + self.install_base = self.install_platbase = self.install_userbase + self.select_scheme(os.name + "_user") + elif self.home is not None: + self.install_base = self.install_platbase = self.home + self.select_scheme("posix_home") + else: + if self.prefix is None: + self.prefix = os.path.normpath(sys.prefix) + + self.install_base = self.install_platbase = self.prefix + try: + self.select_scheme(os.name) + except KeyError: + raise DistutilsPlatformError( + f"I don't know how to install stuff on '{os.name}'" + ) + + def select_scheme(self, name) -> None: + _select_scheme(self, name) + + def _expand_attrs(self, attrs): + for attr in attrs: + val = getattr(self, attr) + if val is not None: + if os.name in ('posix', 'nt'): + val = os.path.expanduser(val) + val = subst_vars(val, self.config_vars) + setattr(self, attr, val) + + def expand_basedirs(self) -> None: + """Calls `os.path.expanduser` on install_base, install_platbase and + root.""" + self._expand_attrs(['install_base', 'install_platbase', 'root']) + + def expand_dirs(self) -> None: + """Calls `os.path.expanduser` on install dirs.""" + self._expand_attrs([ + 'install_purelib', + 'install_platlib', + 'install_lib', + 'install_headers', + 'install_scripts', + 'install_data', + ]) + + def convert_paths(self, *names) -> None: + """Call `convert_path` over `names`.""" + for name in names: + attr = "install_" + name + setattr(self, attr, convert_path(getattr(self, attr))) + + def handle_extra_path(self) -> None: + """Set `path_file` and `extra_dirs` using `extra_path`.""" + if self.extra_path is None: + self.extra_path = self.distribution.extra_path + + if self.extra_path is not None: + log.warning( + "Distribution option extra_path is deprecated. " + "See issue27919 for details." + ) + if isinstance(self.extra_path, str): + self.extra_path = self.extra_path.split(',') + + if len(self.extra_path) == 1: + path_file = extra_dirs = self.extra_path[0] + elif len(self.extra_path) == 2: + path_file, extra_dirs = self.extra_path + else: + raise DistutilsOptionError( + "'extra_path' option must be a list, tuple, or " + "comma-separated string with 1 or 2 elements" + ) + + # convert to local form in case Unix notation used (as it + # should be in setup scripts) + extra_dirs = convert_path(extra_dirs) + else: + path_file = None + extra_dirs = '' + + # XXX should we warn if path_file and not extra_dirs? (in which + # case the path file would be harmless but pointless) + self.path_file = path_file + self.extra_dirs = extra_dirs + + def change_roots(self, *names) -> None: + """Change the install directories pointed by name using root.""" + for name in names: + attr = "install_" + name + setattr(self, attr, change_root(self.root, getattr(self, attr))) + + def create_home_path(self) -> None: + """Create directories under ~.""" + if not self.user: + return + home = convert_path(os.path.expanduser("~")) + for path in self.config_vars.values(): + if str(path).startswith(home) and not os.path.isdir(path): + self.debug_print(f"os.makedirs('{path}', 0o700)") + os.makedirs(path, 0o700) + + # -- Command execution methods ------------------------------------- + + def run(self): + """Runs the command.""" + # Obviously have to build before we can install + if not self.skip_build: + self.run_command('build') + # If we built for any other platform, we can't install. + build_plat = self.distribution.get_command_obj('build').plat_name + # check warn_dir - it is a clue that the 'install' is happening + # internally, and not to sys.path, so we don't check the platform + # matches what we are running. + if self.warn_dir and build_plat != get_platform(): + raise DistutilsPlatformError("Can't install when cross-compiling") + + # Run all sub-commands (at least those that need to be run) + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + + if self.path_file: + self.create_path_file() + + # write list of installed files, if requested. + if self.record: + outputs = self.get_outputs() + if self.root: # strip any package prefix + root_len = len(self.root) + for counter in range(len(outputs)): + outputs[counter] = outputs[counter][root_len:] + self.execute( + write_file, + (self.record, outputs), + f"writing list of installed files to '{self.record}'", + ) + + sys_path = map(os.path.normpath, sys.path) + sys_path = map(os.path.normcase, sys_path) + install_lib = os.path.normcase(os.path.normpath(self.install_lib)) + if ( + self.warn_dir + and not (self.path_file and self.install_path_file) + and install_lib not in sys_path + ): + log.debug( + ( + "modules installed to '%s', which is not in " + "Python's module search path (sys.path) -- " + "you'll have to change the search path yourself" + ), + self.install_lib, + ) + + def create_path_file(self): + """Creates the .pth file""" + filename = os.path.join(self.install_libbase, self.path_file + ".pth") + if self.install_path_file: + self.execute( + write_file, (filename, [self.extra_dirs]), f"creating {filename}" + ) + else: + self.warn(f"path file '{filename}' not created") + + # -- Reporting methods --------------------------------------------- + + def get_outputs(self): + """Assembles the outputs of all the sub-commands.""" + outputs = [] + for cmd_name in self.get_sub_commands(): + cmd = self.get_finalized_command(cmd_name) + # Add the contents of cmd.get_outputs(), ensuring + # that outputs doesn't contain duplicate entries + for filename in cmd.get_outputs(): + if filename not in outputs: + outputs.append(filename) + + if self.path_file and self.install_path_file: + outputs.append(os.path.join(self.install_libbase, self.path_file + ".pth")) + + return outputs + + def get_inputs(self): + """Returns the inputs of all the sub-commands""" + # XXX gee, this looks familiar ;-( + inputs = [] + for cmd_name in self.get_sub_commands(): + cmd = self.get_finalized_command(cmd_name) + inputs.extend(cmd.get_inputs()) + + return inputs + + # -- Predicates for sub-command list ------------------------------- + + def has_lib(self): + """Returns true if the current distribution has any Python + modules to install.""" + return ( + self.distribution.has_pure_modules() or self.distribution.has_ext_modules() + ) + + def has_headers(self): + """Returns true if the current distribution has any headers to + install.""" + return self.distribution.has_headers() + + def has_scripts(self): + """Returns true if the current distribution has any scripts to. + install.""" + return self.distribution.has_scripts() + + def has_data(self): + """Returns true if the current distribution has any data to. + install.""" + return self.distribution.has_data_files() + + # 'sub_commands': a list of commands this command might have to run to + # get its work done. See cmd.py for more info. + sub_commands = [ + ('install_lib', has_lib), + ('install_headers', has_headers), + ('install_scripts', has_scripts), + ('install_data', has_data), + ('install_egg_info', lambda self: True), + ] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_data.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_data.py new file mode 100644 index 0000000000000000000000000000000000000000..4ad186e8ec61b92967ea1c12cdca51d00e82dd15 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_data.py @@ -0,0 +1,94 @@ +"""distutils.command.install_data + +Implements the Distutils 'install_data' command, for installing +platform-independent data files.""" + +# contributed by Bastian Kleineidam + +from __future__ import annotations + +import functools +import os +from collections.abc import Iterable +from typing import ClassVar + +from ..core import Command +from ..util import change_root, convert_path + + +class install_data(Command): + description = "install data files" + + user_options = [ + ( + 'install-dir=', + 'd', + "base directory for installing data files [default: installation base dir]", + ), + ('root=', None, "install everything relative to this alternate root directory"), + ('force', 'f', "force installation (overwrite existing files)"), + ] + + boolean_options: ClassVar[list[str]] = ['force'] + + def initialize_options(self): + self.install_dir = None + self.outfiles = [] + self.root = None + self.force = False + self.data_files = self.distribution.data_files + self.warn_dir = True + + def finalize_options(self) -> None: + self.set_undefined_options( + 'install', + ('install_data', 'install_dir'), + ('root', 'root'), + ('force', 'force'), + ) + + def run(self) -> None: + self.mkpath(self.install_dir) + for f in self.data_files: + self._copy(f) + + @functools.singledispatchmethod + def _copy(self, f: tuple[str | os.PathLike, Iterable[str | os.PathLike]]): + # it's a tuple with path to install to and a list of files + dir = convert_path(f[0]) + if not os.path.isabs(dir): + dir = os.path.join(self.install_dir, dir) + elif self.root: + dir = change_root(self.root, dir) + self.mkpath(dir) + + if f[1] == []: + # If there are no files listed, the user must be + # trying to create an empty directory, so add the + # directory to the list of output files. + self.outfiles.append(dir) + else: + # Copy files, adding them to the list of output files. + for data in f[1]: + data = convert_path(data) + (out, _) = self.copy_file(data, dir) + self.outfiles.append(out) + + @_copy.register(str) + @_copy.register(os.PathLike) + def _(self, f: str | os.PathLike): + # it's a simple file, so copy it + f = convert_path(f) + if self.warn_dir: + self.warn( + "setup script did not provide a directory for " + f"'{f}' -- installing right in '{self.install_dir}'" + ) + (out, _) = self.copy_file(f, self.install_dir) + self.outfiles.append(out) + + def get_inputs(self): + return self.data_files or [] + + def get_outputs(self): + return self.outfiles diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_egg_info.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_egg_info.py new file mode 100644 index 0000000000000000000000000000000000000000..6840b34ec2b5e2a3f9514cda5e940bc6cd90c731 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_egg_info.py @@ -0,0 +1,90 @@ +""" +distutils.command.install_egg_info + +Implements the Distutils 'install_egg_info' command, for installing +a package's PKG-INFO metadata. +""" + +import os +import re +import sys +from typing import ClassVar + +from .. import dir_util +from .._log import log +from ..cmd import Command + + +class install_egg_info(Command): + """Install an .egg-info file for the package""" + + description = "Install package's PKG-INFO metadata as an .egg-info file" + user_options: ClassVar[list[tuple[str, str, str]]] = [ + ('install-dir=', 'd', "directory to install to"), + ] + + def initialize_options(self): + self.install_dir = None + + @property + def basename(self): + """ + Allow basename to be overridden by child class. + Ref pypa/distutils#2. + """ + name = to_filename(safe_name(self.distribution.get_name())) + version = to_filename(safe_version(self.distribution.get_version())) + return f"{name}-{version}-py{sys.version_info.major}.{sys.version_info.minor}.egg-info" + + def finalize_options(self): + self.set_undefined_options('install_lib', ('install_dir', 'install_dir')) + self.target = os.path.join(self.install_dir, self.basename) + self.outputs = [self.target] + + def run(self): + target = self.target + if os.path.isdir(target) and not os.path.islink(target): + dir_util.remove_tree(target) + elif os.path.exists(target): + self.execute(os.unlink, (self.target,), "Removing " + target) + elif not os.path.isdir(self.install_dir): + self.execute( + os.makedirs, (self.install_dir,), "Creating " + self.install_dir + ) + log.info("Writing %s", target) + with open(target, 'w', encoding='UTF-8') as f: + self.distribution.metadata.write_pkg_file(f) + + def get_outputs(self): + return self.outputs + + +# The following routines are taken from setuptools' pkg_resources module and +# can be replaced by importing them from pkg_resources once it is included +# in the stdlib. + + +def safe_name(name): + """Convert an arbitrary string to a standard distribution name + + Any runs of non-alphanumeric/. characters are replaced with a single '-'. + """ + return re.sub('[^A-Za-z0-9.]+', '-', name) + + +def safe_version(version): + """Convert an arbitrary string to a standard version string + + Spaces become dots, and all other non-alphanumeric characters become + dashes, with runs of multiple dashes condensed to a single dash. + """ + version = version.replace(' ', '.') + return re.sub('[^A-Za-z0-9.]+', '-', version) + + +def to_filename(name): + """Convert a project or version name to its filename-escaped form + + Any '-' characters are currently replaced with '_'. + """ + return name.replace('-', '_') diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_headers.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_headers.py new file mode 100644 index 0000000000000000000000000000000000000000..97af1371efcc73423e9b91d7b3ced684ff936377 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_headers.py @@ -0,0 +1,46 @@ +"""distutils.command.install_headers + +Implements the Distutils 'install_headers' command, to install C/C++ header +files to the Python include directory.""" + +from typing import ClassVar + +from ..core import Command + + +# XXX force is never used +class install_headers(Command): + description = "install C/C++ header files" + + user_options: ClassVar[list[tuple[str, str, str]]] = [ + ('install-dir=', 'd', "directory to install header files to"), + ('force', 'f', "force installation (overwrite existing files)"), + ] + + boolean_options: ClassVar[list[str]] = ['force'] + + def initialize_options(self): + self.install_dir = None + self.force = False + 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 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_lib.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_lib.py new file mode 100644 index 0000000000000000000000000000000000000000..9909a61762bd658f837057f07fa1d1200fe4e6ac --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_lib.py @@ -0,0 +1,236 @@ +"""distutils.command.install_lib + +Implements the Distutils 'install_lib' command +(install all Python modules).""" + +from __future__ import annotations + +import importlib.util +import os +import sys +from typing import Any, ClassVar + +from ..core import Command +from ..errors import DistutilsOptionError + +# Extension for Python source files. +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 + # possible scenarios: + # 1) no compilation at all (--no-compile --no-optimize) + # 2) compile .pyc only (--compile --no-optimize; default) + # 3) compile .pyc and "opt-1" .pyc (--compile --optimize) + # 4) compile "opt-1" .pyc only (--no-compile --optimize) + # 5) compile .pyc and "opt-2" .pyc (--compile --optimize-more) + # 6) compile "opt-2" .pyc only (--no-compile --optimize-more) + # + # The UI for this is two options, 'compile' and 'optimize'. + # 'compile' is strictly boolean, and only decides whether to + # generate .pyc files. 'optimize' is three-way (0, 1, or 2), and + # decides both whether to generate .pyc files and what level of + # optimization to use. + + user_options = [ + ('install-dir=', 'd', "directory to install to"), + ('build-dir=', 'b', "build directory (where to install from)"), + ('force', 'f', "force installation (overwrite existing files)"), + ('compile', 'c', "compile .py to .pyc [default]"), + ('no-compile', None, "don't compile .py files"), + ( + 'optimize=', + 'O', + "also compile with optimization: -O1 for \"python -O\", " + "-O2 for \"python -OO\", and -O0 to disable [default: -O0]", + ), + ('skip-build', None, "skip the build steps"), + ] + + boolean_options: ClassVar[list[str]] = ['force', 'compile', 'skip-build'] + negative_opt: ClassVar[dict[str, str]] = {'no-compile': 'compile'} + + def initialize_options(self): + # let the 'install' command dictate our installation directory + self.install_dir = None + self.build_dir = None + self.force = False + self.compile = None + self.optimize = None + self.skip_build = None + + def finalize_options(self) -> None: + # Get all the information we need to install pure Python modules + # from the umbrella 'install' command -- build (source) directory, + # install (target) directory, and whether to compile .py files. + self.set_undefined_options( + 'install', + ('build_lib', 'build_dir'), + ('install_lib', 'install_dir'), + ('force', 'force'), + ('compile', 'compile'), + ('optimize', 'optimize'), + ('skip_build', 'skip_build'), + ) + + if self.compile is None: + self.compile = True + if self.optimize is None: + self.optimize = False + + if not isinstance(self.optimize, int): + try: + self.optimize = int(self.optimize) + except ValueError: + pass + if self.optimize not in (0, 1, 2): + raise DistutilsOptionError("optimize must be 0, 1, or 2") + + def run(self) -> None: + # Make sure we have built everything we need first + self.build() + + # Install everything: simply dump the entire contents of the build + # directory to the installation directory (that's the beauty of + # having a build directory!) + outfiles = self.install() + + # (Optionally) compile .py to .pyc + if outfiles is not None and self.distribution.has_pure_modules(): + self.byte_compile(outfiles) + + # -- Top-level worker functions ------------------------------------ + # (called from 'run()') + + def build(self) -> None: + if not self.skip_build: + if self.distribution.has_pure_modules(): + self.run_command('build_py') + if self.distribution.has_ext_modules(): + self.run_command('build_ext') + + # Any: https://typing.readthedocs.io/en/latest/guides/writing_stubs.html#the-any-trick + def install(self) -> list[str] | Any: + if os.path.isdir(self.build_dir): + outfiles = self.copy_tree(self.build_dir, self.install_dir) + else: + self.warn( + f"'{self.build_dir}' does not exist -- no Python modules to install" + ) + return + return outfiles + + def byte_compile(self, files) -> None: + if sys.dont_write_bytecode: + self.warn('byte-compiling is disabled, skipping.') + return + + from ..util import byte_compile + + # Get the "--root" directory supplied to the "install" command, + # and use it as a prefix to strip off the purported filename + # encoded in bytecode files. This is far from complete, but it + # should at least generate usable bytecode in RPM distributions. + install_root = self.get_finalized_command('install').root + + if self.compile: + byte_compile( + files, + optimize=0, + force=self.force, + prefix=install_root, + ) + if self.optimize > 0: + byte_compile( + files, + optimize=self.optimize, + force=self.force, + prefix=install_root, + verbose=self.verbose, + ) + + # -- Utility methods ----------------------------------------------- + + def _mutate_outputs(self, has_any, build_cmd, cmd_option, output_dir): + if not has_any: + return [] + + build_cmd = self.get_finalized_command(build_cmd) + build_files = build_cmd.get_outputs() + build_dir = getattr(build_cmd, cmd_option) + + prefix_len = len(build_dir) + len(os.sep) + outputs = [os.path.join(output_dir, file[prefix_len:]) for file in build_files] + + return outputs + + def _bytecode_filenames(self, py_filenames): + bytecode_files = [] + for py_file in py_filenames: + # Since build_py handles package data installation, the + # list of outputs can contain more than just .py files. + # Make sure we only report bytecode for the .py files. + ext = os.path.splitext(os.path.normcase(py_file))[1] + if ext != PYTHON_SOURCE_EXTENSION: + continue + if self.compile: + bytecode_files.append( + importlib.util.cache_from_source(py_file, optimization='') + ) + if self.optimize > 0: + bytecode_files.append( + importlib.util.cache_from_source( + py_file, optimization=self.optimize + ) + ) + + return bytecode_files + + # -- External interface -------------------------------------------- + # (called by outsiders) + + def get_outputs(self): + """Return the list of files that would be installed if this command + were actually run. Not affected by the "dry-run" flag or whether + modules have actually been built yet. + """ + pure_outputs = self._mutate_outputs( + self.distribution.has_pure_modules(), + 'build_py', + 'build_lib', + self.install_dir, + ) + if self.compile: + bytecode_outputs = self._bytecode_filenames(pure_outputs) + else: + bytecode_outputs = [] + + ext_outputs = self._mutate_outputs( + self.distribution.has_ext_modules(), + 'build_ext', + 'build_lib', + self.install_dir, + ) + + return pure_outputs + bytecode_outputs + ext_outputs + + def get_inputs(self): + """Get the list of files that are input to this command, ie. the + files that get installed as they are named in the build tree. + The files in this list correspond one-to-one to the output + filenames returned by 'get_outputs()'. + """ + inputs = [] + + if self.distribution.has_pure_modules(): + build_py = self.get_finalized_command('build_py') + inputs.extend(build_py.get_outputs()) + + if self.distribution.has_ext_modules(): + build_ext = self.get_finalized_command('build_ext') + inputs.extend(build_ext.get_outputs()) + + return inputs diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_scripts.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_scripts.py new file mode 100644 index 0000000000000000000000000000000000000000..33d235d976e39db426aaff628b8b9bb5b832dcb6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/install_scripts.py @@ -0,0 +1,59 @@ +"""distutils.command.install_scripts + +Implements the Distutils 'install_scripts' command, for installing +Python scripts.""" + +# contributed by Bastian Kleineidam + +import os +from distutils._log import log +from stat import ST_MODE +from typing import ClassVar + +from ..core import Command + + +class install_scripts(Command): + description = "install scripts (Python or otherwise)" + + user_options = [ + ('install-dir=', 'd', "directory to install scripts to"), + ('build-dir=', 'b', "build directory (where to install from)"), + ('force', 'f', "force installation (overwrite existing files)"), + ('skip-build', None, "skip the build steps"), + ] + + boolean_options: ClassVar[list[str]] = ['force', 'skip-build'] + + def initialize_options(self): + self.install_dir = None + self.force = False + self.build_dir = None + self.skip_build = None + + def finalize_options(self) -> None: + self.set_undefined_options('build', ('build_scripts', 'build_dir')) + self.set_undefined_options( + 'install', + ('install_scripts', 'install_dir'), + ('force', 'force'), + ('skip_build', 'skip_build'), + ) + + def run(self) -> None: + if not self.skip_build: + self.run_command('build_scripts') + self.outfiles = self.copy_tree(self.build_dir, self.install_dir) + if os.name == 'posix': + # Set the executable bits (owner, group, and world) on + # all the scripts we just installed. + for file in self.get_outputs(): + mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777 + log.info("changing mode of %s to %o", file, mode) + os.chmod(file, mode) + + def get_inputs(self): + return self.distribution.scripts or [] + + def get_outputs(self): + return self.outfiles or [] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/sdist.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/sdist.py new file mode 100644 index 0000000000000000000000000000000000000000..e64cc82902ac292fa391a219ff8eae117b252fe7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/command/sdist.py @@ -0,0 +1,521 @@ +"""distutils.command.sdist + +Implements the Distutils 'sdist' command (create a source distribution).""" + +from __future__ import annotations + +import os +import sys +from collections.abc import Callable +from distutils import archive_util, dir_util, file_util +from distutils._log import log +from glob import glob +from itertools import filterfalse +from typing import ClassVar + +from ..core import Command +from ..errors import DistutilsOptionError, DistutilsTemplateError +from ..filelist import FileList +from ..text_file import TextFile +from ..util import convert_path + + +def show_formats(): + """Print all possible values for the 'formats' option (used by + the "--help-formats" command-line option). + """ + from ..archive_util import ARCHIVE_FORMATS + from ..fancy_getopt import FancyGetopt + + formats = sorted( + ("formats=" + format, None, ARCHIVE_FORMATS[format][2]) + for format in ARCHIVE_FORMATS.keys() + ) + FancyGetopt(formats).print_help("List of available source distribution formats:") + + +class sdist(Command): + description = "create a source distribution (tarball, zip file, etc.)" + + def checking_metadata(self) -> bool: + """Callable used for the check sub-command. + + Placed here so user_options can view it""" + return self.metadata_check + + user_options = [ + ('template=', 't', "name of manifest template file [default: MANIFEST.in]"), + ('manifest=', 'm', "name of manifest file [default: MANIFEST]"), + ( + 'use-defaults', + None, + "include the default file set in the manifest " + "[default; disable with --no-defaults]", + ), + ('no-defaults', None, "don't include the default file set"), + ( + 'prune', + None, + "specifically exclude files/directories that should not be " + "distributed (build tree, RCS/CVS dirs, etc.) " + "[default; disable with --no-prune]", + ), + ('no-prune', None, "don't automatically exclude anything"), + ( + 'manifest-only', + 'o', + "just regenerate the manifest and then stop (implies --force-manifest)", + ), + ( + 'force-manifest', + 'f', + "forcibly regenerate the manifest and carry on as usual. " + "Deprecated: now the manifest is always regenerated.", + ), + ('formats=', None, "formats for source distribution (comma-separated list)"), + ( + 'keep-temp', + 'k', + "keep the distribution tree around after creating " + "archive file(s)", + ), + ( + 'dist-dir=', + 'd', + "directory to put the source distribution archive(s) in [default: dist]", + ), + ( + 'metadata-check', + None, + "Ensure that all required elements of meta-data " + "are supplied. Warn if any missing. [default]", + ), + ( + 'owner=', + 'u', + "Owner name used when creating a tar file [default: current user]", + ), + ( + 'group=', + 'g', + "Group name used when creating a tar file [default: current group]", + ), + ] + + boolean_options: ClassVar[list[str]] = [ + 'use-defaults', + 'prune', + 'manifest-only', + 'force-manifest', + 'keep-temp', + 'metadata-check', + ] + + help_options: ClassVar[list[tuple[str, str | None, str, Callable[[], object]]]] = [ + ('help-formats', None, "list available distribution formats", show_formats), + ] + + negative_opt: ClassVar[dict[str, str]] = { + 'no-defaults': 'use-defaults', + 'no-prune': 'prune', + } + + sub_commands = [('check', checking_metadata)] + + READMES: ClassVar[tuple[str, ...]] = ('README', 'README.txt', 'README.rst') + + def initialize_options(self): + # 'template' and 'manifest' are, respectively, the names of + # the manifest template and manifest file. + self.template = None + self.manifest = None + + # 'use_defaults': if true, we will include the default file set + # in the manifest + self.use_defaults = True + self.prune = True + + self.manifest_only = False + self.force_manifest = False + + self.formats = ['gztar'] + self.keep_temp = False + self.dist_dir = None + + self.archive_files = None + self.metadata_check = True + self.owner = None + self.group = None + + def finalize_options(self) -> None: + if self.manifest is None: + self.manifest = "MANIFEST" + if self.template is None: + self.template = "MANIFEST.in" + + self.ensure_string_list('formats') + + bad_format = archive_util.check_archive_formats(self.formats) + if bad_format: + raise DistutilsOptionError(f"unknown archive format '{bad_format}'") + + if self.dist_dir is None: + self.dist_dir = "dist" + + def run(self) -> None: + # 'filelist' contains the list of files that will make up the + # manifest + self.filelist = FileList() + + # Run sub commands + for cmd_name in self.get_sub_commands(): + self.run_command(cmd_name) + + # Do whatever it takes to get the list of files to process + # (process the manifest template, read an existing manifest, + # whatever). File list is accumulated in 'self.filelist'. + self.get_file_list() + + # If user just wanted us to regenerate the manifest, stop now. + if self.manifest_only: + return + + # Otherwise, go ahead and create the source distribution tarball, + # or zipfile, or whatever. + self.make_distribution() + + def get_file_list(self) -> None: + """Figure out the list of files to include in the source + distribution, and put it in 'self.filelist'. This might involve + reading the manifest template (and writing the manifest), or just + reading the manifest, or just using the default file set -- it all + depends on the user's options. + """ + # new behavior when using a template: + # the file list is recalculated every time because + # even if MANIFEST.in or setup.py are not changed + # the user might have added some files in the tree that + # need to be included. + # + # This makes --force the default and only behavior with templates. + template_exists = os.path.isfile(self.template) + if not template_exists and self._manifest_is_not_generated(): + self.read_manifest() + self.filelist.sort() + self.filelist.remove_duplicates() + return + + if not template_exists: + self.warn( + ("manifest template '%s' does not exist " + "(using default file list)") + % self.template + ) + self.filelist.findall() + + if self.use_defaults: + self.add_defaults() + + if template_exists: + self.read_template() + + if self.prune: + self.prune_file_list() + + self.filelist.sort() + self.filelist.remove_duplicates() + self.write_manifest() + + def add_defaults(self) -> None: + """Add all the default files to self.filelist: + - README or README.txt + - setup.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. + - all files defined as scripts. + - all C sources listed as part of extensions or C libraries + in the setup script (doesn't catch C headers!) + Warns if (README or README.txt) or setup.py are missing; everything + else is optional. + """ + self._add_defaults_standards() + self._add_defaults_optional() + self._add_defaults_python() + self._add_defaults_data_files() + self._add_defaults_ext() + self._add_defaults_c_libs() + self._add_defaults_scripts() + + @staticmethod + def _cs_path_exists(fspath): + """ + Case-sensitive path existence check + + >>> sdist._cs_path_exists(__file__) + True + >>> sdist._cs_path_exists(__file__.upper()) + False + """ + if not os.path.exists(fspath): + return False + # make absolute so we always have a directory + abspath = os.path.abspath(fspath) + directory, filename = os.path.split(abspath) + return filename in os.listdir(directory) + + def _add_defaults_standards(self): + standards = [self.READMES, self.distribution.script_name] + for fn in standards: + if isinstance(fn, tuple): + alts = fn + got_it = False + for fn in alts: + if self._cs_path_exists(fn): + got_it = True + self.filelist.append(fn) + break + + if not got_it: + self.warn( + "standard file not found: should have one of " + ', '.join(alts) + ) + else: + if self._cs_path_exists(fn): + self.filelist.append(fn) + else: + self.warn(f"standard file '{fn}' not found") + + def _add_defaults_optional(self): + optional = ['tests/test*.py', 'test/test*.py', 'setup.cfg'] + for pattern in optional: + files = filter(os.path.isfile, glob(pattern)) + self.filelist.extend(files) + + def _add_defaults_python(self): + # build_py is used to get: + # - python modules + # - files defined in package_data + build_py = self.get_finalized_command('build_py') + + # getting python files + if self.distribution.has_pure_modules(): + self.filelist.extend(build_py.get_source_files()) + + # getting package_data files + # (computed in build_py.data_files by build_py.finalize_options) + for _pkg, src_dir, _build_dir, filenames in build_py.data_files: + for filename in filenames: + self.filelist.append(os.path.join(src_dir, filename)) + + def _add_defaults_data_files(self): + # getting distribution.data_files + if self.distribution.has_data_files(): + for item in self.distribution.data_files: + if isinstance(item, str): + # plain file + item = convert_path(item) + if os.path.isfile(item): + self.filelist.append(item) + else: + # a (dirname, filenames) tuple + dirname, filenames = item + for f in filenames: + f = convert_path(f) + if os.path.isfile(f): + self.filelist.append(f) + + def _add_defaults_ext(self): + if self.distribution.has_ext_modules(): + build_ext = self.get_finalized_command('build_ext') + self.filelist.extend(build_ext.get_source_files()) + + def _add_defaults_c_libs(self): + if self.distribution.has_c_libraries(): + build_clib = self.get_finalized_command('build_clib') + self.filelist.extend(build_clib.get_source_files()) + + def _add_defaults_scripts(self): + if self.distribution.has_scripts(): + build_scripts = self.get_finalized_command('build_scripts') + self.filelist.extend(build_scripts.get_source_files()) + + def read_template(self) -> None: + """Read and parse manifest template file named by self.template. + + (usually "MANIFEST.in") The parsing and processing is done by + 'self.filelist', which updates itself accordingly. + """ + log.info("reading manifest template '%s'", self.template) + template = TextFile( + self.template, + strip_comments=True, + skip_blanks=True, + join_lines=True, + lstrip_ws=True, + rstrip_ws=True, + collapse_join=True, + ) + + try: + while True: + line = template.readline() + if line is None: # end of file + break + + try: + self.filelist.process_template_line(line) + # the call above can raise a DistutilsTemplateError for + # malformed lines, or a ValueError from the lower-level + # convert_path function + except (DistutilsTemplateError, ValueError) as msg: + self.warn( + f"{template.filename}, line {int(template.current_line)}: {msg}" + ) + finally: + template.close() + + def prune_file_list(self) -> None: + """Prune off branches that might slip into the file list as created + by 'read_template()', but really don't belong there: + * the build tree (typically "build") + * the release tree itself (only an issue if we ran "sdist" + previously with --keep-temp, or it aborted) + * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories + """ + build = self.get_finalized_command('build') + base_dir = self.distribution.get_fullname() + + self.filelist.exclude_pattern(None, prefix=os.fspath(build.build_base)) + self.filelist.exclude_pattern(None, prefix=base_dir) + + if sys.platform == 'win32': + seps = r'/|\\' + else: + seps = '/' + + vcs_dirs = ['RCS', 'CVS', r'\.svn', r'\.hg', r'\.git', r'\.bzr', '_darcs'] + vcs_ptrn = r'(^|{})({})({}).*'.format(seps, '|'.join(vcs_dirs), seps) + self.filelist.exclude_pattern(vcs_ptrn, is_regex=True) + + def write_manifest(self) -> None: + """Write the file list in 'self.filelist' (presumably as filled in + by 'add_defaults()' and 'read_template()') to the manifest file + named by 'self.manifest'. + """ + if self._manifest_is_not_generated(): + log.info( + f"not writing to manually maintained manifest file '{self.manifest}'" + ) + return + + content = self.filelist.files[:] + content.insert(0, '# file GENERATED by distutils, do NOT edit') + self.execute( + file_util.write_file, + (self.manifest, content), + f"writing manifest file '{self.manifest}'", + ) + + def _manifest_is_not_generated(self): + # check for special comment used in 3.1.3 and higher + if not os.path.isfile(self.manifest): + return False + + with open(self.manifest, encoding='utf-8') as fp: + first_line = next(fp) + return first_line != '# file GENERATED by distutils, do NOT edit\n' + + def read_manifest(self) -> None: + """Read the manifest file (named by 'self.manifest') and use it to + fill in 'self.filelist', the list of files to include in the source + distribution. + """ + log.info("reading manifest file '%s'", self.manifest) + with open(self.manifest, encoding='utf-8') as lines: + self.filelist.extend( + # ignore comments and blank lines + filter(None, filterfalse(is_comment, map(str.strip, lines))) + ) + + def make_release_tree(self, base_dir, files) -> None: + """Create the directory tree that will become the source + distribution archive. All directories implied by the filenames in + 'files' are created under 'base_dir', and then we hard link or copy + (if hard linking is unavailable) those files into place. + Essentially, this duplicates the developer's source tree, but in a + directory named after the distribution, containing only the files + to be distributed. + """ + # Create all the directories under 'base_dir' necessary to + # put 'files' there; the 'mkpath()' is just so we don't die + # if the manifest happens to be empty. + self.mkpath(base_dir) + dir_util.create_tree(base_dir, files) + + # And walk over the list of files, either making a hard link (if + # os.link exists) to each one that doesn't already exist in its + # corresponding location under 'base_dir', or copying each file + # that's out-of-date in 'base_dir'. (Usually, all files will be + # out-of-date, because by default we blow away 'base_dir' when + # we're done making the distribution archives.) + + if hasattr(os, 'link'): # can make hard links on this system + link = 'hard' + msg = f"making hard links in {base_dir}..." + else: # nope, have to copy + link = None + msg = f"copying files to {base_dir}..." + + if not files: + log.warning("no files to distribute -- empty manifest?") + else: + log.info(msg) + for file in files: + if not os.path.isfile(file): + log.warning("'%s' not a regular file -- skipping", file) + else: + dest = os.path.join(base_dir, file) + self.copy_file(file, dest, link=link) + + self.distribution.metadata.write_pkg_info(base_dir) + + def make_distribution(self) -> None: + """Create the source distribution(s). First, we create the release + tree with 'make_release_tree()'; then, we create all required + archive files (according to 'self.formats') from the release tree. + Finally, we clean up by blowing away the release tree (unless + 'self.keep_temp' is true). The list of archive files created is + stored so it can be retrieved later by 'get_archive_files()'. + """ + # Don't warn about missing meta-data here -- should be (and is!) + # done elsewhere. + base_dir = self.distribution.get_fullname() + base_name = os.path.join(self.dist_dir, base_dir) + + self.make_release_tree(base_dir, self.filelist.files) + archive_files = [] # remember names of files we create + # tar archive must be created last to avoid overwrite and remove + if 'tar' in self.formats: + self.formats.append(self.formats.pop(self.formats.index('tar'))) + + for fmt in self.formats: + file = self.make_archive( + base_name, fmt, base_dir=base_dir, owner=self.owner, group=self.group + ) + archive_files.append(file) + self.distribution.dist_files.append(('sdist', '', file)) + + self.archive_files = archive_files + + if not self.keep_temp: + dir_util.remove_tree(base_dir) + + def get_archive_files(self): + """Return the list of archive files created when the command + was run, or None if the command hasn't run yet. + """ + return self.archive_files + + +def is_comment(line: str) -> bool: + return line.startswith('#') diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2c43729b09ea5e5bf9d8c0708e63c69b5114a279 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__init__.py @@ -0,0 +1,18 @@ +from __future__ import annotations + +from collections.abc import Iterable +from typing import TypeVar + +_IterableT = TypeVar("_IterableT", bound="Iterable[str]") + + +def consolidate_linker_args(args: _IterableT) -> _IterableT | str: + """ + Ensure the return value is a string for backward compatibility. + + Retain until at least 2025-04-31. See pypa/distutils#246 + """ + + if not all(arg.startswith('-Wl,') for arg in args): + return args + return '-Wl,' + ','.join(arg.removeprefix('-Wl,') for arg in args) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..74d48871182c8e87decfaecab6ec8c2d2534c2d8 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/numpy.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/numpy.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ee42bbeec34be74335e4b6b8171b32504b8deb51 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/numpy.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/py39.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/py39.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb6b291bff02d263f995605c06b6e5ca4c79e663 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/__pycache__/py39.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/numpy.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/numpy.py new file mode 100644 index 0000000000000000000000000000000000000000..73eca7acb103b7c7ca8e7a9f7f2d772a64aa344b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/numpy.py @@ -0,0 +1,2 @@ +# required for older numpy versions on Pythons prior to 3.12; see pypa/setuptools#4876 +from ..compilers.C.base import _default_compilers, compiler_class # noqa: F401 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/py39.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/py39.py new file mode 100644 index 0000000000000000000000000000000000000000..1b436d76586cbcf38164548f3fc849ce1a3ff600 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compat/py39.py @@ -0,0 +1,66 @@ +import functools +import itertools +import platform +import sys + + +def add_ext_suffix_39(vars): + """ + Ensure vars contains 'EXT_SUFFIX'. pypa/distutils#130 + """ + import _imp + + ext_suffix = _imp.extension_suffixes()[0] + vars.update( + EXT_SUFFIX=ext_suffix, + # sysconfig sets SO to match EXT_SUFFIX, so maintain + # that expectation. + # https://github.com/python/cpython/blob/785cc6770588de087d09e89a69110af2542be208/Lib/sysconfig.py#L671-L673 + SO=ext_suffix, + ) + + +needs_ext_suffix = sys.version_info < (3, 10) and platform.system() == 'Windows' +add_ext_suffix = add_ext_suffix_39 if needs_ext_suffix else lambda vars: None + + +# from more_itertools +class UnequalIterablesError(ValueError): + def __init__(self, details=None): + msg = 'Iterables have different lengths' + if details is not None: + msg += (': index 0 has length {}; index {} has length {}').format(*details) + + super().__init__(msg) + + +# from more_itertools +def _zip_equal_generator(iterables): + _marker = object() + for combo in itertools.zip_longest(*iterables, fillvalue=_marker): + for val in combo: + if val is _marker: + raise UnequalIterablesError() + yield combo + + +# from more_itertools +def _zip_equal(*iterables): + # Check whether the iterables are all the same size. + try: + first_size = len(iterables[0]) + for i, it in enumerate(iterables[1:], 1): + size = len(it) + if size != first_size: + raise UnequalIterablesError(details=(first_size, i, size)) + # All sizes are equal, we can use the built-in zip. + return zip(*iterables) + # If any one of the iterables didn't have a length, start reading + # them until one runs out. + except TypeError: + return _zip_equal_generator(iterables) + + +zip_strict = ( + _zip_equal if sys.version_info < (3, 10) else functools.partial(zip, strict=True) +) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/base.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..902ab7221e65b842aead8cbdc8ed485e64844712 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/base.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/cygwin.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/cygwin.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..85e541610b08b9e2db60b1cca35e63e9a875fd38 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/cygwin.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/errors.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/errors.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..782374ada2dfdac2ae2f8ff8a5a0b02f247692e9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/errors.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/msvc.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/msvc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5fac011bb916e5be19f83d4c36030fe047558c39 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/msvc.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/unix.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/unix.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98de154f1c7c782639755edff8cb7b1f4c785059 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/unix.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/zos.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/zos.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..daca117c91e48baafa87f54f842d18eaafda8e90 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/__pycache__/zos.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/base.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/base.py new file mode 100644 index 0000000000000000000000000000000000000000..ea6b5458ef2b1d0c936cbfd9aaea19f5e41bbea9 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/base.py @@ -0,0 +1,1386 @@ +"""distutils.ccompiler + +Contains Compiler, an abstract base class that defines the interface +for the Distutils compiler abstraction model.""" + +from __future__ import annotations + +import os +import pathlib +import re +import sys +import warnings +from collections.abc import Callable, Iterable, MutableSequence, Sequence +from typing import ( + TYPE_CHECKING, + ClassVar, + Literal, + TypeVar, + Union, + overload, +) + +from more_itertools import always_iterable + +from ..._log import log +from ..._modified import newer_group +from ...dir_util import mkpath +from ...errors import ( + DistutilsModuleError, + DistutilsPlatformError, +) +from ...file_util import move_file +from ...spawn import spawn +from ...util import execute, is_mingw, split_quoted +from .errors import ( + CompileError, + LinkError, + UnknownFileType, +) + +if TYPE_CHECKING: + from typing_extensions import TypeAlias, TypeVarTuple, Unpack + + _Ts = TypeVarTuple("_Ts") + +_Macro: TypeAlias = Union[tuple[str], tuple[str, Union[str, None]]] +_StrPathT = TypeVar("_StrPathT", bound="str | os.PathLike[str]") +_BytesPathT = TypeVar("_BytesPathT", bound="bytes | os.PathLike[bytes]") + + +class Compiler: + """Abstract base class to define the interface that must be implemented + by real compiler classes. Also has some utility methods used by + several compiler classes. + + The basic idea behind a compiler abstraction class is that each + instance can be used for all the compile/link steps in building a + single project. Thus, attributes common to all of those compile and + link steps -- include directories, macros to define, libraries to link + against, etc. -- are attributes of the compiler instance. To allow for + variability in how individual files are treated, most of those + attributes may be varied on a per-compilation or per-link basis. + """ + + # 'compiler_type' is a class attribute that identifies this class. It + # keeps code that wants to know what kind of compiler it's dealing with + # from having to import all possible compiler classes just to do an + # 'isinstance'. In concrete CCompiler subclasses, 'compiler_type' + # should really, really be one of the keys of the 'compiler_class' + # dictionary (see below -- used by the 'new_compiler()' factory + # function) -- authors of new compiler interface classes are + # responsible for updating 'compiler_class'! + compiler_type: ClassVar[str] = None # type: ignore[assignment] + + # XXX things not handled by this compiler abstraction model: + # * client can't provide additional options for a compiler, + # e.g. warning, optimization, debugging flags. Perhaps this + # should be the domain of concrete compiler abstraction classes + # (UnixCCompiler, MSVCCompiler, etc.) -- or perhaps the base + # class should have methods for the common ones. + # * can't completely override the include or library searchg + # path, ie. no "cc -I -Idir1 -Idir2" or "cc -L -Ldir1 -Ldir2". + # I'm not sure how widely supported this is even by Unix + # compilers, much less on other platforms. And I'm even less + # sure how useful it is; maybe for cross-compiling, but + # support for that is a ways off. (And anyways, cross + # compilers probably have a dedicated binary with the + # right paths compiled in. I hope.) + # * can't do really freaky things with the library list/library + # dirs, e.g. "-Ldir1 -lfoo -Ldir2 -lfoo" to link against + # different versions of libfoo.a in different locations. I + # think this is useless without the ability to null out the + # library search path anyways. + + executables: ClassVar[dict] + + # Subclasses that rely on the standard filename generation methods + # implemented below should override these; see the comment near + # those methods ('object_filenames()' et. al.) for details: + src_extensions: ClassVar[list[str] | None] = None + obj_extension: ClassVar[str | None] = None + static_lib_extension: ClassVar[str | None] = None + shared_lib_extension: ClassVar[str | None] = None + static_lib_format: ClassVar[str | None] = None # format string + shared_lib_format: ClassVar[str | None] = None # prob. same as static_lib_format + exe_extension: ClassVar[str | None] = None + + # Default language settings. language_map is used to detect a source + # file or Extension target language, checking source filenames. + # language_order is used to detect the language precedence, when deciding + # what language to use when mixing source types. For example, if some + # extension has two files with ".c" extension, and one with ".cpp", it + # is still linked as c++. + language_map: ClassVar[dict[str, str]] = { + ".c": "c", + ".cc": "c++", + ".cpp": "c++", + ".cxx": "c++", + ".m": "objc", + } + language_order: ClassVar[list[str]] = ["c++", "objc", "c"] + + include_dirs: list[str] = [] + """ + include dirs specific to this compiler class + """ + + library_dirs: list[str] = [] + """ + library dirs specific to this compiler class + """ + + def __init__(self, verbose: bool = False, force: bool = False) -> None: + self.force = force + self.verbose = verbose + + # 'output_dir': a common output directory for object, library, + # shared object, and shared library files + self.output_dir: str | None = None + + # 'macros': a list of macro definitions (or undefinitions). A + # macro definition is a 2-tuple (name, value), where the value is + # either a string or None (no explicit value). A macro + # undefinition is a 1-tuple (name,). + self.macros: list[_Macro] = [] + + # 'include_dirs': a list of directories to search for include files + self.include_dirs = [] + + # 'libraries': a list of libraries to include in any link + # (library names, not filenames: eg. "foo" not "libfoo.a") + self.libraries: list[str] = [] + + # 'library_dirs': a list of directories to search for libraries + self.library_dirs = [] + + # 'runtime_library_dirs': a list of directories to search for + # shared libraries/objects at runtime + self.runtime_library_dirs: list[str] = [] + + # 'objects': a list of object files (or similar, such as explicitly + # named library files) to include on any link + self.objects: list[str] = [] + + for key in self.executables.keys(): + self.set_executable(key, self.executables[key]) + + def set_executables(self, **kwargs: str) -> None: + """Define the executables (and options for them) that will be run + to perform the various stages of compilation. The exact set of + executables that may be specified here depends on the compiler + class (via the 'executables' class attribute), but most will have: + compiler the C/C++ compiler + linker_so linker used to create shared objects and libraries + linker_exe linker used to create binary executables + archiver static library creator + + On platforms with a command-line (Unix, DOS/Windows), each of these + is a string that will be split into executable name and (optional) + list of arguments. (Splitting the string is done similarly to how + Unix shells operate: words are delimited by spaces, but quotes and + backslashes can override this. See + 'distutils.util.split_quoted()'.) + """ + + # Note that some CCompiler implementation classes will define class + # attributes 'cpp', 'cc', etc. with hard-coded executable names; + # this is appropriate when a compiler class is for exactly one + # compiler/OS combination (eg. MSVCCompiler). Other compiler + # classes (UnixCCompiler, in particular) are driven by information + # discovered at run-time, since there are many different ways to do + # basically the same things with Unix C compilers. + + for key in kwargs: + if key not in self.executables: + raise ValueError( + f"unknown executable '{key}' for class {self.__class__.__name__}" + ) + self.set_executable(key, kwargs[key]) + + def set_executable(self, key, value): + if isinstance(value, str): + setattr(self, key, split_quoted(value)) + else: + setattr(self, key, value) + + def _find_macro(self, name): + i = 0 + for defn in self.macros: + if defn[0] == name: + return i + i += 1 + return None + + def _check_macro_definitions(self, definitions): + """Ensure that every element of 'definitions' is valid.""" + for defn in definitions: + self._check_macro_definition(*defn) + + def _check_macro_definition(self, defn): + """ + Raise a TypeError if defn is not valid. + + A valid definition is either a (name, value) 2-tuple or a (name,) tuple. + """ + if not isinstance(defn, tuple) or not self._is_valid_macro(*defn): + raise TypeError( + f"invalid macro definition '{defn}': " + "must be tuple (string,), (string, string), or (string, None)" + ) + + @staticmethod + def _is_valid_macro(name, value=None): + """ + A valid macro is a ``name : str`` and a ``value : str | None``. + + >>> Compiler._is_valid_macro('foo', None) + True + """ + return isinstance(name, str) and isinstance(value, (str, type(None))) + + # -- Bookkeeping methods ------------------------------------------- + + def define_macro(self, name: str, value: str | None = None) -> None: + """Define a preprocessor macro for all compilations driven by this + compiler object. The optional parameter 'value' should be a + string; if it is not supplied, then the macro will be defined + without an explicit value and the exact outcome depends on the + compiler used (XXX true? does ANSI say anything about this?) + """ + # Delete from the list of macro definitions/undefinitions if + # already there (so that this one will take precedence). + i = self._find_macro(name) + if i is not None: + del self.macros[i] + + self.macros.append((name, value)) + + def undefine_macro(self, name: str) -> None: + """Undefine a preprocessor macro for all compilations driven by + this compiler object. If the same macro is defined by + 'define_macro()' and undefined by 'undefine_macro()' the last call + takes precedence (including multiple redefinitions or + undefinitions). If the macro is redefined/undefined on a + per-compilation basis (ie. in the call to 'compile()'), then that + takes precedence. + """ + # Delete from the list of macro definitions/undefinitions if + # already there (so that this one will take precedence). + i = self._find_macro(name) + if i is not None: + del self.macros[i] + + undefn = (name,) + self.macros.append(undefn) + + def add_include_dir(self, dir: str) -> None: + """Add 'dir' to the list of directories that will be searched for + header files. The compiler is instructed to search directories in + the order in which they are supplied by successive calls to + 'add_include_dir()'. + """ + self.include_dirs.append(dir) + + def set_include_dirs(self, dirs: list[str]) -> None: + """Set the list of directories that will be searched to 'dirs' (a + list of strings). Overrides any preceding calls to + 'add_include_dir()'; subsequence calls to 'add_include_dir()' add + to the list passed to 'set_include_dirs()'. This does not affect + any list of standard include directories that the compiler may + search by default. + """ + self.include_dirs = dirs[:] + + def add_library(self, libname: str) -> None: + """Add 'libname' to the list of libraries that will be included in + all links driven by this compiler object. Note that 'libname' + should *not* be the name of a file containing a library, but the + name of the library itself: the actual filename will be inferred by + the linker, the compiler, or the compiler class (depending on the + platform). + + The linker will be instructed to link against libraries in the + order they were supplied to 'add_library()' and/or + 'set_libraries()'. It is perfectly valid to duplicate library + names; the linker will be instructed to link against libraries as + many times as they are mentioned. + """ + self.libraries.append(libname) + + def set_libraries(self, libnames: list[str]) -> None: + """Set the list of libraries to be included in all links driven by + this compiler object to 'libnames' (a list of strings). This does + not affect any standard system libraries that the linker may + include by default. + """ + self.libraries = libnames[:] + + def add_library_dir(self, dir: str) -> None: + """Add 'dir' to the list of directories that will be searched for + libraries specified to 'add_library()' and 'set_libraries()'. The + linker will be instructed to search for libraries in the order they + are supplied to 'add_library_dir()' and/or 'set_library_dirs()'. + """ + self.library_dirs.append(dir) + + def set_library_dirs(self, dirs: list[str]) -> None: + """Set the list of library search directories to 'dirs' (a list of + strings). This does not affect any standard library search path + that the linker may search by default. + """ + self.library_dirs = dirs[:] + + def add_runtime_library_dir(self, dir: str) -> None: + """Add 'dir' to the list of directories that will be searched for + shared libraries at runtime. + """ + self.runtime_library_dirs.append(dir) + + def set_runtime_library_dirs(self, dirs: list[str]) -> None: + """Set the list of directories to search for shared libraries at + runtime to 'dirs' (a list of strings). This does not affect any + standard search path that the runtime linker may search by + default. + """ + self.runtime_library_dirs = dirs[:] + + def add_link_object(self, object: str) -> None: + """Add 'object' to the list of object files (or analogues, such as + explicitly named library files or the output of "resource + compilers") to be included in every link driven by this compiler + object. + """ + self.objects.append(object) + + def set_link_objects(self, objects: list[str]) -> None: + """Set the list of object files (or analogues) to be included in + every link to 'objects'. This does not affect any standard object + files that the linker may include by default (such as system + libraries). + """ + self.objects = objects[:] + + # -- Private utility methods -------------------------------------- + # (here for the convenience of subclasses) + + # Helper method to prep compiler in subclass compile() methods + + def _setup_compile( + self, + outdir: str | None, + macros: list[_Macro] | None, + incdirs: list[str] | tuple[str, ...] | None, + sources, + depends, + extra, + ): + """Process arguments and decide which source files to compile.""" + outdir, macros, incdirs = self._fix_compile_args(outdir, macros, incdirs) + + if extra is None: + extra = [] + + # Get the list of expected output (object) files + objects = self.object_filenames(sources, strip_dir=False, output_dir=outdir) + assert len(objects) == len(sources) + + pp_opts = gen_preprocess_options(macros, incdirs) + + build = {} + for i in range(len(sources)): + src = sources[i] + obj = objects[i] + ext = os.path.splitext(src)[1] + self.mkpath(os.path.dirname(obj)) + build[obj] = (src, ext) + + return macros, objects, extra, pp_opts, build + + def _get_cc_args(self, pp_opts, debug, before): + # works for unixccompiler, cygwinccompiler + cc_args = pp_opts + ['-c'] + if debug: + cc_args[:0] = ['-g'] + if before: + cc_args[:0] = before + return cc_args + + def _fix_compile_args( + self, + output_dir: str | None, + macros: list[_Macro] | None, + include_dirs: list[str] | tuple[str, ...] | None, + ) -> tuple[str, list[_Macro], list[str]]: + """Typecheck and fix-up some of the arguments to the 'compile()' + method, and return fixed-up values. Specifically: if 'output_dir' + is None, replaces it with 'self.output_dir'; ensures that 'macros' + is a list, and augments it with 'self.macros'; ensures that + 'include_dirs' is a list, and augments it with 'self.include_dirs'. + Guarantees that the returned values are of the correct type, + i.e. for 'output_dir' either string or None, and for 'macros' and + 'include_dirs' either list or None. + """ + if output_dir is None: + output_dir = self.output_dir + elif not isinstance(output_dir, str): + raise TypeError("'output_dir' must be a string or None") + + if macros is None: + macros = list(self.macros) + elif isinstance(macros, list): + macros = macros + (self.macros or []) + else: + raise TypeError("'macros' (if supplied) must be a list of tuples") + + if include_dirs is None: + include_dirs = list(self.include_dirs) + elif isinstance(include_dirs, (list, tuple)): + include_dirs = list(include_dirs) + (self.include_dirs or []) + else: + raise TypeError("'include_dirs' (if supplied) must be a list of strings") + + # add include dirs for class + include_dirs += self.__class__.include_dirs + + return output_dir, macros, include_dirs + + def _prep_compile(self, sources, output_dir, depends=None): + """Decide which source files must be recompiled. + + Determine the list of object files corresponding to 'sources', + and figure out which ones really need to be recompiled. + Return a list of all object files and a dictionary telling + which source files can be skipped. + """ + # Get the list of expected output (object) files + objects = self.object_filenames(sources, output_dir=output_dir) + assert len(objects) == len(sources) + + # Return an empty dict for the "which source files can be skipped" + # return value to preserve API compatibility. + return objects, {} + + def _fix_object_args( + self, objects: list[str] | tuple[str, ...], output_dir: str | None + ) -> tuple[list[str], str]: + """Typecheck and fix up some arguments supplied to various methods. + Specifically: ensure that 'objects' is a list; if output_dir is + None, replace with self.output_dir. Return fixed versions of + 'objects' and 'output_dir'. + """ + if not isinstance(objects, (list, tuple)): + raise TypeError("'objects' must be a list or tuple of strings") + objects = list(objects) + + if output_dir is None: + output_dir = self.output_dir + elif not isinstance(output_dir, str): + raise TypeError("'output_dir' must be a string or None") + + return (objects, output_dir) + + def _fix_lib_args( + self, + libraries: list[str] | tuple[str, ...] | None, + library_dirs: list[str] | tuple[str, ...] | None, + runtime_library_dirs: list[str] | tuple[str, ...] | None, + ) -> tuple[list[str], list[str], list[str]]: + """Typecheck and fix up some of the arguments supplied to the + 'link_*' methods. Specifically: ensure that all arguments are + lists, and augment them with their permanent versions + (eg. 'self.libraries' augments 'libraries'). Return a tuple with + fixed versions of all arguments. + """ + if libraries is None: + libraries = list(self.libraries) + elif isinstance(libraries, (list, tuple)): + libraries = list(libraries) + (self.libraries or []) + else: + raise TypeError("'libraries' (if supplied) must be a list of strings") + + if library_dirs is None: + library_dirs = list(self.library_dirs) + elif isinstance(library_dirs, (list, tuple)): + library_dirs = list(library_dirs) + (self.library_dirs or []) + else: + raise TypeError("'library_dirs' (if supplied) must be a list of strings") + + # add library dirs for class + library_dirs += self.__class__.library_dirs + + if runtime_library_dirs is None: + runtime_library_dirs = list(self.runtime_library_dirs) + elif isinstance(runtime_library_dirs, (list, tuple)): + runtime_library_dirs = list(runtime_library_dirs) + ( + self.runtime_library_dirs or [] + ) + else: + raise TypeError( + "'runtime_library_dirs' (if supplied) must be a list of strings" + ) + + return (libraries, library_dirs, runtime_library_dirs) + + def _need_link(self, objects, output_file): + """Return true if we need to relink the files listed in 'objects' + to recreate 'output_file'. + """ + if self.force: + return True + newer = newer_group(objects, output_file) + return newer + + def detect_language(self, sources: str | list[str]) -> str | None: + """Detect the language of a given file, or list of files. Uses + language_map, and language_order to do the job. + """ + if not isinstance(sources, list): + sources = [sources] + lang = None + index = len(self.language_order) + for source in sources: + base, ext = os.path.splitext(source) + extlang = self.language_map.get(ext) + try: + extindex = self.language_order.index(extlang) + if extindex < index: + lang = extlang + index = extindex + except ValueError: + pass + return lang + + # -- Worker methods ------------------------------------------------ + # (must be implemented by subclasses) + + def preprocess( + self, + source: str | os.PathLike[str], + output_file: str | os.PathLike[str] | None = None, + macros: list[_Macro] | None = None, + include_dirs: list[str] | tuple[str, ...] | None = None, + extra_preargs: list[str] | None = None, + extra_postargs: Iterable[str] | None = None, + ): + """Preprocess a single C/C++ source file, named in 'source'. + Output will be written to file named 'output_file', or stdout if + 'output_file' not supplied. 'macros' is a list of macro + definitions as for 'compile()', which will augment the macros set + with 'define_macro()' and 'undefine_macro()'. 'include_dirs' is a + list of directory names that will be added to the default list. + + Raises PreprocessError on failure. + """ + pass + + def compile( + self, + sources: Sequence[str | os.PathLike[str]], + output_dir: str | None = None, + macros: list[_Macro] | None = None, + include_dirs: list[str] | tuple[str, ...] | None = None, + debug: bool = False, + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + depends: list[str] | tuple[str, ...] | None = None, + ) -> list[str]: + """Compile one or more source files. + + 'sources' must be a list of filenames, most likely C/C++ + files, but in reality anything that can be handled by a + particular compiler and compiler class (eg. MSVCCompiler can + handle resource files in 'sources'). Return a list of object + filenames, one per source filename in 'sources'. Depending on + the implementation, not all source files will necessarily be + compiled, but all corresponding object filenames will be + returned. + + If 'output_dir' is given, object files will be put under it, while + retaining their original path component. That is, "foo/bar.c" + normally compiles to "foo/bar.o" (for a Unix implementation); if + 'output_dir' is "build", then it would compile to + "build/foo/bar.o". + + 'macros', if given, must be a list of macro definitions. A macro + definition is either a (name, value) 2-tuple or a (name,) 1-tuple. + The former defines a macro; if the value is None, the macro is + defined without an explicit value. The 1-tuple case undefines a + macro. Later definitions/redefinitions/ undefinitions take + precedence. + + 'include_dirs', if given, must be a list of strings, the + directories to add to the default include file search path for this + compilation only. + + 'debug' is a boolean; if true, the compiler will be instructed to + output debug symbols in (or alongside) the object file(s). + + 'extra_preargs' and 'extra_postargs' are implementation- dependent. + On platforms that have the notion of a command-line (e.g. Unix, + DOS/Windows), they are most likely lists of strings: extra + command-line arguments to prepend/append to the compiler command + line. On other platforms, consult the implementation class + documentation. In any event, they are intended as an escape hatch + for those occasions when the abstract compiler framework doesn't + cut the mustard. + + 'depends', if given, is a list of filenames that all targets + depend on. If a source file is older than any file in + depends, then the source file will be recompiled. This + supports dependency tracking, but only at a coarse + granularity. + + Raises CompileError on failure. + """ + # A concrete compiler class can either override this method + # entirely or implement _compile(). + macros, objects, extra_postargs, pp_opts, build = self._setup_compile( + output_dir, macros, include_dirs, sources, depends, extra_postargs + ) + cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) + + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue + self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) + + # Return *all* object filenames, not just the ones we just built. + return objects + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + """Compile 'src' to product 'obj'.""" + # A concrete compiler class that does not override compile() + # should implement _compile(). + pass + + def create_static_lib( + self, + objects: list[str] | tuple[str, ...], + output_libname: str, + output_dir: str | None = None, + debug: bool = False, + target_lang: str | None = None, + ) -> None: + """Link a bunch of stuff together to create a static library file. + The "bunch of stuff" consists of the list of object files supplied + as 'objects', the extra object files supplied to + 'add_link_object()' and/or 'set_link_objects()', the libraries + supplied to 'add_library()' and/or 'set_libraries()', and the + libraries supplied as 'libraries' (if any). + + 'output_libname' should be a library name, not a filename; the + filename will be inferred from the library name. 'output_dir' is + the directory where the library file will be put. + + 'debug' is a boolean; if true, debugging information will be + included in the library (note that on most platforms, it is the + compile step where this matters: the 'debug' flag is included here + just for consistency). + + 'target_lang' is the target language for which the given objects + are being compiled. This allows specific linkage time treatment of + certain languages. + + Raises LibError on failure. + """ + pass + + # values for target_desc parameter in link() + SHARED_OBJECT = "shared_object" + SHARED_LIBRARY = "shared_library" + EXECUTABLE = "executable" + + def link( + self, + target_desc: str, + objects: list[str] | tuple[str, ...], + output_filename: str, + output_dir: str | None = None, + libraries: list[str] | tuple[str, ...] | None = None, + library_dirs: list[str] | tuple[str, ...] | None = None, + runtime_library_dirs: list[str] | tuple[str, ...] | None = None, + export_symbols: Iterable[str] | None = None, + debug: bool = False, + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + build_temp: str | os.PathLike[str] | None = None, + target_lang: str | None = None, + ): + """Link a bunch of stuff together to create an executable or + shared library file. + + The "bunch of stuff" consists of the list of object files supplied + as 'objects'. 'output_filename' should be a filename. If + 'output_dir' is supplied, 'output_filename' is relative to it + (i.e. 'output_filename' can provide directory components if + needed). + + 'libraries' is a list of libraries to link against. These are + library names, not filenames, since they're translated into + filenames in a platform-specific way (eg. "foo" becomes "libfoo.a" + on Unix and "foo.lib" on DOS/Windows). However, they can include a + directory component, which means the linker will look in that + specific directory rather than searching all the normal locations. + + 'library_dirs', if supplied, should be a list of directories to + search for libraries that were specified as bare library names + (ie. no directory component). These are on top of the system + default and those supplied to 'add_library_dir()' and/or + 'set_library_dirs()'. 'runtime_library_dirs' is a list of + directories that will be embedded into the shared library and used + to search for other shared libraries that *it* depends on at + run-time. (This may only be relevant on Unix.) + + 'export_symbols' is a list of symbols that the shared library will + export. (This appears to be relevant only on Windows.) + + 'debug' is as for 'compile()' and 'create_static_lib()', with the + slight distinction that it actually matters on most platforms (as + opposed to 'create_static_lib()', which includes a 'debug' flag + mostly for form's sake). + + 'extra_preargs' and 'extra_postargs' are as for 'compile()' (except + of course that they supply command-line arguments for the + particular linker being used). + + 'target_lang' is the target language for which the given objects + are being compiled. This allows specific linkage time treatment of + certain languages. + + Raises LinkError on failure. + """ + raise NotImplementedError + + # Old 'link_*()' methods, rewritten to use the new 'link()' method. + + def link_shared_lib( + self, + objects: list[str] | tuple[str, ...], + output_libname: str, + output_dir: str | None = None, + libraries: list[str] | tuple[str, ...] | None = None, + library_dirs: list[str] | tuple[str, ...] | None = None, + runtime_library_dirs: list[str] | tuple[str, ...] | None = None, + export_symbols: Iterable[str] | None = None, + debug: bool = False, + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + build_temp: str | os.PathLike[str] | None = None, + target_lang: str | None = None, + ): + self.link( + Compiler.SHARED_LIBRARY, + objects, + self.library_filename(output_libname, lib_type='shared'), + output_dir, + libraries, + library_dirs, + runtime_library_dirs, + export_symbols, + debug, + extra_preargs, + extra_postargs, + build_temp, + target_lang, + ) + + def link_shared_object( + self, + objects: list[str] | tuple[str, ...], + output_filename: str, + output_dir: str | None = None, + libraries: list[str] | tuple[str, ...] | None = None, + library_dirs: list[str] | tuple[str, ...] | None = None, + runtime_library_dirs: list[str] | tuple[str, ...] | None = None, + export_symbols: Iterable[str] | None = None, + debug: bool = False, + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + build_temp: str | os.PathLike[str] | None = None, + target_lang: str | None = None, + ): + self.link( + Compiler.SHARED_OBJECT, + objects, + output_filename, + output_dir, + libraries, + library_dirs, + runtime_library_dirs, + export_symbols, + debug, + extra_preargs, + extra_postargs, + build_temp, + target_lang, + ) + + def link_executable( + self, + objects: list[str] | tuple[str, ...], + output_progname: str, + output_dir: str | None = None, + libraries: list[str] | tuple[str, ...] | None = None, + library_dirs: list[str] | tuple[str, ...] | None = None, + runtime_library_dirs: list[str] | tuple[str, ...] | None = None, + debug: bool = False, + extra_preargs: list[str] | None = None, + extra_postargs: list[str] | None = None, + target_lang: str | None = None, + ): + self.link( + Compiler.EXECUTABLE, + objects, + self.executable_filename(output_progname), + output_dir, + libraries, + library_dirs, + runtime_library_dirs, + None, + debug, + extra_preargs, + extra_postargs, + None, + target_lang, + ) + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function; there is + # no appropriate default implementation so subclasses should + # implement all of these. + + def library_dir_option(self, dir: str) -> str: + """Return the compiler option to add 'dir' to the list of + directories searched for libraries. + """ + raise NotImplementedError + + def runtime_library_dir_option(self, dir: str) -> str: + """Return the compiler option to add 'dir' to the list of + directories searched for runtime libraries. + """ + raise NotImplementedError + + def library_option(self, lib: str) -> str: + """Return the compiler option to add 'lib' to the list of libraries + linked into the shared library or executable. + """ + raise NotImplementedError + + def has_function( # noqa: C901 + self, + funcname: str, + includes: Iterable[str] | None = None, + include_dirs: list[str] | tuple[str, ...] | None = None, + libraries: list[str] | None = None, + library_dirs: list[str] | tuple[str, ...] | None = None, + ) -> bool: + """Return a boolean indicating whether funcname is provided as + a symbol on the current platform. The optional arguments can + be used to augment the compilation environment. + + The libraries argument is a list of flags to be passed to the + linker to make additional symbol definitions available for + linking. + + The includes and include_dirs arguments are deprecated. + Usually, supplying include files with function declarations + will cause function detection to fail even in cases where the + symbol is available for linking. + + """ + # this can't be included at module scope because it tries to + # import math which might not be available at that point - maybe + # the necessary logic should just be inlined? + import tempfile + + if includes is None: + includes = [] + else: + warnings.warn("includes is deprecated", DeprecationWarning) + if include_dirs is None: + include_dirs = [] + else: + warnings.warn("include_dirs is deprecated", DeprecationWarning) + if libraries is None: + libraries = [] + if library_dirs is None: + library_dirs = [] + fd, fname = tempfile.mkstemp(".c", funcname, text=True) + with os.fdopen(fd, "w", encoding='utf-8') as f: + for incl in includes: + f.write(f"""#include "{incl}"\n""") + if not includes: + # Use "char func(void);" as the prototype to follow + # what autoconf does. This prototype does not match + # any well-known function the compiler might recognize + # as a builtin, so this ends up as a true link test. + # Without a fake prototype, the test would need to + # know the exact argument types, and the has_function + # interface does not provide that level of information. + f.write( + f"""\ +#ifdef __cplusplus +extern "C" +#endif +char {funcname}(void); +""" + ) + f.write( + f"""\ +int main (int argc, char **argv) {{ + {funcname}(); + return 0; +}} +""" + ) + + try: + objects = self.compile([fname], include_dirs=include_dirs) + except CompileError: + return False + finally: + os.remove(fname) + + try: + self.link_executable( + objects, "a.out", libraries=libraries, library_dirs=library_dirs + ) + except (LinkError, TypeError): + return False + else: + os.remove( + self.executable_filename("a.out", output_dir=self.output_dir or '') + ) + finally: + for fn in objects: + os.remove(fn) + return True + + def find_library_file( + self, dirs: Iterable[str], lib: str, debug: bool = False + ) -> str | None: + """Search the specified list of directories for a static or shared + library file 'lib' and return the full path to that file. If + 'debug' true, look for a debugging version (if that makes sense on + the current platform). Return None if 'lib' wasn't found in any of + the specified directories. + """ + raise NotImplementedError + + # -- Filename generation methods ----------------------------------- + + # The default implementation of the filename generating methods are + # prejudiced towards the Unix/DOS/Windows view of the world: + # * object files are named by replacing the source file extension + # (eg. .c/.cpp -> .o/.obj) + # * library files (shared or static) are named by plugging the + # library name and extension into a format string, eg. + # "lib%s.%s" % (lib_name, ".a") for Unix static libraries + # * executables are named by appending an extension (possibly + # empty) to the program name: eg. progname + ".exe" for + # Windows + # + # To reduce redundant code, these methods expect to find + # several attributes in the current object (presumably defined + # as class attributes): + # * src_extensions - + # list of C/C++ source file extensions, eg. ['.c', '.cpp'] + # * obj_extension - + # object file extension, eg. '.o' or '.obj' + # * static_lib_extension - + # extension for static library files, eg. '.a' or '.lib' + # * shared_lib_extension - + # extension for shared library/object files, eg. '.so', '.dll' + # * static_lib_format - + # format string for generating static library filenames, + # eg. 'lib%s.%s' or '%s.%s' + # * shared_lib_format + # format string for generating shared library filenames + # (probably same as static_lib_format, since the extension + # is one of the intended parameters to the format string) + # * exe_extension - + # extension for executable files, eg. '' or '.exe' + + def object_filenames( + self, + source_filenames: Iterable[str | os.PathLike[str]], + strip_dir: bool = False, + output_dir: str | os.PathLike[str] | None = '', + ) -> list[str]: + if output_dir is None: + output_dir = '' + return list( + self._make_out_path(output_dir, strip_dir, src_name) + for src_name in source_filenames + ) + + @property + def out_extensions(self): + return dict.fromkeys(self.src_extensions, self.obj_extension) + + def _make_out_path(self, output_dir, strip_dir, src_name): + return self._make_out_path_exts( + output_dir, strip_dir, src_name, self.out_extensions + ) + + @classmethod + def _make_out_path_exts(cls, output_dir, strip_dir, src_name, extensions): + r""" + >>> exts = {'.c': '.o'} + >>> Compiler._make_out_path_exts('.', False, '/foo/bar.c', exts).replace('\\', '/') + './foo/bar.o' + >>> Compiler._make_out_path_exts('.', True, '/foo/bar.c', exts).replace('\\', '/') + './bar.o' + """ + src = pathlib.PurePath(src_name) + # Ensure base is relative to honor output_dir (python/cpython#37775). + base = cls._make_relative(src) + try: + new_ext = extensions[src.suffix] + except LookupError: + raise UnknownFileType(f"unknown file type '{src.suffix}' (from '{src}')") + if strip_dir: + base = pathlib.PurePath(base.name) + return os.path.join(output_dir, base.with_suffix(new_ext)) + + @staticmethod + def _make_relative(base: pathlib.Path): + return base.relative_to(base.anchor) + + @overload + def shared_object_filename( + self, + basename: str, + strip_dir: Literal[False] = False, + output_dir: str | os.PathLike[str] = "", + ) -> str: ... + @overload + def shared_object_filename( + self, + basename: str | os.PathLike[str], + strip_dir: Literal[True], + output_dir: str | os.PathLike[str] = "", + ) -> str: ... + def shared_object_filename( + self, + basename: str | os.PathLike[str], + strip_dir: bool = False, + output_dir: str | os.PathLike[str] = '', + ) -> str: + assert output_dir is not None + if strip_dir: + basename = os.path.basename(basename) + return os.path.join(output_dir, basename + self.shared_lib_extension) + + @overload + def executable_filename( + self, + basename: str, + strip_dir: Literal[False] = False, + output_dir: str | os.PathLike[str] = "", + ) -> str: ... + @overload + def executable_filename( + self, + basename: str | os.PathLike[str], + strip_dir: Literal[True], + output_dir: str | os.PathLike[str] = "", + ) -> str: ... + def executable_filename( + self, + basename: str | os.PathLike[str], + strip_dir: bool = False, + output_dir: str | os.PathLike[str] = '', + ) -> str: + assert output_dir is not None + if strip_dir: + basename = os.path.basename(basename) + return os.path.join(output_dir, basename + (self.exe_extension or '')) + + def library_filename( + self, + libname: str, + lib_type: str = "static", + strip_dir: bool = False, + output_dir: str | os.PathLike[str] = "", # or 'shared' + ): + assert output_dir is not None + expected = '"static", "shared", "dylib", "xcode_stub"' + if lib_type not in eval(expected): + raise ValueError(f"'lib_type' must be {expected}") + fmt = getattr(self, lib_type + "_lib_format") + ext = getattr(self, lib_type + "_lib_extension") + + dir, base = os.path.split(libname) + filename = fmt % (base, ext) + if strip_dir: + dir = '' + + return os.path.join(output_dir, dir, filename) + + # -- Utility methods ----------------------------------------------- + + def announce(self, msg: object, level: int = 1) -> None: + log.debug(msg) + + def debug_print(self, msg: object) -> None: + from distutils.debug import DEBUG + + if DEBUG: + print(msg) + + def warn(self, msg: object) -> None: + sys.stderr.write(f"warning: {msg}\n") + + def execute( + self, + func: Callable[[Unpack[_Ts]], object], + args: tuple[Unpack[_Ts]], + msg: object = None, + level: int = 1, + ) -> None: + execute(func, args, msg) + + def spawn( + self, cmd: MutableSequence[bytes | str | os.PathLike[str]], **kwargs + ) -> None: + spawn(cmd, **kwargs) + + @overload + def move_file( + self, src: str | os.PathLike[str], dst: _StrPathT + ) -> _StrPathT | str: ... + @overload + def move_file( + self, src: bytes | os.PathLike[bytes], dst: _BytesPathT + ) -> _BytesPathT | bytes: ... + def move_file( + self, + src: str | os.PathLike[str] | bytes | os.PathLike[bytes], + dst: str | os.PathLike[str] | bytes | os.PathLike[bytes], + ) -> str | os.PathLike[str] | bytes | os.PathLike[bytes]: + return move_file(src, dst) + + def mkpath(self, name, mode=0o777): + mkpath(name, mode) + + +# Map a sys.platform/os.name ('posix', 'nt') to the default compiler +# type for that platform. Keys are interpreted as re match +# patterns. Order is important; platform mappings are preferred over +# OS names. +_default_compilers = ( + # Platform string mappings + # on a cygwin built python we can use gcc like an ordinary UNIXish + # compiler + ('cygwin.*', 'unix'), + ('zos', 'zos'), + # OS name mappings + ('posix', 'unix'), + ('nt', 'msvc'), +) + + +def get_default_compiler(osname: str | None = None, platform: str | None = None) -> str: + """Determine the default compiler to use for the given platform. + + osname should be one of the standard Python OS names (i.e. the + ones returned by os.name) and platform the common value + returned by sys.platform for the platform in question. + + The default values are os.name and sys.platform in case the + parameters are not given. + """ + if osname is None: + osname = os.name + if platform is None: + platform = sys.platform + # Mingw is a special case where sys.platform is 'win32' but we + # want to use the 'mingw32' compiler, so check it first + if is_mingw(): + return 'mingw32' + for pattern, compiler in _default_compilers: + if ( + re.match(pattern, platform) is not None + or re.match(pattern, osname) is not None + ): + return compiler + # Default to Unix compiler + return 'unix' + + +# Map compiler types to (module_name, class_name) pairs -- ie. where to +# find the code that implements an interface to this compiler. (The module +# is assumed to be in the 'distutils' package.) +compiler_class = { + 'unix': ('unixccompiler', 'UnixCCompiler', "standard UNIX-style compiler"), + 'msvc': ('_msvccompiler', 'MSVCCompiler', "Microsoft Visual C++"), + 'cygwin': ( + 'cygwinccompiler', + 'CygwinCCompiler', + "Cygwin port of GNU C Compiler for Win32", + ), + 'mingw32': ( + 'cygwinccompiler', + 'Mingw32CCompiler', + "Mingw32 port of GNU C Compiler for Win32", + ), + 'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"), + 'zos': ('zosccompiler', 'zOSCCompiler', 'IBM XL C/C++ Compilers'), +} + + +def show_compilers() -> None: + """Print list of available compilers (used by the "--help-compiler" + options to "build", "build_ext", "build_clib"). + """ + # XXX this "knows" that the compiler option it's describing is + # "--compiler", which just happens to be the case for the three + # commands that use it. + from distutils.fancy_getopt import FancyGetopt + + compilers = sorted( + ("compiler=" + compiler, None, compiler_class[compiler][2]) + for compiler in compiler_class.keys() + ) + pretty_printer = FancyGetopt(compilers) + pretty_printer.print_help("List of available compilers:") + + +def new_compiler( + plat: str | None = None, + compiler: str | None = None, + verbose: bool = False, + force: bool = False, +) -> Compiler: + """Generate an instance of some CCompiler subclass for the supplied + platform/compiler combination. 'plat' defaults to 'os.name' + (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler + for that platform. Currently only 'posix' and 'nt' are supported, and + the default compilers are "traditional Unix interface" (UnixCCompiler + class) and Visual C++ (MSVCCompiler class). Note that it's perfectly + possible to ask for a Unix compiler object under Windows, and a + Microsoft compiler object under Unix -- if you supply a value for + 'compiler', 'plat' is ignored. + """ + if plat is None: + plat = os.name + + try: + if compiler is None: + compiler = get_default_compiler(plat) + + (module_name, class_name, long_description) = compiler_class[compiler] + except KeyError: + msg = f"don't know how to compile C/C++ code on platform '{plat}'" + if compiler is not None: + msg = msg + f" with '{compiler}' compiler" + raise DistutilsPlatformError(msg) + + try: + module_name = "distutils." + module_name + __import__(module_name) + module = sys.modules[module_name] + klass = vars(module)[class_name] + except ImportError: + raise DistutilsModuleError( + f"can't compile C/C++ code: unable to load module '{module_name}'" + ) + except KeyError: + raise DistutilsModuleError( + f"can't compile C/C++ code: unable to find class '{class_name}' " + f"in module '{module_name}'" + ) + + # XXX The None is necessary to preserve backwards compatibility + # with classes that expect verbose to be the first positional + # argument. + return klass(None, force=force) + + +def gen_preprocess_options( + macros: Iterable[_Macro], include_dirs: Iterable[str] +) -> list[str]: + """Generate C pre-processor options (-D, -U, -I) as used by at least + two types of compilers: the typical Unix compiler and Visual C++. + 'macros' is the usual thing, a list of 1- or 2-tuples, where (name,) + means undefine (-U) macro 'name', and (name,value) means define (-D) + macro 'name' to 'value'. 'include_dirs' is just a list of directory + names to be added to the header file search path (-I). Returns a list + of command-line options suitable for either Unix compilers or Visual + C++. + """ + # XXX it would be nice (mainly aesthetic, and so we don't generate + # stupid-looking command lines) to go over 'macros' and eliminate + # redundant definitions/undefinitions (ie. ensure that only the + # latest mention of a particular macro winds up on the command + # line). I don't think it's essential, though, since most (all?) + # Unix C compilers only pay attention to the latest -D or -U + # mention of a macro on their command line. Similar situation for + # 'include_dirs'. I'm punting on both for now. Anyways, weeding out + # redundancies like this should probably be the province of + # CCompiler, since the data structures used are inherited from it + # and therefore common to all CCompiler classes. + pp_opts = [] + for macro in macros: + if not (isinstance(macro, tuple) and 1 <= len(macro) <= 2): + raise TypeError( + f"bad macro definition '{macro}': " + "each element of 'macros' list must be a 1- or 2-tuple" + ) + + if len(macro) == 1: # undefine this macro + pp_opts.append(f"-U{macro[0]}") + elif len(macro) == 2: + if macro[1] is None: # define with no explicit value + pp_opts.append(f"-D{macro[0]}") + else: + # XXX *don't* need to be clever about quoting the + # macro value here, because we're going to avoid the + # shell at all costs when we spawn the command! + pp_opts.append("-D{}={}".format(*macro)) + + pp_opts.extend(f"-I{dir}" for dir in include_dirs) + return pp_opts + + +def gen_lib_options( + compiler: Compiler, + library_dirs: Iterable[str], + runtime_library_dirs: Iterable[str], + libraries: Iterable[str], +) -> list[str]: + """Generate linker options for searching library directories and + linking with specific libraries. 'libraries' and 'library_dirs' are, + respectively, lists of library names (not filenames!) and search + directories. Returns a list of command-line options suitable for use + with some compiler (depending on the two format strings passed in). + """ + lib_opts = [compiler.library_dir_option(dir) for dir in library_dirs] + + for dir in runtime_library_dirs: + lib_opts.extend(always_iterable(compiler.runtime_library_dir_option(dir))) + + # XXX it's important that we *not* remove redundant library mentions! + # sometimes you really do have to say "-lfoo -lbar -lfoo" in order to + # resolve all symbols. I just hope we never have to say "-lfoo obj.o + # -lbar" to get things to work -- that's certainly a possibility, but a + # pretty nasty way to arrange your C code. + + for lib in libraries: + (lib_dir, lib_name) = os.path.split(lib) + if lib_dir: + lib_file = compiler.find_library_file([lib_dir], lib_name) + if lib_file: + lib_opts.append(lib_file) + else: + compiler.warn( + f"no library file corresponding to '{lib}' found (skipping)" + ) + else: + lib_opts.append(compiler.library_option(lib)) + return lib_opts diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/cygwin.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/cygwin.py new file mode 100644 index 0000000000000000000000000000000000000000..f349e9decd083ad60a9b9d1181b57e1bbcce2c98 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/cygwin.py @@ -0,0 +1,340 @@ +"""distutils.cygwinccompiler + +Provides the CygwinCCompiler class, a subclass of UnixCCompiler that +handles the Cygwin port of the GNU C compiler to Windows. It also contains +the Mingw32CCompiler class which handles the mingw32 port of GCC (same as +cygwin in no-cygwin mode). +""" + +import copy +import os +import pathlib +import shlex +import sys +import warnings +from subprocess import check_output + +from ...errors import ( + DistutilsExecError, + DistutilsPlatformError, +) +from ...file_util import write_file +from ...sysconfig import get_config_vars +from ...version import LooseVersion, suppress_known_deprecation +from . import unix +from .errors import ( + CompileError, + Error, +) + + +def get_msvcr(): + """No longer needed, but kept for backward compatibility.""" + return [] + + +_runtime_library_dirs_msg = ( + "Unable to set runtime library search path on Windows, " + "usually indicated by `runtime_library_dirs` parameter to Extension" +) + + +class Compiler(unix.Compiler): + """Handles the Cygwin port of the GNU C compiler to Windows.""" + + compiler_type = 'cygwin' + obj_extension = ".o" + static_lib_extension = ".a" + shared_lib_extension = ".dll.a" + dylib_lib_extension = ".dll" + static_lib_format = "lib%s%s" + shared_lib_format = "lib%s%s" + dylib_lib_format = "cyg%s%s" + exe_extension = ".exe" + + def __init__(self, verbose=False, force=False): + super().__init__(verbose, force=force) + + status, details = check_config_h() + self.debug_print(f"Python's GCC status: {status} (details: {details})") + if status is not CONFIG_H_OK: + self.warn( + "Python's pyconfig.h doesn't seem to support your compiler. " + f"Reason: {details}. " + "Compiling may fail because of undefined preprocessor macros." + ) + + self.cc, self.cxx = get_config_vars('CC', 'CXX') + + # Override 'CC' and 'CXX' environment variables for + # building using MINGW compiler for MSVC python. + self.cc = os.environ.get('CC', self.cc or 'gcc') + self.cxx = os.environ.get('CXX', self.cxx or 'g++') + + self.linker_dll = self.cc + self.linker_dll_cxx = self.cxx + shared_option = "-shared" + + self.set_executables( + compiler=f'{self.cc} -mcygwin -O -Wall', + compiler_so=f'{self.cc} -mcygwin -mdll -O -Wall', + compiler_cxx=f'{self.cxx} -mcygwin -O -Wall', + compiler_so_cxx=f'{self.cxx} -mcygwin -mdll -O -Wall', + linker_exe=f'{self.cc} -mcygwin', + linker_so=f'{self.linker_dll} -mcygwin {shared_option}', + linker_exe_cxx=f'{self.cxx} -mcygwin', + linker_so_cxx=f'{self.linker_dll_cxx} -mcygwin {shared_option}', + ) + + self.dll_libraries = get_msvcr() + + @property + def gcc_version(self): + # Older numpy depended on this existing to check for ancient + # gcc versions. This doesn't make much sense with clang etc so + # just hardcode to something recent. + # https://github.com/numpy/numpy/pull/20333 + warnings.warn( + "gcc_version attribute of CygwinCCompiler is deprecated. " + "Instead of returning actual gcc version a fixed value 11.2.0 is returned.", + DeprecationWarning, + stacklevel=2, + ) + with suppress_known_deprecation(): + return LooseVersion("11.2.0") + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + """Compiles the source by spawning GCC and windres if needed.""" + if ext in ('.rc', '.res'): + # gcc needs '.res' and '.rc' compiled to object files !!! + try: + self.spawn(["windres", "-i", src, "-o", obj]) + except DistutilsExecError as msg: + raise CompileError(msg) + else: # for other files use the C-compiler + try: + if self.detect_language(src) == 'c++': + self.spawn( + self.compiler_so_cxx + + cc_args + + [src, '-o', obj] + + extra_postargs + ) + else: + self.spawn( + self.compiler_so + cc_args + [src, '-o', obj] + extra_postargs + ) + except DistutilsExecError as msg: + raise CompileError(msg) + + def link( + self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=False, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None, + ): + """Link the objects.""" + # use separate copies, so we can modify the lists + extra_preargs = copy.copy(extra_preargs or []) + libraries = copy.copy(libraries or []) + objects = copy.copy(objects or []) + + if runtime_library_dirs: + self.warn(_runtime_library_dirs_msg) + + # Additional libraries + libraries.extend(self.dll_libraries) + + # handle export symbols by creating a def-file + # with executables this only works with gcc/ld as linker + if (export_symbols is not None) and ( + target_desc != self.EXECUTABLE or self.linker_dll == "gcc" + ): + # (The linker doesn't do anything if output is up-to-date. + # So it would probably better to check if we really need this, + # but for this we had to insert some unchanged parts of + # UnixCCompiler, and this is not what we want.) + + # we want to put some files in the same directory as the + # object files are, build_temp doesn't help much + # where are the object files + temp_dir = os.path.dirname(objects[0]) + # name of dll to give the helper files the same base name + (dll_name, dll_extension) = os.path.splitext( + os.path.basename(output_filename) + ) + + # generate the filenames for these files + def_file = os.path.join(temp_dir, dll_name + ".def") + + # Generate .def file + contents = [f"LIBRARY {os.path.basename(output_filename)}", "EXPORTS"] + contents.extend(export_symbols) + self.execute(write_file, (def_file, contents), f"writing {def_file}") + + # next add options for def-file + + # for gcc/ld the def-file is specified as any object files + objects.append(def_file) + + # end: if ((export_symbols is not None) and + # (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")): + + # who wants symbols and a many times larger output file + # should explicitly switch the debug mode on + # otherwise we let ld strip the output file + # (On my machine: 10KiB < stripped_file < ??100KiB + # unstripped_file = stripped_file + XXX KiB + # ( XXX=254 for a typical python extension)) + if not debug: + extra_preargs.append("-s") + + super().link( + target_desc, + objects, + output_filename, + output_dir, + libraries, + library_dirs, + runtime_library_dirs, + None, # export_symbols, we do this in our def-file + debug, + extra_preargs, + extra_postargs, + build_temp, + target_lang, + ) + + def runtime_library_dir_option(self, dir): + # cygwin doesn't support rpath. While in theory we could error + # out like MSVC does, code might expect it to work like on Unix, so + # just warn and hope for the best. + self.warn(_runtime_library_dirs_msg) + return [] + + # -- Miscellaneous methods ----------------------------------------- + + def _make_out_path(self, output_dir, strip_dir, src_name): + # use normcase to make sure '.rc' is really '.rc' and not '.RC' + norm_src_name = os.path.normcase(src_name) + return super()._make_out_path(output_dir, strip_dir, norm_src_name) + + @property + def out_extensions(self): + """ + Add support for rc and res files. + """ + return { + **super().out_extensions, + **{ext: ext + self.obj_extension for ext in ('.res', '.rc')}, + } + + +# the same as cygwin plus some additional parameters +class MinGW32Compiler(Compiler): + """Handles the Mingw32 port of the GNU C compiler to Windows.""" + + compiler_type = 'mingw32' + + def __init__(self, verbose=False, force=False): + super().__init__(verbose, force) + + shared_option = "-shared" + + if is_cygwincc(self.cc): + raise Error('Cygwin gcc cannot be used with --compiler=mingw32') + + self.set_executables( + compiler=f'{self.cc} -O -Wall', + compiler_so=f'{self.cc} -shared -O -Wall', + compiler_so_cxx=f'{self.cxx} -shared -O -Wall', + compiler_cxx=f'{self.cxx} -O -Wall', + linker_exe=f'{self.cc}', + linker_so=f'{self.linker_dll} {shared_option}', + linker_exe_cxx=f'{self.cxx}', + linker_so_cxx=f'{self.linker_dll_cxx} {shared_option}', + ) + + def runtime_library_dir_option(self, dir): + raise DistutilsPlatformError(_runtime_library_dirs_msg) + + +# Because these compilers aren't configured in Python's pyconfig.h file by +# default, we should at least warn the user if he is using an unmodified +# version. + +CONFIG_H_OK = "ok" +CONFIG_H_NOTOK = "not ok" +CONFIG_H_UNCERTAIN = "uncertain" + + +def check_config_h(): + """Check if the current Python installation appears amenable to building + extensions with GCC. + + Returns a tuple (status, details), where 'status' is one of the following + constants: + + - CONFIG_H_OK: all is well, go ahead and compile + - CONFIG_H_NOTOK: doesn't look good + - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h + + 'details' is a human-readable string explaining the situation. + + Note there are two ways to conclude "OK": either 'sys.version' contains + the string "GCC" (implying that this Python was built with GCC), or the + installed "pyconfig.h" contains the string "__GNUC__". + """ + + # XXX since this function also checks sys.version, it's not strictly a + # "pyconfig.h" check -- should probably be renamed... + + from distutils import sysconfig + + # if sys.version contains GCC then python was compiled with GCC, and the + # pyconfig.h file should be OK + if "GCC" in sys.version: + return CONFIG_H_OK, "sys.version mentions 'GCC'" + + # Clang would also work + if "Clang" in sys.version: + return CONFIG_H_OK, "sys.version mentions 'Clang'" + + # let's see if __GNUC__ is mentioned in python.h + fn = sysconfig.get_config_h_filename() + try: + config_h = pathlib.Path(fn).read_text(encoding='utf-8') + except OSError as exc: + return (CONFIG_H_UNCERTAIN, f"couldn't read '{fn}': {exc.strerror}") + else: + substring = '__GNUC__' + if substring in config_h: + code = CONFIG_H_OK + mention_inflected = 'mentions' + else: + code = CONFIG_H_NOTOK + mention_inflected = 'does not mention' + return code, f"{fn!r} {mention_inflected} {substring!r}" + + +def is_cygwincc(cc): + """Try to determine if the compiler that would be used is from cygwin.""" + out_string = check_output(shlex.split(cc) + ['-dumpmachine']) + return out_string.strip().endswith(b'cygwin') + + +get_versions = None +""" +A stand-in for the previous get_versions() function to prevent failures +when monkeypatched. See pypa/setuptools#2969. +""" diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/errors.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/errors.py new file mode 100644 index 0000000000000000000000000000000000000000..01328592b2dad80f4d16c55cd9db9829b3c650f1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/errors.py @@ -0,0 +1,24 @@ +class Error(Exception): + """Some compile/link operation failed.""" + + +class PreprocessError(Error): + """Failure to preprocess one or more C/C++ files.""" + + +class CompileError(Error): + """Failure to compile one or more C/C++ source files.""" + + +class LibError(Error): + """Failure to create a static library from one or more C/C++ object + files.""" + + +class LinkError(Error): + """Failure to link one or more C/C++ object files into an executable + or shared library file.""" + + +class UnknownFileType(Error): + """Attempt to process an unknown file type.""" diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py new file mode 100644 index 0000000000000000000000000000000000000000..1f50fa50880e02ea7adf64e94a234af25f8284c7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py @@ -0,0 +1,614 @@ +"""distutils._msvccompiler + +Contains MSVCCompiler, an implementation of the abstract CCompiler class +for Microsoft Visual Studio 2015. + +This module requires VS 2015 or later. +""" + +# Written by Perry Stoll +# hacked by Robin Becker and Thomas Heller to do a better job of +# finding DevStudio (through the registry) +# ported to VS 2005 and VS 2008 by Christian Heimes +# ported to VS 2015 by Steve Dower +from __future__ import annotations + +import contextlib +import os +import subprocess +import unittest.mock as mock +import warnings +from collections.abc import Iterable + +with contextlib.suppress(ImportError): + import winreg + +from itertools import count + +from ..._log import log +from ...errors import ( + DistutilsExecError, + DistutilsPlatformError, +) +from ...util import get_host_platform, get_platform +from . import base +from .base import gen_lib_options +from .errors import ( + CompileError, + LibError, + LinkError, +) + + +def _find_vc2015(): + try: + key = winreg.OpenKeyEx( + winreg.HKEY_LOCAL_MACHINE, + r"Software\Microsoft\VisualStudio\SxS\VC7", + access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY, + ) + except OSError: + log.debug("Visual C++ is not registered") + return None, None + + best_version = 0 + best_dir = None + with key: + for i in count(): + try: + v, vc_dir, vt = winreg.EnumValue(key, i) + except OSError: + break + if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir): + try: + version = int(float(v)) + except (ValueError, TypeError): + continue + if version >= 14 and version > best_version: + best_version, best_dir = version, vc_dir + return best_version, best_dir + + +def _find_vc2017(): + """Returns "15, path" based on the result of invoking vswhere.exe + If no install is found, returns "None, None" + + The version is returned to avoid unnecessarily changing the function + result. It may be ignored when the path is not None. + + If vswhere.exe is not available, by definition, VS 2017 is not + installed. + """ + root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles") + if not root: + return None, None + + variant = 'arm64' if get_platform() == 'win-arm64' else 'x86.x64' + suitable_components = ( + f"Microsoft.VisualStudio.Component.VC.Tools.{variant}", + "Microsoft.VisualStudio.Workload.WDExpress", + ) + + for component in suitable_components: + # Workaround for `-requiresAny` (only available on VS 2017 > 15.6) + with contextlib.suppress( + subprocess.CalledProcessError, OSError, UnicodeDecodeError + ): + path = ( + subprocess.check_output([ + os.path.join( + root, "Microsoft Visual Studio", "Installer", "vswhere.exe" + ), + "-latest", + "-prerelease", + "-requires", + component, + "-property", + "installationPath", + "-products", + "*", + ]) + .decode(encoding="mbcs", errors="strict") + .strip() + ) + + path = os.path.join(path, "VC", "Auxiliary", "Build") + if os.path.isdir(path): + return 15, path + + return None, None # no suitable component found + + +PLAT_SPEC_TO_RUNTIME = { + 'x86': 'x86', + 'x86_amd64': 'x64', + 'x86_arm': 'arm', + 'x86_arm64': 'arm64', +} + + +def _find_vcvarsall(plat_spec): + # bpo-38597: Removed vcruntime return value + _, best_dir = _find_vc2017() + + if not best_dir: + best_version, best_dir = _find_vc2015() + + if not best_dir: + log.debug("No suitable Visual C++ version found") + return None, None + + vcvarsall = os.path.join(best_dir, "vcvarsall.bat") + if not os.path.isfile(vcvarsall): + log.debug("%s cannot be found", vcvarsall) + return None, None + + return vcvarsall, None + + +def _get_vc_env(plat_spec): + if os.getenv("DISTUTILS_USE_SDK"): + return {key.lower(): value for key, value in os.environ.items()} + + vcvarsall, _ = _find_vcvarsall(plat_spec) + if not vcvarsall: + raise DistutilsPlatformError( + 'Microsoft Visual C++ 14.0 or greater is required. ' + 'Get it with "Microsoft C++ Build Tools": ' + 'https://visualstudio.microsoft.com/visual-cpp-build-tools/' + ) + + try: + out = subprocess.check_output( + f'cmd /u /c "{vcvarsall}" {plat_spec} && set', + stderr=subprocess.STDOUT, + ).decode('utf-16le', errors='replace') + except subprocess.CalledProcessError as exc: + log.error(exc.output) + raise DistutilsPlatformError(f"Error executing {exc.cmd}") + + env = { + key.lower(): value + for key, _, value in (line.partition('=') for line in out.splitlines()) + if key and value + } + + return env + + +def _find_exe(exe, paths=None): + """Return path to an MSVC executable program. + + Tries to find the program in several places: first, one of the + MSVC program search paths from the registry; next, the directories + in the PATH environment variable. If any of those work, return an + absolute path that is known to exist. If none of them work, just + return the original program name, 'exe'. + """ + if not paths: + paths = os.getenv('path').split(os.pathsep) + for p in paths: + fn = os.path.join(os.path.abspath(p), exe) + if os.path.isfile(fn): + return fn + return exe + + +_vcvars_names = { + 'win32': 'x86', + 'win-amd64': 'amd64', + 'win-arm32': 'arm', + 'win-arm64': 'arm64', +} + + +def _get_vcvars_spec(host_platform, platform): + """ + Given a host platform and platform, determine the spec for vcvarsall. + + Uses the native MSVC host if the host platform would need expensive + emulation for x86. + + >>> _get_vcvars_spec('win-arm64', 'win32') + 'arm64_x86' + >>> _get_vcvars_spec('win-arm64', 'win-amd64') + 'arm64_amd64' + + Otherwise, always cross-compile from x86 to work with the + lighter-weight MSVC installs that do not include native 64-bit tools. + + >>> _get_vcvars_spec('win32', 'win32') + 'x86' + >>> _get_vcvars_spec('win-arm32', 'win-arm32') + 'x86_arm' + >>> _get_vcvars_spec('win-amd64', 'win-arm64') + 'x86_arm64' + """ + if host_platform != 'win-arm64': + host_platform = 'win32' + vc_hp = _vcvars_names[host_platform] + vc_plat = _vcvars_names[platform] + return vc_hp if vc_hp == vc_plat else f'{vc_hp}_{vc_plat}' + + +class Compiler(base.Compiler): + """Concrete class that implements an interface to Microsoft Visual C++, + as defined by the CCompiler abstract class.""" + + compiler_type = 'msvc' + + # Just set this so CCompiler's constructor doesn't barf. We currently + # don't use the 'set_executables()' bureaucracy provided by CCompiler, + # as it really isn't necessary for this sort of single-compiler class. + # Would be nice to have a consistent interface with UnixCCompiler, + # though, so it's worth thinking about. + executables = {} + + # Private class data (need to distinguish C from C++ source for compiler) + _c_extensions = ['.c'] + _cpp_extensions = ['.cc', '.cpp', '.cxx'] + _rc_extensions = ['.rc'] + _mc_extensions = ['.mc'] + + # Needed for the filename generation methods provided by the + # base class, CCompiler. + src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions + res_extension = '.res' + obj_extension = '.obj' + static_lib_extension = '.lib' + shared_lib_extension = '.dll' + static_lib_format = shared_lib_format = '%s%s' + exe_extension = '.exe' + + def __init__(self, verbose=False, force=False) -> None: + super().__init__(verbose, force=force) + # target platform (.plat_name is consistent with 'bdist') + self.plat_name = None + self.initialized = False + + @classmethod + def _configure(cls, vc_env): + """ + Set class-level include/lib dirs. + """ + cls.include_dirs = cls._parse_path(vc_env.get('include', '')) + cls.library_dirs = cls._parse_path(vc_env.get('lib', '')) + + @staticmethod + def _parse_path(val): + return [dir.rstrip(os.sep) for dir in val.split(os.pathsep) if dir] + + def initialize(self, plat_name: str | None = None) -> None: + # multi-init means we would need to check platform same each time... + assert not self.initialized, "don't init multiple times" + if plat_name is None: + plat_name = get_platform() + # sanity check for platforms to prevent obscure errors later. + if plat_name not in _vcvars_names: + raise DistutilsPlatformError( + f"--plat-name must be one of {tuple(_vcvars_names)}" + ) + + plat_spec = _get_vcvars_spec(get_host_platform(), plat_name) + + vc_env = _get_vc_env(plat_spec) + if not vc_env: + raise DistutilsPlatformError( + "Unable to find a compatible Visual Studio installation." + ) + self._configure(vc_env) + + self._paths = vc_env.get('path', '') + paths = self._paths.split(os.pathsep) + self.cc = _find_exe("cl.exe", paths) + self.linker = _find_exe("link.exe", paths) + self.lib = _find_exe("lib.exe", paths) + self.rc = _find_exe("rc.exe", paths) # resource compiler + self.mc = _find_exe("mc.exe", paths) # message compiler + self.mt = _find_exe("mt.exe", paths) # message compiler + + self.preprocess_options = None + # bpo-38597: Always compile with dynamic linking + # Future releases of Python 3.x will include all past + # versions of vcruntime*.dll for compatibility. + self.compile_options = ['/nologo', '/O2', '/W3', '/GL', '/DNDEBUG', '/MD'] + + self.compile_options_debug = [ + '/nologo', + '/Od', + '/MDd', + '/Zi', + '/W3', + '/D_DEBUG', + ] + + ldflags = ['/nologo', '/INCREMENTAL:NO', '/LTCG'] + + ldflags_debug = ['/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL'] + + self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1'] + self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1'] + self.ldflags_shared = [ + *ldflags, + '/DLL', + '/MANIFEST:EMBED,ID=2', + '/MANIFESTUAC:NO', + ] + self.ldflags_shared_debug = [ + *ldflags_debug, + '/DLL', + '/MANIFEST:EMBED,ID=2', + '/MANIFESTUAC:NO', + ] + self.ldflags_static = [*ldflags] + self.ldflags_static_debug = [*ldflags_debug] + + self._ldflags = { + (base.Compiler.EXECUTABLE, None): self.ldflags_exe, + (base.Compiler.EXECUTABLE, False): self.ldflags_exe, + (base.Compiler.EXECUTABLE, True): self.ldflags_exe_debug, + (base.Compiler.SHARED_OBJECT, None): self.ldflags_shared, + (base.Compiler.SHARED_OBJECT, False): self.ldflags_shared, + (base.Compiler.SHARED_OBJECT, True): self.ldflags_shared_debug, + (base.Compiler.SHARED_LIBRARY, None): self.ldflags_static, + (base.Compiler.SHARED_LIBRARY, False): self.ldflags_static, + (base.Compiler.SHARED_LIBRARY, True): self.ldflags_static_debug, + } + + self.initialized = True + + # -- Worker methods ------------------------------------------------ + + @property + def out_extensions(self) -> dict[str, str]: + return { + **super().out_extensions, + **{ + ext: self.res_extension + for ext in self._rc_extensions + self._mc_extensions + }, + } + + def compile( # noqa: C901 + self, + sources, + output_dir=None, + macros=None, + include_dirs=None, + debug=False, + extra_preargs=None, + extra_postargs=None, + depends=None, + ): + if not self.initialized: + self.initialize() + compile_info = self._setup_compile( + output_dir, macros, include_dirs, sources, depends, extra_postargs + ) + macros, objects, extra_postargs, pp_opts, build = compile_info + + compile_opts = extra_preargs or [] + compile_opts.append('/c') + if debug: + compile_opts.extend(self.compile_options_debug) + else: + compile_opts.extend(self.compile_options) + + add_cpp_opts = False + + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue + if debug: + # pass the full pathname to MSVC in debug mode, + # this allows the debugger to find the source file + # without asking the user to browse for it + src = os.path.abspath(src) + + if ext in self._c_extensions: + input_opt = f"/Tc{src}" + elif ext in self._cpp_extensions: + input_opt = f"/Tp{src}" + add_cpp_opts = True + elif ext in self._rc_extensions: + # compile .RC to .RES file + input_opt = src + output_opt = "/fo" + obj + try: + self.spawn([self.rc] + pp_opts + [output_opt, input_opt]) + except DistutilsExecError as msg: + raise CompileError(msg) + continue + elif ext in self._mc_extensions: + # Compile .MC to .RC file to .RES file. + # * '-h dir' specifies the directory for the + # generated include file + # * '-r dir' specifies the target directory of the + # generated RC file and the binary message resource + # it includes + # + # For now (since there are no options to change this), + # we use the source-directory for the include file and + # the build directory for the RC file and message + # resources. This works at least for win32all. + h_dir = os.path.dirname(src) + rc_dir = os.path.dirname(obj) + try: + # first compile .MC to .RC and .H file + self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src]) + base, _ = os.path.splitext(os.path.basename(src)) + rc_file = os.path.join(rc_dir, base + '.rc') + # then compile .RC to .RES file + self.spawn([self.rc, "/fo" + obj, rc_file]) + + except DistutilsExecError as msg: + raise CompileError(msg) + continue + else: + # how to handle this file? + raise CompileError(f"Don't know how to compile {src} to {obj}") + + args = [self.cc] + compile_opts + pp_opts + if add_cpp_opts: + args.append('/EHsc') + args.extend((input_opt, "/Fo" + obj)) + args.extend(extra_postargs) + + try: + self.spawn(args) + except DistutilsExecError as msg: + raise CompileError(msg) + + return objects + + def create_static_lib( + self, + objects: list[str] | tuple[str, ...], + output_libname: str, + output_dir: str | None = None, + debug: bool = False, + target_lang: str | None = None, + ) -> None: + if not self.initialized: + self.initialize() + objects, output_dir = self._fix_object_args(objects, output_dir) + output_filename = self.library_filename(output_libname, output_dir=output_dir) + + if self._need_link(objects, output_filename): + lib_args = objects + ['/OUT:' + output_filename] + if debug: + pass # XXX what goes here? + try: + log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args)) + self.spawn([self.lib] + lib_args) + except DistutilsExecError as msg: + raise LibError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + def link( + self, + target_desc: str, + objects: list[str] | tuple[str, ...], + output_filename: str, + output_dir: str | None = None, + libraries: list[str] | tuple[str, ...] | None = None, + library_dirs: list[str] | tuple[str, ...] | None = None, + runtime_library_dirs: list[str] | tuple[str, ...] | None = None, + export_symbols: Iterable[str] | None = None, + debug: bool = False, + extra_preargs: list[str] | None = None, + extra_postargs: Iterable[str] | None = None, + build_temp: str | os.PathLike[str] | None = None, + target_lang: str | None = None, + ) -> None: + if not self.initialized: + self.initialize() + objects, output_dir = self._fix_object_args(objects, output_dir) + fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) + libraries, library_dirs, runtime_library_dirs = fixed_args + + if runtime_library_dirs: + self.warn( + "I don't know what to do with 'runtime_library_dirs': " + + str(runtime_library_dirs) + ) + + lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) + if output_dir is not None: + output_filename = os.path.join(output_dir, output_filename) + + if self._need_link(objects, output_filename): + ldflags = self._ldflags[target_desc, debug] + + export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])] + + ld_args = ( + ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename] + ) + + # The MSVC linker generates .lib and .exp files, which cannot be + # suppressed by any linker switches. The .lib files may even be + # needed! Make sure they are generated in the temporary build + # directory. Since they have different names for debug and release + # builds, they can go into the same directory. + build_temp = os.path.dirname(objects[0]) + if export_symbols is not None: + (dll_name, dll_ext) = os.path.splitext( + os.path.basename(output_filename) + ) + implib_file = os.path.join(build_temp, self.library_filename(dll_name)) + ld_args.append('/IMPLIB:' + implib_file) + + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend(extra_postargs) + + output_dir = os.path.dirname(os.path.abspath(output_filename)) + self.mkpath(output_dir) + try: + log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args)) + self.spawn([self.linker] + ld_args) + except DistutilsExecError as msg: + raise LinkError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + def spawn(self, cmd): + env = dict(os.environ, PATH=self._paths) + with self._fallback_spawn(cmd, env) as fallback: + return super().spawn(cmd, env=env) + return fallback.value + + @contextlib.contextmanager + def _fallback_spawn(self, cmd, env): + """ + Discovered in pypa/distutils#15, some tools monkeypatch the compiler, + so the 'env' kwarg causes a TypeError. Detect this condition and + restore the legacy, unsafe behavior. + """ + bag = type('Bag', (), {})() + try: + yield bag + except TypeError as exc: + if "unexpected keyword argument 'env'" not in str(exc): + raise + else: + return + warnings.warn("Fallback spawn triggered. Please update distutils monkeypatch.") + with mock.patch.dict('os.environ', env): + bag.value = super().spawn(cmd) + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. + + def library_dir_option(self, dir): + return "/LIBPATH:" + dir + + def runtime_library_dir_option(self, dir): + raise DistutilsPlatformError( + "don't know how to set runtime library search path for MSVC" + ) + + def library_option(self, lib): + return self.library_filename(lib) + + def find_library_file(self, dirs, lib, debug=False): + # Prefer a debugging library if found (and requested), but deal + # with it if we don't have one. + if debug: + try_names = [lib + "_d", lib] + else: + try_names = [lib] + for dir in dirs: + for name in try_names: + libfile = os.path.join(dir, self.library_filename(name)) + if os.path.isfile(libfile): + return libfile + else: + # Oops, didn't find it in *any* of 'dirs' + return None diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/__pycache__/test_base.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/__pycache__/test_base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c7dd50b6fb458ee6f337dae9248b951af685efa6 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/__pycache__/test_base.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_base.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_base.py new file mode 100644 index 0000000000000000000000000000000000000000..a762e2b649d7977ef42f4d35854eab26bd54e9e7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_base.py @@ -0,0 +1,83 @@ +import platform +import sysconfig +import textwrap + +import pytest + +from .. import base + +pytestmark = pytest.mark.usefixtures('suppress_path_mangle') + + +@pytest.fixture +def c_file(tmp_path): + c_file = tmp_path / 'foo.c' + gen_headers = ('Python.h',) + is_windows = platform.system() == "Windows" + plat_headers = ('windows.h',) * is_windows + all_headers = gen_headers + plat_headers + headers = '\n'.join(f'#include <{header}>\n' for header in all_headers) + payload = ( + textwrap.dedent( + """ + #headers + void PyInit_foo(void) {} + """ + ) + .lstrip() + .replace('#headers', headers) + ) + c_file.write_text(payload, encoding='utf-8') + return c_file + + +def test_set_include_dirs(c_file): + """ + Extensions should build even if set_include_dirs is invoked. + In particular, compiler-specific paths should not be overridden. + """ + compiler = base.new_compiler() + python = sysconfig.get_paths()['include'] + compiler.set_include_dirs([python]) + compiler.compile([c_file]) + + # do it again, setting include dirs after any initialization + compiler.set_include_dirs([python]) + compiler.compile([c_file]) + + +def test_has_function_prototype(): + # Issue https://github.com/pypa/setuptools/issues/3648 + # Test prototype-generating behavior. + + compiler = base.new_compiler() + + # Every C implementation should have these. + assert compiler.has_function('abort') + assert compiler.has_function('exit') + with pytest.deprecated_call(match='includes is deprecated'): + # abort() is a valid expression with the prototype. + assert compiler.has_function('abort', includes=['stdlib.h']) + with pytest.deprecated_call(match='includes is deprecated'): + # But exit() is not valid with the actual prototype in scope. + assert not compiler.has_function('exit', includes=['stdlib.h']) + # And setuptools_does_not_exist is not declared or defined at all. + assert not compiler.has_function('setuptools_does_not_exist') + with pytest.deprecated_call(match='includes is deprecated'): + assert not compiler.has_function( + 'setuptools_does_not_exist', includes=['stdio.h'] + ) + + +def test_include_dirs_after_multiple_compile_calls(c_file): + """ + Calling compile multiple times should not change the include dirs + (regression test for setuptools issue #3591). + """ + compiler = base.new_compiler() + python = sysconfig.get_paths()['include'] + compiler.set_include_dirs([python]) + compiler.compile([c_file]) + assert compiler.include_dirs == [python] + compiler.compile([c_file]) + assert compiler.include_dirs == [python] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_cygwin.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_cygwin.py new file mode 100644 index 0000000000000000000000000000000000000000..9adf6b8ebf165b4fe92a52d8a14aed21aebba539 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_cygwin.py @@ -0,0 +1,76 @@ +"""Tests for distutils.cygwinccompiler.""" + +import os +import sys +from distutils import sysconfig +from distutils.tests import support + +import pytest + +from .. import cygwin + + +@pytest.fixture(autouse=True) +def stuff(request, monkeypatch, distutils_managed_tempdir): + self = request.instance + self.python_h = os.path.join(self.mkdtemp(), 'python.h') + monkeypatch.setattr(sysconfig, 'get_config_h_filename', self._get_config_h_filename) + monkeypatch.setattr(sys, 'version', sys.version) + + +class TestCygwinCCompiler(support.TempdirManager): + def _get_config_h_filename(self): + return self.python_h + + @pytest.mark.skipif('sys.platform != "cygwin"') + @pytest.mark.skipif('not os.path.exists("/usr/lib/libbash.dll.a")') + def test_find_library_file(self): + from distutils.cygwinccompiler import CygwinCCompiler + + compiler = CygwinCCompiler() + link_name = "bash" + linkable_file = compiler.find_library_file(["/usr/lib"], link_name) + assert linkable_file is not None + assert os.path.exists(linkable_file) + assert linkable_file == f"/usr/lib/lib{link_name:s}.dll.a" + + @pytest.mark.skipif('sys.platform != "cygwin"') + def test_runtime_library_dir_option(self): + from distutils.cygwinccompiler import CygwinCCompiler + + compiler = CygwinCCompiler() + assert compiler.runtime_library_dir_option('/foo') == [] + + def test_check_config_h(self): + # check_config_h looks for "GCC" in sys.version first + # returns CONFIG_H_OK if found + sys.version = ( + '2.6.1 (r261:67515, Dec 6 2008, 16:42:21) \n[GCC ' + '4.0.1 (Apple Computer, Inc. build 5370)]' + ) + + assert cygwin.check_config_h()[0] == cygwin.CONFIG_H_OK + + # then it tries to see if it can find "__GNUC__" in pyconfig.h + sys.version = 'something without the *CC word' + + # if the file doesn't exist it returns CONFIG_H_UNCERTAIN + assert cygwin.check_config_h()[0] == cygwin.CONFIG_H_UNCERTAIN + + # if it exists but does not contain __GNUC__, it returns CONFIG_H_NOTOK + self.write_file(self.python_h, 'xxx') + assert cygwin.check_config_h()[0] == cygwin.CONFIG_H_NOTOK + + # and CONFIG_H_OK if __GNUC__ is found + self.write_file(self.python_h, 'xxx __GNUC__ xxx') + assert cygwin.check_config_h()[0] == cygwin.CONFIG_H_OK + + def test_get_msvcr(self): + assert cygwin.get_msvcr() == [] + + @pytest.mark.skipif('sys.platform != "cygwin"') + def test_dll_libraries_not_none(self): + from distutils.cygwinccompiler import CygwinCCompiler + + compiler = CygwinCCompiler() + assert compiler.dll_libraries is not None diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_mingw.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_mingw.py new file mode 100644 index 0000000000000000000000000000000000000000..dc45687a917808edbf692ced18b0c99183d21e2d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_mingw.py @@ -0,0 +1,48 @@ +from distutils import sysconfig +from distutils.errors import DistutilsPlatformError +from distutils.util import is_mingw, split_quoted + +import pytest + +from .. import cygwin, errors + + +class TestMinGW32Compiler: + @pytest.mark.skipif(not is_mingw(), reason='not on mingw') + def test_compiler_type(self): + compiler = cygwin.MinGW32Compiler() + assert compiler.compiler_type == 'mingw32' + + @pytest.mark.skipif(not is_mingw(), reason='not on mingw') + def test_set_executables(self, monkeypatch): + monkeypatch.setenv('CC', 'cc') + monkeypatch.setenv('CXX', 'c++') + + compiler = cygwin.MinGW32Compiler() + + assert compiler.compiler == split_quoted('cc -O -Wall') + assert compiler.compiler_so == split_quoted('cc -shared -O -Wall') + assert compiler.compiler_cxx == split_quoted('c++ -O -Wall') + assert compiler.linker_exe == split_quoted('cc') + assert compiler.linker_so == split_quoted('cc -shared') + + @pytest.mark.skipif(not is_mingw(), reason='not on mingw') + def test_runtime_library_dir_option(self): + compiler = cygwin.MinGW32Compiler() + with pytest.raises(DistutilsPlatformError): + compiler.runtime_library_dir_option('/usr/lib') + + @pytest.mark.skipif(not is_mingw(), reason='not on mingw') + def test_cygwincc_error(self, monkeypatch): + monkeypatch.setattr(cygwin, 'is_cygwincc', lambda _: True) + + with pytest.raises(errors.Error): + cygwin.MinGW32Compiler() + + @pytest.mark.skipif('sys.platform == "cygwin"') + def test_customize_compiler_with_msvc_python(self): + # In case we have an MSVC Python build, but still want to use + # MinGW32Compiler, then customize_compiler() shouldn't fail at least. + # https://github.com/pypa/setuptools/issues/4456 + compiler = cygwin.MinGW32Compiler() + sysconfig.customize_compiler(compiler) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py new file mode 100644 index 0000000000000000000000000000000000000000..eca831996adcb07f05560581fe4285cdb29392d3 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py @@ -0,0 +1,136 @@ +import os +import sys +import sysconfig +import threading +import unittest.mock as mock +from distutils.errors import DistutilsPlatformError +from distutils.tests import support +from distutils.util import get_platform + +import pytest + +from .. import msvc + +needs_winreg = pytest.mark.skipif('not hasattr(msvc, "winreg")') + + +class Testmsvccompiler(support.TempdirManager): + def test_no_compiler(self, monkeypatch): + # makes sure query_vcvarsall raises + # a DistutilsPlatformError if the compiler + # is not found + def _find_vcvarsall(plat_spec): + return None, None + + monkeypatch.setattr(msvc, '_find_vcvarsall', _find_vcvarsall) + + with pytest.raises(DistutilsPlatformError): + msvc._get_vc_env( + 'wont find this version', + ) + + @pytest.mark.skipif( + not sysconfig.get_platform().startswith("win"), + reason="Only run test for non-mingw Windows platforms", + ) + @pytest.mark.parametrize( + "plat_name, expected", + [ + ("win-arm64", "win-arm64"), + ("win-amd64", "win-amd64"), + (None, get_platform()), + ], + ) + def test_cross_platform_compilation_paths(self, monkeypatch, plat_name, expected): + """ + Ensure a specified target platform is passed to _get_vcvars_spec. + """ + compiler = msvc.Compiler() + + def _get_vcvars_spec(host_platform, platform): + assert platform == expected + + monkeypatch.setattr(msvc, '_get_vcvars_spec', _get_vcvars_spec) + compiler.initialize(plat_name) + + @needs_winreg + def test_get_vc_env_unicode(self): + test_var = 'ṰḖṤṪ┅ṼẨṜ' + test_value = '₃⁴₅' + + # Ensure we don't early exit from _get_vc_env + old_distutils_use_sdk = os.environ.pop('DISTUTILS_USE_SDK', None) + os.environ[test_var] = test_value + try: + env = msvc._get_vc_env('x86') + assert test_var.lower() in env + assert test_value == env[test_var.lower()] + finally: + os.environ.pop(test_var) + if old_distutils_use_sdk: + os.environ['DISTUTILS_USE_SDK'] = old_distutils_use_sdk + + @needs_winreg + @pytest.mark.parametrize('ver', (2015, 2017)) + def test_get_vc(self, ver): + # This function cannot be mocked, so pass if VC is found + # and skip otherwise. + lookup = getattr(msvc, f'_find_vc{ver}') + expected_version = {2015: 14, 2017: 15}[ver] + version, path = lookup() + if not version: + pytest.skip(f"VS {ver} is not installed") + assert version >= expected_version + assert os.path.isdir(path) + + +class CheckThread(threading.Thread): + exc_info = None + + def run(self): + try: + super().run() + except Exception: + self.exc_info = sys.exc_info() + + def __bool__(self): + return not self.exc_info + + +class TestSpawn: + def test_concurrent_safe(self): + """ + Concurrent calls to spawn should have consistent results. + """ + compiler = msvc.Compiler() + compiler._paths = "expected" + inner_cmd = 'import os; assert os.environ["PATH"] == "expected"' + command = [sys.executable, '-c', inner_cmd] + + threads = [ + CheckThread(target=compiler.spawn, args=[command]) for n in range(100) + ] + for thread in threads: + thread.start() + for thread in threads: + thread.join() + assert all(threads) + + def test_concurrent_safe_fallback(self): + """ + If CCompiler.spawn has been monkey-patched without support + for an env, it should still execute. + """ + from distutils import ccompiler + + compiler = msvc.Compiler() + compiler._paths = "expected" + + def CCompiler_spawn(self, cmd): + "A spawn without an env argument." + assert os.environ["PATH"] == "expected" + + with mock.patch.object(ccompiler.CCompiler, 'spawn', CCompiler_spawn): + compiler.spawn(["n/a"]) + + assert os.environ.get("PATH") != "expected" diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py new file mode 100644 index 0000000000000000000000000000000000000000..35b6b0e050c654bd9eff711ec3b94bea9adff2af --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_unix.py @@ -0,0 +1,413 @@ +"""Tests for distutils.unixccompiler.""" + +import os +import sys +import unittest.mock as mock +from distutils import sysconfig +from distutils.compat import consolidate_linker_args +from distutils.errors import DistutilsPlatformError +from distutils.tests import support +from distutils.tests.compat.py39 import EnvironmentVarGuard +from distutils.util import _clear_cached_macosx_ver + +import pytest + +from .. import unix + + +@pytest.fixture(autouse=True) +def save_values(monkeypatch): + monkeypatch.setattr(sys, 'platform', sys.platform) + monkeypatch.setattr(sysconfig, 'get_config_var', sysconfig.get_config_var) + monkeypatch.setattr(sysconfig, 'get_config_vars', sysconfig.get_config_vars) + + +@pytest.fixture(autouse=True) +def compiler_wrapper(request): + class CompilerWrapper(unix.Compiler): + def rpath_foo(self): + return self.runtime_library_dir_option('/foo') + + request.instance.cc = CompilerWrapper() + + +class TestUnixCCompiler(support.TempdirManager): + @pytest.mark.skipif('platform.system == "Windows"') + def test_runtime_libdir_option(self): # noqa: C901 + # Issue #5900; GitHub Issue #37 + # + # Ensure RUNPATH is added to extension modules with RPATH if + # GNU ld is used + + # darwin + sys.platform = 'darwin' + darwin_ver_var = 'MACOSX_DEPLOYMENT_TARGET' + darwin_rpath_flag = '-Wl,-rpath,/foo' + darwin_lib_flag = '-L/foo' + + # (macOS version from syscfg, macOS version from env var) -> flag + # Version value of None generates two tests: as None and as empty string + # Expected flag value of None means an mismatch exception is expected + darwin_test_cases = [ + ((None, None), darwin_lib_flag), + ((None, '11'), darwin_rpath_flag), + (('10', None), darwin_lib_flag), + (('10.3', None), darwin_lib_flag), + (('10.3.1', None), darwin_lib_flag), + (('10.5', None), darwin_rpath_flag), + (('10.5.1', None), darwin_rpath_flag), + (('10.3', '10.3'), darwin_lib_flag), + (('10.3', '10.5'), darwin_rpath_flag), + (('10.5', '10.3'), darwin_lib_flag), + (('10.5', '11'), darwin_rpath_flag), + (('10.4', '10'), None), + ] + + def make_darwin_gcv(syscfg_macosx_ver): + def gcv(var): + if var == darwin_ver_var: + return syscfg_macosx_ver + return "xxx" + + return gcv + + def do_darwin_test(syscfg_macosx_ver, env_macosx_ver, expected_flag): + env = os.environ + msg = f"macOS version = (sysconfig={syscfg_macosx_ver!r}, env={env_macosx_ver!r})" + + # Save + old_gcv = sysconfig.get_config_var + old_env_macosx_ver = env.get(darwin_ver_var) + + # Setup environment + _clear_cached_macosx_ver() + sysconfig.get_config_var = make_darwin_gcv(syscfg_macosx_ver) + if env_macosx_ver is not None: + env[darwin_ver_var] = env_macosx_ver + elif darwin_ver_var in env: + env.pop(darwin_ver_var) + + # Run the test + if expected_flag is not None: + assert self.cc.rpath_foo() == expected_flag, msg + else: + with pytest.raises( + DistutilsPlatformError, match=darwin_ver_var + r' mismatch' + ): + self.cc.rpath_foo() + + # Restore + if old_env_macosx_ver is not None: + env[darwin_ver_var] = old_env_macosx_ver + elif darwin_ver_var in env: + env.pop(darwin_ver_var) + sysconfig.get_config_var = old_gcv + _clear_cached_macosx_ver() + + for macosx_vers, expected_flag in darwin_test_cases: + syscfg_macosx_ver, env_macosx_ver = macosx_vers + do_darwin_test(syscfg_macosx_ver, env_macosx_ver, expected_flag) + # Bonus test cases with None interpreted as empty string + if syscfg_macosx_ver is None: + do_darwin_test("", env_macosx_ver, expected_flag) + if env_macosx_ver is None: + do_darwin_test(syscfg_macosx_ver, "", expected_flag) + if syscfg_macosx_ver is None and env_macosx_ver is None: + do_darwin_test("", "", expected_flag) + + old_gcv = sysconfig.get_config_var + + # hp-ux + sys.platform = 'hp-ux' + + def gcv(v): + return 'xxx' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == ['+s', '-L/foo'] + + def gcv(v): + return 'gcc' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == ['-Wl,+s', '-L/foo'] + + def gcv(v): + return 'g++' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == ['-Wl,+s', '-L/foo'] + + sysconfig.get_config_var = old_gcv + + # GCC GNULD + sys.platform = 'bar' + + def gcv(v): + if v == 'CC': + return 'gcc' + elif v == 'GNULD': + return 'yes' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == consolidate_linker_args([ + '-Wl,--enable-new-dtags', + '-Wl,-rpath,/foo', + ]) + + def gcv(v): + if v == 'CC': + return 'gcc -pthread -B /bar' + elif v == 'GNULD': + return 'yes' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == consolidate_linker_args([ + '-Wl,--enable-new-dtags', + '-Wl,-rpath,/foo', + ]) + + # GCC non-GNULD + sys.platform = 'bar' + + def gcv(v): + if v == 'CC': + return 'gcc' + elif v == 'GNULD': + return 'no' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == '-Wl,-R/foo' + + # GCC GNULD with fully qualified configuration prefix + # see #7617 + sys.platform = 'bar' + + def gcv(v): + if v == 'CC': + return 'x86_64-pc-linux-gnu-gcc-4.4.2' + elif v == 'GNULD': + return 'yes' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == consolidate_linker_args([ + '-Wl,--enable-new-dtags', + '-Wl,-rpath,/foo', + ]) + + # non-GCC GNULD + sys.platform = 'bar' + + def gcv(v): + if v == 'CC': + return 'cc' + elif v == 'GNULD': + return 'yes' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == consolidate_linker_args([ + '-Wl,--enable-new-dtags', + '-Wl,-rpath,/foo', + ]) + + # non-GCC non-GNULD + sys.platform = 'bar' + + def gcv(v): + if v == 'CC': + return 'cc' + elif v == 'GNULD': + return 'no' + + sysconfig.get_config_var = gcv + assert self.cc.rpath_foo() == '-Wl,-R/foo' + + @pytest.mark.skipif('platform.system == "Windows"') + def test_cc_overrides_ldshared(self): + # Issue #18080: + # ensure that setting CC env variable also changes default linker + def gcv(v): + if v == 'LDSHARED': + return 'gcc-4.2 -bundle -undefined dynamic_lookup ' + return 'gcc-4.2' + + def gcvs(*args, _orig=sysconfig.get_config_vars): + if args: + return list(map(sysconfig.get_config_var, args)) + return _orig() + + sysconfig.get_config_var = gcv + sysconfig.get_config_vars = gcvs + with EnvironmentVarGuard() as env: + env['CC'] = 'my_cc' + del env['LDSHARED'] + sysconfig.customize_compiler(self.cc) + assert self.cc.linker_so[0] == 'my_cc' + + @pytest.mark.skipif('platform.system == "Windows"') + def test_cxx_commands_used_are_correct(self): + def gcv(v): + if v == 'LDSHARED': + return 'ccache gcc-4.2 -bundle -undefined dynamic_lookup' + elif v == 'LDCXXSHARED': + return 'ccache g++-4.2 -bundle -undefined dynamic_lookup' + elif v == 'CXX': + return 'ccache g++-4.2' + elif v == 'CC': + return 'ccache gcc-4.2' + return '' + + def gcvs(*args, _orig=sysconfig.get_config_vars): + if args: + return list(map(sysconfig.get_config_var, args)) + return _orig() # pragma: no cover + + sysconfig.get_config_var = gcv + sysconfig.get_config_vars = gcvs + with ( + mock.patch.object(self.cc, 'spawn', return_value=None) as mock_spawn, + mock.patch.object(self.cc, '_need_link', return_value=True), + mock.patch.object(self.cc, 'mkpath', return_value=None), + EnvironmentVarGuard() as env, + ): + # override environment overrides in case they're specified by CI + del env['CXX'] + del env['LDCXXSHARED'] + + sysconfig.customize_compiler(self.cc) + assert self.cc.linker_so_cxx[0:2] == ['ccache', 'g++-4.2'] + assert self.cc.linker_exe_cxx[0:2] == ['ccache', 'g++-4.2'] + self.cc.link(None, [], 'a.out', target_lang='c++') + call_args = mock_spawn.call_args[0][0] + expected = ['ccache', 'g++-4.2', '-bundle', '-undefined', 'dynamic_lookup'] + assert call_args[:5] == expected + + self.cc.link_executable([], 'a.out', target_lang='c++') + call_args = mock_spawn.call_args[0][0] + expected = ['ccache', 'g++-4.2', '-o', self.cc.executable_filename('a.out')] + assert call_args[:4] == expected + + env['LDCXXSHARED'] = 'wrapper g++-4.2 -bundle -undefined dynamic_lookup' + env['CXX'] = 'wrapper g++-4.2' + sysconfig.customize_compiler(self.cc) + assert self.cc.linker_so_cxx[0:2] == ['wrapper', 'g++-4.2'] + assert self.cc.linker_exe_cxx[0:2] == ['wrapper', 'g++-4.2'] + self.cc.link(None, [], 'a.out', target_lang='c++') + call_args = mock_spawn.call_args[0][0] + expected = ['wrapper', 'g++-4.2', '-bundle', '-undefined', 'dynamic_lookup'] + assert call_args[:5] == expected + + self.cc.link_executable([], 'a.out', target_lang='c++') + call_args = mock_spawn.call_args[0][0] + expected = [ + 'wrapper', + 'g++-4.2', + '-o', + self.cc.executable_filename('a.out'), + ] + assert call_args[:4] == expected + + @pytest.mark.skipif('platform.system == "Windows"') + @pytest.mark.usefixtures('disable_macos_customization') + def test_cc_overrides_ldshared_for_cxx_correctly(self): + """ + Ensure that setting CC env variable also changes default linker + correctly when building C++ extensions. + + pypa/distutils#126 + """ + + def gcv(v): + if v == 'LDSHARED': + return 'gcc-4.2 -bundle -undefined dynamic_lookup ' + elif v == 'LDCXXSHARED': + return 'g++-4.2 -bundle -undefined dynamic_lookup ' + elif v == 'CXX': + return 'g++-4.2' + elif v == 'CC': + return 'gcc-4.2' + return '' + + def gcvs(*args, _orig=sysconfig.get_config_vars): + if args: + return list(map(sysconfig.get_config_var, args)) + return _orig() + + sysconfig.get_config_var = gcv + sysconfig.get_config_vars = gcvs + with ( + mock.patch.object(self.cc, 'spawn', return_value=None) as mock_spawn, + mock.patch.object(self.cc, '_need_link', return_value=True), + mock.patch.object(self.cc, 'mkpath', return_value=None), + EnvironmentVarGuard() as env, + ): + env['CC'] = 'ccache my_cc' + env['CXX'] = 'my_cxx' + del env['LDSHARED'] + sysconfig.customize_compiler(self.cc) + assert self.cc.linker_so[0:2] == ['ccache', 'my_cc'] + self.cc.link(None, [], 'a.out', target_lang='c++') + call_args = mock_spawn.call_args[0][0] + expected = ['my_cxx', '-bundle', '-undefined', 'dynamic_lookup'] + assert call_args[:4] == expected + + @pytest.mark.skipif('platform.system == "Windows"') + def test_explicit_ldshared(self): + # Issue #18080: + # ensure that setting CC env variable does not change + # explicit LDSHARED setting for linker + def gcv(v): + if v == 'LDSHARED': + return 'gcc-4.2 -bundle -undefined dynamic_lookup ' + return 'gcc-4.2' + + def gcvs(*args, _orig=sysconfig.get_config_vars): + if args: + return list(map(sysconfig.get_config_var, args)) + return _orig() + + sysconfig.get_config_var = gcv + sysconfig.get_config_vars = gcvs + with EnvironmentVarGuard() as env: + env['CC'] = 'my_cc' + env['LDSHARED'] = 'my_ld -bundle -dynamic' + sysconfig.customize_compiler(self.cc) + assert self.cc.linker_so[0] == 'my_ld' + + def test_has_function(self): + # Issue https://github.com/pypa/distutils/issues/64: + # ensure that setting output_dir does not raise + # FileNotFoundError: [Errno 2] No such file or directory: 'a.out' + self.cc.output_dir = 'scratch' + os.chdir(self.mkdtemp()) + self.cc.has_function('abort') + + def test_find_library_file(self, monkeypatch): + compiler = unix.Compiler() + compiler._library_root = lambda dir: dir + monkeypatch.setattr(os.path, 'exists', lambda d: 'existing' in d) + + libname = 'libabc.dylib' if sys.platform != 'cygwin' else 'cygabc.dll' + dirs = ('/foo/bar/missing', '/foo/bar/existing') + assert ( + compiler.find_library_file(dirs, 'abc').replace('\\', '/') + == f'/foo/bar/existing/{libname}' + ) + assert ( + compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/') + == f'/foo/bar/existing/{libname}' + ) + + monkeypatch.setattr( + os.path, + 'exists', + lambda d: 'existing' in d and '.a' in d and '.dll.a' not in d, + ) + assert ( + compiler.find_library_file(dirs, 'abc').replace('\\', '/') + == '/foo/bar/existing/libabc.a' + ) + assert ( + compiler.find_library_file(reversed(dirs), 'abc').replace('\\', '/') + == '/foo/bar/existing/libabc.a' + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py new file mode 100644 index 0000000000000000000000000000000000000000..1231b32d20fc0524ea50f6a70d7e017211c69e9b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py @@ -0,0 +1,422 @@ +"""distutils.unixccompiler + +Contains the UnixCCompiler class, a subclass of CCompiler that handles +the "typical" Unix-style command-line C compiler: + * macros defined with -Dname[=value] + * macros undefined with -Uname + * include search directories specified with -Idir + * libraries specified with -lllib + * library search directories specified with -Ldir + * compile handled by 'cc' (or similar) executable with -c option: + compiles .c to .o + * link static library handled by 'ar' command (possibly with 'ranlib') + * link shared library handled by 'cc -shared' +""" + +from __future__ import annotations + +import itertools +import os +import re +import shlex +import sys +from collections.abc import Iterable + +from ... import sysconfig +from ..._log import log +from ..._macos_compat import compiler_fixup +from ..._modified import newer +from ...compat import consolidate_linker_args +from ...errors import DistutilsExecError +from . import base +from .base import _Macro, gen_lib_options, gen_preprocess_options +from .errors import ( + CompileError, + LibError, + LinkError, +) + +# XXX Things not currently handled: +# * optimization/debug/warning flags; we just use whatever's in Python's +# Makefile and live with it. Is this adequate? If not, we might +# have to have a bunch of subclasses GNUCCompiler, SGICCompiler, +# SunCCompiler, and I suspect down that road lies madness. +# * even if we don't know a warning flag from an optimization flag, +# we need some way for outsiders to feed preprocessor/compiler/linker +# flags in to us -- eg. a sysadmin might want to mandate certain flags +# via a site config file, or a user might want to set something for +# compiling this module distribution only via the setup.py command +# line, whatever. As long as these options come from something on the +# current system, they can be as system-dependent as they like, and we +# should just happily stuff them into the preprocessor/compiler/linker +# options and carry on. + + +def _split_env(cmd): + """ + For macOS, split command into 'env' portion (if any) + and the rest of the linker command. + + >>> _split_env(['a', 'b', 'c']) + ([], ['a', 'b', 'c']) + >>> _split_env(['/usr/bin/env', 'A=3', 'gcc']) + (['/usr/bin/env', 'A=3'], ['gcc']) + """ + pivot = 0 + if os.path.basename(cmd[0]) == "env": + pivot = 1 + while '=' in cmd[pivot]: + pivot += 1 + return cmd[:pivot], cmd[pivot:] + + +def _split_aix(cmd): + """ + AIX platforms prefix the compiler with the ld_so_aix + script, so split that from the linker command. + + >>> _split_aix(['a', 'b', 'c']) + ([], ['a', 'b', 'c']) + >>> _split_aix(['/bin/foo/ld_so_aix', 'gcc']) + (['/bin/foo/ld_so_aix'], ['gcc']) + """ + pivot = os.path.basename(cmd[0]) == 'ld_so_aix' + return cmd[:pivot], cmd[pivot:] + + +def _linker_params(linker_cmd, compiler_cmd): + """ + The linker command usually begins with the compiler + command (possibly multiple elements), followed by zero or more + params for shared library building. + + If the LDSHARED env variable overrides the linker command, + however, the commands may not match. + + Return the best guess of the linker parameters by stripping + the linker command. If the compiler command does not + match the linker command, assume the linker command is + just the first element. + + >>> _linker_params('gcc foo bar'.split(), ['gcc']) + ['foo', 'bar'] + >>> _linker_params('gcc foo bar'.split(), ['other']) + ['foo', 'bar'] + >>> _linker_params('ccache gcc foo bar'.split(), 'ccache gcc'.split()) + ['foo', 'bar'] + >>> _linker_params(['gcc'], ['gcc']) + [] + """ + c_len = len(compiler_cmd) + pivot = c_len if linker_cmd[:c_len] == compiler_cmd else 1 + return linker_cmd[pivot:] + + +class Compiler(base.Compiler): + compiler_type = 'unix' + + # These are used by CCompiler in two places: the constructor sets + # instance attributes 'preprocessor', 'compiler', etc. from them, and + # 'set_executable()' allows any of these to be set. The defaults here + # are pretty generic; they will probably have to be set by an outsider + # (eg. using information discovered by the sysconfig about building + # Python extensions). + executables = { + 'preprocessor': None, + 'compiler': ["cc"], + 'compiler_so': ["cc"], + 'compiler_cxx': ["c++"], + 'compiler_so_cxx': ["c++"], + 'linker_so': ["cc", "-shared"], + 'linker_so_cxx': ["c++", "-shared"], + 'linker_exe': ["cc"], + 'linker_exe_cxx': ["c++", "-shared"], + 'archiver': ["ar", "-cr"], + 'ranlib': None, + } + + if sys.platform[:6] == "darwin": + executables['ranlib'] = ["ranlib"] + + # Needed for the filename generation methods provided by the base + # class, CCompiler. NB. whoever instantiates/uses a particular + # UnixCCompiler instance should set 'shared_lib_ext' -- we set a + # reasonable common default here, but it's not necessarily used on all + # Unices! + + src_extensions = [".c", ".C", ".cc", ".cxx", ".cpp", ".m"] + obj_extension = ".o" + static_lib_extension = ".a" + shared_lib_extension = ".so" + dylib_lib_extension = ".dylib" + xcode_stub_lib_extension = ".tbd" + static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s" + xcode_stub_lib_format = dylib_lib_format + if sys.platform == "cygwin": + exe_extension = ".exe" + shared_lib_extension = ".dll.a" + dylib_lib_extension = ".dll" + dylib_lib_format = "cyg%s%s" + + def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs): + """Remove standard library path from rpath""" + libraries, library_dirs, runtime_library_dirs = super()._fix_lib_args( + libraries, library_dirs, runtime_library_dirs + ) + libdir = sysconfig.get_config_var('LIBDIR') + if ( + runtime_library_dirs + and libdir.startswith("/usr/lib") + and (libdir in runtime_library_dirs) + ): + runtime_library_dirs.remove(libdir) + return libraries, library_dirs, runtime_library_dirs + + def preprocess( + self, + source: str | os.PathLike[str], + output_file: str | os.PathLike[str] | None = None, + macros: list[_Macro] | None = None, + include_dirs: list[str] | tuple[str, ...] | None = None, + extra_preargs: list[str] | None = None, + extra_postargs: Iterable[str] | None = None, + ): + fixed_args = self._fix_compile_args(None, macros, include_dirs) + ignore, macros, include_dirs = fixed_args + pp_opts = gen_preprocess_options(macros, include_dirs) + pp_args = self.preprocessor + pp_opts + if output_file: + pp_args.extend(['-o', output_file]) + if extra_preargs: + pp_args[:0] = extra_preargs + if extra_postargs: + pp_args.extend(extra_postargs) + pp_args.append(source) + + # reasons to preprocess: + # - force is indicated + # - output is directed to stdout + # - source file is newer than the target + preprocess = self.force or output_file is None or newer(source, output_file) + if not preprocess: + return + + if output_file: + self.mkpath(os.path.dirname(output_file)) + + try: + self.spawn(pp_args) + except DistutilsExecError as msg: + raise CompileError(msg) + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + compiler_so = compiler_fixup(self.compiler_so, cc_args + extra_postargs) + compiler_so_cxx = compiler_fixup(self.compiler_so_cxx, cc_args + extra_postargs) + try: + if self.detect_language(src) == 'c++': + self.spawn( + compiler_so_cxx + cc_args + [src, '-o', obj] + extra_postargs + ) + else: + self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + + def create_static_lib( + self, objects, output_libname, output_dir=None, debug=False, target_lang=None + ): + objects, output_dir = self._fix_object_args(objects, output_dir) + + output_filename = self.library_filename(output_libname, output_dir=output_dir) + + if self._need_link(objects, output_filename): + self.mkpath(os.path.dirname(output_filename)) + self.spawn(self.archiver + [output_filename] + objects + self.objects) + + # Not many Unices required ranlib anymore -- SunOS 4.x is, I + # think the only major Unix that does. Maybe we need some + # platform intelligence here to skip ranlib if it's not + # needed -- or maybe Python's configure script took care of + # it for us, hence the check for leading colon. + if self.ranlib: + try: + self.spawn(self.ranlib + [output_filename]) + except DistutilsExecError as msg: + raise LibError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + def link( + self, + target_desc, + objects: list[str] | tuple[str, ...], + output_filename, + output_dir: str | None = None, + libraries: list[str] | tuple[str, ...] | None = None, + library_dirs: list[str] | tuple[str, ...] | None = None, + runtime_library_dirs: list[str] | tuple[str, ...] | None = None, + export_symbols=None, + debug=False, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None, + ): + objects, output_dir = self._fix_object_args(objects, output_dir) + fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs) + libraries, library_dirs, runtime_library_dirs = fixed_args + + lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) + if not isinstance(output_dir, (str, type(None))): + raise TypeError("'output_dir' must be a string or None") + if output_dir is not None: + output_filename = os.path.join(output_dir, output_filename) + + if self._need_link(objects, output_filename): + ld_args = objects + self.objects + lib_opts + ['-o', output_filename] + if debug: + ld_args[:0] = ['-g'] + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) + try: + # Select a linker based on context: linker_exe when + # building an executable or linker_so (with shared options) + # when building a shared library. + building_exe = target_desc == base.Compiler.EXECUTABLE + target_cxx = target_lang == "c++" + linker = ( + (self.linker_exe_cxx if target_cxx else self.linker_exe) + if building_exe + else (self.linker_so_cxx if target_cxx else self.linker_so) + )[:] + + if target_cxx and self.compiler_cxx: + env, linker_ne = _split_env(linker) + aix, linker_na = _split_aix(linker_ne) + _, compiler_cxx_ne = _split_env(self.compiler_cxx) + _, linker_exe_ne = _split_env(self.linker_exe_cxx) + + params = _linker_params(linker_na, linker_exe_ne) + linker = env + aix + compiler_cxx_ne + params + + linker = compiler_fixup(linker, ld_args) + + self.spawn(linker + ld_args) + except DistutilsExecError as msg: + raise LinkError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + + # -- Miscellaneous methods ----------------------------------------- + # These are all used by the 'gen_lib_options() function, in + # ccompiler.py. + + def library_dir_option(self, dir): + return "-L" + dir + + def _is_gcc(self): + cc_var = sysconfig.get_config_var("CC") + compiler = os.path.basename(shlex.split(cc_var)[0]) + return "gcc" in compiler or "g++" in compiler + + def runtime_library_dir_option(self, dir: str) -> str | list[str]: # type: ignore[override] # Fixed in pypa/distutils#339 + # XXX Hackish, at the very least. See Python bug #445902: + # https://bugs.python.org/issue445902 + # Linkers on different platforms need different options to + # specify that directories need to be added to the list of + # directories searched for dependencies when a dynamic library + # is sought. GCC on GNU systems (Linux, FreeBSD, ...) has to + # be told to pass the -R option through to the linker, whereas + # other compilers and gcc on other systems just know this. + # Other compilers may need something slightly different. At + # this time, there's no way to determine this information from + # the configuration data stored in the Python installation, so + # we use this hack. + if sys.platform[:6] == "darwin": + from distutils.util import get_macosx_target_ver, split_version + + macosx_target_ver = get_macosx_target_ver() + if macosx_target_ver and split_version(macosx_target_ver) >= [10, 5]: + return "-Wl,-rpath," + dir + else: # no support for -rpath on earlier macOS versions + return "-L" + dir + elif sys.platform[:7] == "freebsd": + return "-Wl,-rpath=" + dir + elif sys.platform[:5] == "hp-ux": + return [ + "-Wl,+s" if self._is_gcc() else "+s", + "-L" + dir, + ] + + # For all compilers, `-Wl` is the presumed way to pass a + # compiler option to the linker + if sysconfig.get_config_var("GNULD") == "yes": + return consolidate_linker_args([ + # Force RUNPATH instead of RPATH + "-Wl,--enable-new-dtags", + "-Wl,-rpath," + dir, + ]) + else: + return "-Wl,-R" + dir + + def library_option(self, lib): + return "-l" + lib + + @staticmethod + def _library_root(dir): + """ + macOS users can specify an alternate SDK using'-isysroot'. + Calculate the SDK root if it is specified. + + Note that, as of Xcode 7, Apple SDKs may contain textual stub + libraries with .tbd extensions rather than the normal .dylib + shared libraries installed in /. The Apple compiler tool + chain handles this transparently but it can cause problems + for programs that are being built with an SDK and searching + for specific libraries. Callers of find_library_file need to + keep in mind that the base filename of the returned SDK library + file might have a different extension from that of the library + file installed on the running system, for example: + /Applications/Xcode.app/Contents/Developer/Platforms/ + MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/ + usr/lib/libedit.tbd + vs + /usr/lib/libedit.dylib + """ + cflags = sysconfig.get_config_var('CFLAGS') + match = re.search(r'-isysroot\s*(\S+)', cflags) + + apply_root = ( + sys.platform == 'darwin' + and match + and ( + dir.startswith('/System/') + or (dir.startswith('/usr/') and not dir.startswith('/usr/local/')) + ) + ) + + return os.path.join(match.group(1), dir[1:]) if apply_root else dir + + def find_library_file(self, dirs, lib, debug=False): + """ + Second-guess the linker with not much hard + data to go on: GCC seems to prefer the shared library, so + assume that *all* Unix C compilers do, + ignoring even GCC's "-static" option. + """ + lib_names = ( + self.library_filename(lib, lib_type=type) + for type in 'dylib xcode_stub shared static'.split() + ) + + roots = map(self._library_root, dirs) + + searched = itertools.starmap(os.path.join, itertools.product(roots, lib_names)) + + found = filter(os.path.exists, searched) + + # Return None if it could not be found in any dir. + return next(found, None) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/zos.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/zos.py new file mode 100644 index 0000000000000000000000000000000000000000..681c63166be8dfea8ec3f621586b901220abe1c5 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/compilers/C/zos.py @@ -0,0 +1,230 @@ +"""distutils.zosccompiler + +Contains the selection of the c & c++ compilers on z/OS. There are several +different c compilers on z/OS, all of them are optional, so the correct +one needs to be chosen based on the users input. This is compatible with +the following compilers: + +IBM C/C++ For Open Enterprise Languages on z/OS 2.0 +IBM Open XL C/C++ 1.1 for z/OS +IBM XL C/C++ V2.4.1 for z/OS 2.4 and 2.5 +IBM z/OS XL C/C++ +""" + +import os + +from ... import sysconfig +from ...errors import DistutilsExecError +from . import unix +from .errors import CompileError + +_cc_args = { + 'ibm-openxl': [ + '-m64', + '-fvisibility=default', + '-fzos-le-char-mode=ascii', + '-fno-short-enums', + ], + 'ibm-xlclang': [ + '-q64', + '-qexportall', + '-qascii', + '-qstrict', + '-qnocsect', + '-Wa,asa,goff', + '-Wa,xplink', + '-qgonumber', + '-qenum=int', + '-Wc,DLL', + ], + 'ibm-xlc': [ + '-q64', + '-qexportall', + '-qascii', + '-qstrict', + '-qnocsect', + '-Wa,asa,goff', + '-Wa,xplink', + '-qgonumber', + '-qenum=int', + '-Wc,DLL', + '-qlanglvl=extc99', + ], +} + +_cxx_args = { + 'ibm-openxl': [ + '-m64', + '-fvisibility=default', + '-fzos-le-char-mode=ascii', + '-fno-short-enums', + ], + 'ibm-xlclang': [ + '-q64', + '-qexportall', + '-qascii', + '-qstrict', + '-qnocsect', + '-Wa,asa,goff', + '-Wa,xplink', + '-qgonumber', + '-qenum=int', + '-Wc,DLL', + ], + 'ibm-xlc': [ + '-q64', + '-qexportall', + '-qascii', + '-qstrict', + '-qnocsect', + '-Wa,asa,goff', + '-Wa,xplink', + '-qgonumber', + '-qenum=int', + '-Wc,DLL', + '-qlanglvl=extended0x', + ], +} + +_asm_args = { + 'ibm-openxl': ['-fasm', '-fno-integrated-as', '-Wa,--ASA', '-Wa,--GOFF'], + 'ibm-xlclang': [], + 'ibm-xlc': [], +} + +_ld_args = { + 'ibm-openxl': [], + 'ibm-xlclang': ['-Wl,dll', '-q64'], + 'ibm-xlc': ['-Wl,dll', '-q64'], +} + + +# Python on z/OS is built with no compiler specific options in it's CFLAGS. +# But each compiler requires it's own specific options to build successfully, +# though some of the options are common between them +class Compiler(unix.Compiler): + src_extensions = ['.c', '.C', '.cc', '.cxx', '.cpp', '.m', '.s'] + _cpp_extensions = ['.cc', '.cpp', '.cxx', '.C'] + _asm_extensions = ['.s'] + + def _get_zos_compiler_name(self): + zos_compiler_names = [ + os.path.basename(binary) + for envvar in ('CC', 'CXX', 'LDSHARED') + if (binary := os.environ.get(envvar, None)) + ] + if len(zos_compiler_names) == 0: + return 'ibm-openxl' + + zos_compilers = {} + for compiler in ( + 'ibm-clang', + 'ibm-clang64', + 'ibm-clang++', + 'ibm-clang++64', + 'clang', + 'clang++', + 'clang-14', + ): + zos_compilers[compiler] = 'ibm-openxl' + + for compiler in ('xlclang', 'xlclang++', 'njsc', 'njsc++'): + zos_compilers[compiler] = 'ibm-xlclang' + + for compiler in ('xlc', 'xlC', 'xlc++'): + zos_compilers[compiler] = 'ibm-xlc' + + return zos_compilers.get(zos_compiler_names[0], 'ibm-openxl') + + def __init__(self, verbose=False, force=False): + super().__init__(verbose, force=force) + self.zos_compiler = self._get_zos_compiler_name() + sysconfig.customize_compiler(self) + + def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts): + local_args = [] + if ext in self._cpp_extensions: + compiler = self.compiler_cxx + local_args.extend(_cxx_args[self.zos_compiler]) + elif ext in self._asm_extensions: + compiler = self.compiler_so + local_args.extend(_cc_args[self.zos_compiler]) + local_args.extend(_asm_args[self.zos_compiler]) + else: + compiler = self.compiler_so + local_args.extend(_cc_args[self.zos_compiler]) + local_args.extend(cc_args) + + try: + self.spawn(compiler + local_args + [src, '-o', obj] + extra_postargs) + except DistutilsExecError as msg: + raise CompileError(msg) + + def runtime_library_dir_option(self, dir): + return '-L' + dir + + def link( + self, + target_desc, + objects, + output_filename, + output_dir=None, + libraries=None, + library_dirs=None, + runtime_library_dirs=None, + export_symbols=None, + debug=False, + extra_preargs=None, + extra_postargs=None, + build_temp=None, + target_lang=None, + ): + # For a built module to use functions from cpython, it needs to use Pythons + # side deck file. The side deck is located beside the libpython3.xx.so + ldversion = sysconfig.get_config_var('LDVERSION') + if sysconfig.python_build: + side_deck_path = os.path.join( + sysconfig.get_config_var('abs_builddir'), + f'libpython{ldversion}.x', + ) + else: + side_deck_path = os.path.join( + sysconfig.get_config_var('installed_base'), + sysconfig.get_config_var('platlibdir'), + f'libpython{ldversion}.x', + ) + + if os.path.exists(side_deck_path): + if extra_postargs: + extra_postargs.append(side_deck_path) + else: + extra_postargs = [side_deck_path] + + # Check and replace libraries included side deck files + if runtime_library_dirs: + for dir in runtime_library_dirs: + for library in libraries[:]: + library_side_deck = os.path.join(dir, f'{library}.x') + if os.path.exists(library_side_deck): + libraries.remove(library) + extra_postargs.append(library_side_deck) + break + + # Any required ld args for the given compiler + extra_postargs.extend(_ld_args[self.zos_compiler]) + + super().link( + target_desc, + objects, + output_filename, + output_dir, + libraries, + library_dirs, + runtime_library_dirs, + export_symbols, + debug, + extra_preargs, + extra_postargs, + build_temp, + target_lang, + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5a8ab061009f1cd87a53ce51eff3bc9e9a632273 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/__init__.py @@ -0,0 +1,42 @@ +""" +Test suite for distutils. + +Tests for the command classes in the distutils.command package are +included in distutils.tests as well, instead of using a separate +distutils.command.tests package, since command identification is done +by import rather than matching pre-defined names. +""" + +import shutil +from collections.abc import Sequence + + +def missing_compiler_executable(cmd_names: Sequence[str] = []): # pragma: no cover + """Check if the compiler components used to build the interpreter exist. + + Check for the existence of the compiler executables whose names are listed + in 'cmd_names' or all the compiler executables when 'cmd_names' is empty + and return the first missing executable or None when none is found + missing. + + """ + from distutils import ccompiler, errors, sysconfig + + compiler = ccompiler.new_compiler() + sysconfig.customize_compiler(compiler) + if compiler.compiler_type == "msvc": + # MSVC has no executables, so check whether initialization succeeds + try: + compiler.initialize() + except errors.DistutilsPlatformError: + return "msvc" + for name in compiler.executables: + if cmd_names and name not in cmd_names: + continue + cmd = getattr(compiler, name) + if cmd_names: + assert cmd is not None, f"the '{name}' executable is not configured" + elif not cmd: + continue + if shutil.which(cmd[0]) is None: + return cmd[0] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/support.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/support.py new file mode 100644 index 0000000000000000000000000000000000000000..9cd2b8a9eedbb9f11a3ed793af57b3290c5febef --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/support.py @@ -0,0 +1,134 @@ +"""Support code for distutils test cases.""" + +import itertools +import os +import pathlib +import shutil +import sys +import sysconfig +import tempfile +from distutils.core import Distribution + +import pytest +from more_itertools import always_iterable + + +@pytest.mark.usefixtures('distutils_managed_tempdir') +class TempdirManager: + """ + Mix-in class that handles temporary directories for test cases. + """ + + def mkdtemp(self): + """Create a temporary directory that will be cleaned up. + + Returns the path of the directory. + """ + d = tempfile.mkdtemp() + self.tempdirs.append(d) + return d + + def write_file(self, path, content='xxx'): + """Writes a file in the given path. + + path can be a string or a sequence. + """ + pathlib.Path(*always_iterable(path)).write_text(content, encoding='utf-8') + + def create_dist(self, pkg_name='foo', **kw): + """Will generate a test environment. + + This function creates: + - a Distribution instance using keywords + - a temporary directory with a package structure + + It returns the package directory and the distribution + instance. + """ + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, pkg_name) + os.mkdir(pkg_dir) + dist = Distribution(attrs=kw) + + return pkg_dir, dist + + +class DummyCommand: + """Class to store options for retrieval via set_undefined_options().""" + + def __init__(self, **kwargs): + vars(self).update(kwargs) + + def ensure_finalized(self): + pass + + +def copy_xxmodule_c(directory): + """Helper for tests that need the xxmodule.c source file. + + Example use: + + def test_compile(self): + copy_xxmodule_c(self.tmpdir) + self.assertIn('xxmodule.c', os.listdir(self.tmpdir)) + + If the source file can be found, it will be copied to *directory*. If not, + the test will be skipped. Errors during copy are not caught. + """ + shutil.copy(_get_xxmodule_path(), os.path.join(directory, 'xxmodule.c')) + + +def _get_xxmodule_path(): + source_name = 'xxmodule.c' if sys.version_info > (3, 9) else 'xxmodule-3.8.c' + return os.path.join(os.path.dirname(__file__), source_name) + + +def fixup_build_ext(cmd): + """Function needed to make build_ext tests pass. + + When Python was built with --enable-shared on Unix, -L. is not enough to + find libpython.so, because regrtest runs in a tempdir, not in the + source directory where the .so lives. + + When Python was built with in debug mode on Windows, build_ext commands + need their debug attribute set, and it is not done automatically for + some reason. + + This function handles both of these things. Example use: + + cmd = build_ext(dist) + support.fixup_build_ext(cmd) + cmd.ensure_finalized() + + Unlike most other Unix platforms, Mac OS X embeds absolute paths + to shared libraries into executables, so the fixup is not needed there. + """ + if os.name == 'nt': + cmd.debug = sys.executable.endswith('_d.exe') + elif sysconfig.get_config_var('Py_ENABLE_SHARED'): + # To further add to the shared builds fun on Unix, we can't just add + # library_dirs to the Extension() instance because that doesn't get + # plumbed through to the final compiler command. + runshared = sysconfig.get_config_var('RUNSHARED') + if runshared is None: + cmd.library_dirs = ['.'] + else: + if sys.platform == 'darwin': + cmd.library_dirs = [] + else: + name, equals, value = runshared.partition('=') + cmd.library_dirs = [d for d in value.split(os.pathsep) if d] + + +def combine_markers(cls): + """ + pytest will honor markers as found on the class, but when + markers are on multiple subclasses, only one appears. Use + this decorator to combine those markers. + """ + cls.pytestmark = [ + mark + for base in itertools.chain([cls], cls.__bases__) + for mark in getattr(base, 'pytestmark', []) + ] + return cls diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_archive_util.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_archive_util.py new file mode 100644 index 0000000000000000000000000000000000000000..a9cc5eb00968ed9d5d77cac60ef543827c669539 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_archive_util.py @@ -0,0 +1,342 @@ +"""Tests for distutils.archive_util.""" + +import functools +import operator +import os +import pathlib +import sys +import tarfile +from distutils import archive_util +from distutils.archive_util import ( + ARCHIVE_FORMATS, + check_archive_formats, + make_archive, + make_tarball, + make_zipfile, +) +from distutils.spawn import spawn +from distutils.tests import support +from os.path import splitdrive + +import path +import pytest +from test.support import patch + +from .unix_compat import UID_0_SUPPORT, grp, pwd, require_uid_0, require_unix_id + + +def can_fs_encode(filename): + """ + Return True if the filename can be saved in the file system. + """ + if os.path.supports_unicode_filenames: + return True + try: + filename.encode(sys.getfilesystemencoding()) + except UnicodeEncodeError: + return False + return True + + +def all_equal(values): + return functools.reduce(operator.eq, values) + + +def same_drive(*paths): + return all_equal(pathlib.Path(path).drive for path in paths) + + +class ArchiveUtilTestCase(support.TempdirManager): + @pytest.mark.usefixtures('needs_zlib') + def test_make_tarball(self, name='archive'): + # creating something to tar + tmpdir = self._create_files() + self._make_tarball(tmpdir, name, '.tar.gz') + # trying an uncompressed one + self._make_tarball(tmpdir, name, '.tar', compress=None) + + @pytest.mark.usefixtures('needs_zlib') + def test_make_tarball_gzip(self): + tmpdir = self._create_files() + self._make_tarball(tmpdir, 'archive', '.tar.gz', compress='gzip') + + def test_make_tarball_bzip2(self): + pytest.importorskip('bz2') + tmpdir = self._create_files() + self._make_tarball(tmpdir, 'archive', '.tar.bz2', compress='bzip2') + + def test_make_tarball_xz(self): + pytest.importorskip('lzma') + tmpdir = self._create_files() + self._make_tarball(tmpdir, 'archive', '.tar.xz', compress='xz') + + @pytest.mark.skipif("not can_fs_encode('årchiv')") + def test_make_tarball_latin1(self): + """ + Mirror test_make_tarball, except filename contains latin characters. + """ + self.test_make_tarball('årchiv') # note this isn't a real word + + @pytest.mark.skipif("not can_fs_encode('のアーカイブ')") + def test_make_tarball_extended(self): + """ + Mirror test_make_tarball, except filename contains extended + characters outside the latin charset. + """ + self.test_make_tarball('のアーカイブ') # japanese for archive + + def _make_tarball(self, tmpdir, target_name, suffix, **kwargs): + tmpdir2 = self.mkdtemp() + if same_drive(tmpdir, tmpdir2): + pytest.skip("source and target should be on same drive") + + base_name = os.path.join(tmpdir2, target_name) + + # working with relative paths to avoid tar warnings + with path.Path(tmpdir): + make_tarball(splitdrive(base_name)[1], 'dist', **kwargs) + + # check if the compressed tarball was created + tarball = base_name + suffix + assert os.path.exists(tarball) + assert self._tarinfo(tarball) == self._created_files + + def _tarinfo(self, path): + tar = tarfile.open(path) + try: + names = tar.getnames() + names.sort() + return names + finally: + tar.close() + + _zip_created_files = [ + 'dist/', + 'dist/file1', + 'dist/file2', + 'dist/sub/', + 'dist/sub/file3', + 'dist/sub2/', + ] + _created_files = [p.rstrip('/') for p in _zip_created_files] + + def _create_files(self): + # creating something to tar + tmpdir = self.mkdtemp() + dist = os.path.join(tmpdir, 'dist') + os.mkdir(dist) + self.write_file([dist, 'file1'], 'xxx') + self.write_file([dist, 'file2'], 'xxx') + os.mkdir(os.path.join(dist, 'sub')) + self.write_file([dist, 'sub', 'file3'], 'xxx') + os.mkdir(os.path.join(dist, 'sub2')) + return tmpdir + + @pytest.mark.usefixtures('needs_zlib') + @pytest.mark.skipif("not (shutil.which('tar') and shutil.which('gzip'))") + def test_tarfile_vs_tar(self): + tmpdir = self._create_files() + tmpdir2 = self.mkdtemp() + base_name = os.path.join(tmpdir2, 'archive') + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, 'dist') + finally: + os.chdir(old_dir) + + # check if the compressed tarball was created + tarball = base_name + '.tar.gz' + assert os.path.exists(tarball) + + # now create another tarball using `tar` + tarball2 = os.path.join(tmpdir, 'archive2.tar.gz') + tar_cmd = ['tar', '-cf', 'archive2.tar', 'dist'] + gzip_cmd = ['gzip', '-f', '-9', 'archive2.tar'] + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + spawn(tar_cmd) + spawn(gzip_cmd) + finally: + os.chdir(old_dir) + + assert os.path.exists(tarball2) + # let's compare both tarballs + assert self._tarinfo(tarball) == self._created_files + assert self._tarinfo(tarball2) == self._created_files + + # trying an uncompressed one + base_name = os.path.join(tmpdir2, 'archive') + old_dir = os.getcwd() + os.chdir(tmpdir) + try: + make_tarball(base_name, 'dist', compress=None) + finally: + os.chdir(old_dir) + tarball = base_name + '.tar' + assert os.path.exists(tarball) + + @pytest.mark.usefixtures('needs_zlib') + def test_make_zipfile(self): + zipfile = pytest.importorskip('zipfile') + # creating something to tar + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + with path.Path(tmpdir): + make_zipfile(base_name, 'dist') + + # check if the compressed tarball was created + tarball = base_name + '.zip' + assert os.path.exists(tarball) + with zipfile.ZipFile(tarball) as zf: + assert sorted(zf.namelist()) == self._zip_created_files + + def test_make_zipfile_no_zlib(self): + zipfile = pytest.importorskip('zipfile') + patch(self, archive_util.zipfile, 'zlib', None) # force zlib ImportError + + called = [] + zipfile_class = zipfile.ZipFile + + def fake_zipfile(*a, **kw): + if kw.get('compression', None) == zipfile.ZIP_STORED: + called.append((a, kw)) + return zipfile_class(*a, **kw) + + patch(self, archive_util.zipfile, 'ZipFile', fake_zipfile) + + # create something to tar and compress + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + with path.Path(tmpdir): + make_zipfile(base_name, 'dist') + + tarball = base_name + '.zip' + assert called == [((tarball, "w"), {'compression': zipfile.ZIP_STORED})] + assert os.path.exists(tarball) + with zipfile.ZipFile(tarball) as zf: + assert sorted(zf.namelist()) == self._zip_created_files + + def test_check_archive_formats(self): + assert check_archive_formats(['gztar', 'xxx', 'zip']) == 'xxx' + assert ( + check_archive_formats(['gztar', 'bztar', 'xztar', 'ztar', 'tar', 'zip']) + is None + ) + + def test_make_archive(self): + tmpdir = self.mkdtemp() + base_name = os.path.join(tmpdir, 'archive') + with pytest.raises(ValueError): + make_archive(base_name, 'xxx') + + def test_make_archive_cwd(self): + current_dir = os.getcwd() + + def _breaks(*args, **kw): + raise RuntimeError() + + ARCHIVE_FORMATS['xxx'] = (_breaks, [], 'xxx file') + try: + try: + make_archive('xxx', 'xxx', root_dir=self.mkdtemp()) + except Exception: + pass + assert os.getcwd() == current_dir + finally: + ARCHIVE_FORMATS.pop('xxx') + + def test_make_archive_tar(self): + base_dir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + res = make_archive(base_name, 'tar', base_dir, 'dist') + assert os.path.exists(res) + assert os.path.basename(res) == 'archive.tar' + assert self._tarinfo(res) == self._created_files + + @pytest.mark.usefixtures('needs_zlib') + def test_make_archive_gztar(self): + base_dir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + res = make_archive(base_name, 'gztar', base_dir, 'dist') + assert os.path.exists(res) + assert os.path.basename(res) == 'archive.tar.gz' + assert self._tarinfo(res) == self._created_files + + def test_make_archive_bztar(self): + pytest.importorskip('bz2') + base_dir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + res = make_archive(base_name, 'bztar', base_dir, 'dist') + assert os.path.exists(res) + assert os.path.basename(res) == 'archive.tar.bz2' + assert self._tarinfo(res) == self._created_files + + def test_make_archive_xztar(self): + pytest.importorskip('lzma') + base_dir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + res = make_archive(base_name, 'xztar', base_dir, 'dist') + assert os.path.exists(res) + assert os.path.basename(res) == 'archive.tar.xz' + assert self._tarinfo(res) == self._created_files + + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support + if UID_0_SUPPORT: + group = grp.getgrgid(0)[0] + owner = pwd.getpwuid(0)[0] + else: + group = owner = 'root' + + base_dir = self._create_files() + root_dir = self.mkdtemp() + base_name = os.path.join(self.mkdtemp(), 'archive') + res = make_archive( + base_name, 'zip', root_dir, base_dir, owner=owner, group=group + ) + assert os.path.exists(res) + + res = make_archive(base_name, 'zip', root_dir, base_dir) + assert os.path.exists(res) + + res = make_archive( + base_name, 'tar', root_dir, base_dir, owner=owner, group=group + ) + assert os.path.exists(res) + + res = make_archive( + base_name, 'tar', root_dir, base_dir, owner='kjhkjhkjg', group='oihohoh' + ) + assert os.path.exists(res) + + @pytest.mark.usefixtures('needs_zlib') + @require_unix_id + @require_uid_0 + def test_tarfile_root_owner(self): + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') + old_dir = os.getcwd() + os.chdir(tmpdir) + group = grp.getgrgid(0)[0] + owner = pwd.getpwuid(0)[0] + try: + archive_name = make_tarball( + base_name, 'dist', compress=None, owner=owner, group=group + ) + finally: + os.chdir(old_dir) + + # check if the compressed tarball was created + assert os.path.exists(archive_name) + + # now checks the rights + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + assert member.uid == 0 + assert member.gid == 0 + finally: + archive.close() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist.py new file mode 100644 index 0000000000000000000000000000000000000000..d5696fc3dcd8081335606dc92badd73a69ceac69 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist.py @@ -0,0 +1,47 @@ +"""Tests for distutils.command.bdist.""" + +from distutils.command.bdist import bdist +from distutils.tests import support + + +class TestBuild(support.TempdirManager): + def test_formats(self): + # let's create a command and make sure + # we can set the format + dist = self.create_dist()[1] + cmd = bdist(dist) + cmd.formats = ['gztar'] + cmd.ensure_finalized() + assert cmd.formats == ['gztar'] + + # what formats does bdist offer? + formats = [ + 'bztar', + 'gztar', + 'rpm', + 'tar', + 'xztar', + 'zip', + 'ztar', + ] + found = sorted(cmd.format_commands) + assert found == formats + + def test_skip_build(self): + # bug #10946: bdist --skip-build should trickle down to subcommands + dist = self.create_dist()[1] + cmd = bdist(dist) + cmd.skip_build = True + cmd.ensure_finalized() + dist.command_obj['bdist'] = cmd + + names = [ + 'bdist_dumb', + ] # bdist_rpm does not support --skip-build + + for name in names: + subcmd = cmd.get_finalized_command(name) + if getattr(subcmd, '_unsupported', False): + # command is not supported on this build + continue + assert subcmd.skip_build, f'{name} should take --skip-build from bdist' diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist_dumb.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist_dumb.py new file mode 100644 index 0000000000000000000000000000000000000000..1fc51d244a78058329c56a618b092e466715e565 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist_dumb.py @@ -0,0 +1,78 @@ +"""Tests for distutils.command.bdist_dumb.""" + +import os +import sys +import zipfile +from distutils.command.bdist_dumb import bdist_dumb +from distutils.core import Distribution +from distutils.tests import support + +import pytest + +SETUP_PY = """\ +from distutils.core import setup +import foo + +setup(name='foo', version='0.1', py_modules=['foo'], + url='xxx', author='xxx', author_email='xxx') + +""" + + +@support.combine_markers +@pytest.mark.usefixtures('save_env') +@pytest.mark.usefixtures('save_argv') +@pytest.mark.usefixtures('save_cwd') +class TestBuildDumb( + support.TempdirManager, +): + @pytest.mark.usefixtures('needs_zlib') + def test_simple_built(self): + # let's create a simple package + tmp_dir = self.mkdtemp() + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({ + 'name': 'foo', + 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', + 'author': 'xxx', + 'author_email': 'xxx', + }) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_dumb(dist) + + # so the output is the same no matter + # what is the platform + cmd.format = 'zip' + + cmd.ensure_finalized() + cmd.run() + + # see what we have + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + base = f"{dist.get_fullname()}.{cmd.plat_name}.zip" + + assert dist_created == [base] + + # now let's check what we have in the zip file + fp = zipfile.ZipFile(os.path.join('dist', base)) + try: + contents = fp.namelist() + finally: + fp.close() + + contents = sorted(filter(None, map(os.path.basename, contents))) + wanted = ['foo-0.1-py{}.{}.egg-info'.format(*sys.version_info[:2]), 'foo.py'] + if not sys.dont_write_bytecode: + wanted.append(f'foo.{sys.implementation.cache_tag}.pyc') + assert contents == sorted(wanted) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist_rpm.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist_rpm.py new file mode 100644 index 0000000000000000000000000000000000000000..75051430e224c8908e22601133a40f5f82ee455a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_bdist_rpm.py @@ -0,0 +1,127 @@ +"""Tests for distutils.command.bdist_rpm.""" + +import os +import shutil # noqa: F401 +import sys +from distutils.command.bdist_rpm import bdist_rpm +from distutils.core import Distribution +from distutils.tests import support + +import pytest +from test.support import requires_zlib + +SETUP_PY = """\ +from distutils.core import setup +import foo + +setup(name='foo', version='0.1', py_modules=['foo'], + url='xxx', author='xxx', author_email='xxx') + +""" + + +@pytest.fixture(autouse=True) +def sys_executable_encodable(): + try: + sys.executable.encode('UTF-8') + except UnicodeEncodeError: + pytest.skip("sys.executable is not encodable to UTF-8") + + +mac_woes = pytest.mark.skipif( + "not sys.platform.startswith('linux')", + reason='spurious sdtout/stderr output under macOS', +) + + +@pytest.mark.usefixtures('save_env') +@pytest.mark.usefixtures('save_argv') +@pytest.mark.usefixtures('save_cwd') +class TestBuildRpm( + support.TempdirManager, +): + @mac_woes + @requires_zlib() + @pytest.mark.skipif("not shutil.which('rpm')") + @pytest.mark.skipif("not shutil.which('rpmbuild')") + def test_quiet(self): + # let's create a package + tmp_dir = self.mkdtemp() + os.environ['HOME'] = tmp_dir # to confine dir '.rpmdb' creation + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({ + 'name': 'foo', + 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', + 'author': 'xxx', + 'author_email': 'xxx', + }) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_rpm(dist) + cmd.fix_python = True + + # running in quiet mode + cmd.quiet = True + cmd.ensure_finalized() + cmd.run() + + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + assert 'foo-0.1-1.noarch.rpm' in dist_created + + # bug #2945: upload ignores bdist_rpm files + assert ('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm') in dist.dist_files + assert ('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm') in dist.dist_files + + @mac_woes + @requires_zlib() + # https://bugs.python.org/issue1533164 + @pytest.mark.skipif("not shutil.which('rpm')") + @pytest.mark.skipif("not shutil.which('rpmbuild')") + def test_no_optimize_flag(self): + # let's create a package that breaks bdist_rpm + tmp_dir = self.mkdtemp() + os.environ['HOME'] = tmp_dir # to confine dir '.rpmdb' creation + pkg_dir = os.path.join(tmp_dir, 'foo') + os.mkdir(pkg_dir) + self.write_file((pkg_dir, 'setup.py'), SETUP_PY) + self.write_file((pkg_dir, 'foo.py'), '#') + self.write_file((pkg_dir, 'MANIFEST.in'), 'include foo.py') + self.write_file((pkg_dir, 'README'), '') + + dist = Distribution({ + 'name': 'foo', + 'version': '0.1', + 'py_modules': ['foo'], + 'url': 'xxx', + 'author': 'xxx', + 'author_email': 'xxx', + }) + dist.script_name = 'setup.py' + os.chdir(pkg_dir) + + sys.argv = ['setup.py'] + cmd = bdist_rpm(dist) + cmd.fix_python = True + + cmd.quiet = True + cmd.ensure_finalized() + cmd.run() + + dist_created = os.listdir(os.path.join(pkg_dir, 'dist')) + assert 'foo-0.1-1.noarch.rpm' in dist_created + + # bug #2945: upload ignores bdist_rpm files + assert ('bdist_rpm', 'any', 'dist/foo-0.1-1.src.rpm') in dist.dist_files + assert ('bdist_rpm', 'any', 'dist/foo-0.1-1.noarch.rpm') in dist.dist_files + + os.remove(os.path.join(pkg_dir, 'dist', 'foo-0.1-1.noarch.rpm')) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build.py new file mode 100644 index 0000000000000000000000000000000000000000..f7fe69acd1ad39cf40d277afd6409648b18df146 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build.py @@ -0,0 +1,49 @@ +"""Tests for distutils.command.build.""" + +import os +import sys +from distutils.command.build import build +from distutils.tests import support +from sysconfig import get_config_var, get_platform + + +class TestBuild(support.TempdirManager): + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = build(dist) + cmd.finalize_options() + + # if not specified, plat_name gets the current platform + assert cmd.plat_name == get_platform() + + # build_purelib is build + lib + wanted = os.path.join(cmd.build_base, 'lib') + assert cmd.build_purelib == wanted + + # build_platlib is 'build/lib.platform-cache_tag[-pydebug]' + # examples: + # build/lib.macosx-10.3-i386-cpython39 + plat_spec = f'.{cmd.plat_name}-{sys.implementation.cache_tag}' + if get_config_var('Py_GIL_DISABLED'): + plat_spec += 't' + if hasattr(sys, 'gettotalrefcount'): + assert cmd.build_platlib.endswith('-pydebug') + plat_spec += '-pydebug' + wanted = os.path.join(cmd.build_base, 'lib' + plat_spec) + assert cmd.build_platlib == wanted + + # by default, build_lib = build_purelib + assert cmd.build_lib == cmd.build_purelib + + # build_temp is build/temp. + wanted = os.path.join(cmd.build_base, 'temp' + plat_spec) + assert cmd.build_temp == wanted + + # build_scripts is build/scripts-x.x + wanted = os.path.join( + cmd.build_base, f'scripts-{sys.version_info.major}.{sys.version_info.minor}' + ) + assert cmd.build_scripts == wanted + + # executable is os.path.normpath(sys.executable) + assert cmd.executable == os.path.normpath(sys.executable) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_clib.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_clib.py new file mode 100644 index 0000000000000000000000000000000000000000..f76f26bcea04ebeaeba20d3c65881198f841c9b5 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_clib.py @@ -0,0 +1,134 @@ +"""Tests for distutils.command.build_clib.""" + +import os +from distutils.command.build_clib import build_clib +from distutils.errors import DistutilsSetupError +from distutils.tests import missing_compiler_executable, support + +import pytest + + +class TestBuildCLib(support.TempdirManager): + def test_check_library_dist(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + # 'libraries' option must be a list + with pytest.raises(DistutilsSetupError): + cmd.check_library_list('foo') + + # each element of 'libraries' must a 2-tuple + with pytest.raises(DistutilsSetupError): + cmd.check_library_list(['foo1', 'foo2']) + + # first element of each tuple in 'libraries' + # must be a string (the library name) + with pytest.raises(DistutilsSetupError): + cmd.check_library_list([(1, 'foo1'), ('name', 'foo2')]) + + # library name may not contain directory separators + with pytest.raises(DistutilsSetupError): + cmd.check_library_list( + [('name', 'foo1'), ('another/name', 'foo2')], + ) + + # second element of each tuple must be a dictionary (build info) + with pytest.raises(DistutilsSetupError): + cmd.check_library_list( + [('name', {}), ('another', 'foo2')], + ) + + # those work + libs = [('name', {}), ('name', {'ok': 'good'})] + cmd.check_library_list(libs) + + def test_get_source_files(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + # "in 'libraries' option 'sources' must be present and must be + # a list of source filenames + cmd.libraries = [('name', {})] + with pytest.raises(DistutilsSetupError): + cmd.get_source_files() + + cmd.libraries = [('name', {'sources': 1})] + with pytest.raises(DistutilsSetupError): + cmd.get_source_files() + + cmd.libraries = [('name', {'sources': ['a', 'b']})] + assert cmd.get_source_files() == ['a', 'b'] + + cmd.libraries = [('name', {'sources': ('a', 'b')})] + assert cmd.get_source_files() == ['a', 'b'] + + cmd.libraries = [ + ('name', {'sources': ('a', 'b')}), + ('name2', {'sources': ['c', 'd']}), + ] + assert cmd.get_source_files() == ['a', 'b', 'c', 'd'] + + def test_build_libraries(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + class FakeCompiler: + def compile(*args, **kw): + pass + + create_static_lib = compile + + cmd.compiler = FakeCompiler() + + # build_libraries is also doing a bit of typo checking + lib = [('name', {'sources': 'notvalid'})] + with pytest.raises(DistutilsSetupError): + cmd.build_libraries(lib) + + lib = [('name', {'sources': list()})] + cmd.build_libraries(lib) + + lib = [('name', {'sources': tuple()})] + cmd.build_libraries(lib) + + def test_finalize_options(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + cmd.include_dirs = 'one-dir' + cmd.finalize_options() + assert cmd.include_dirs == ['one-dir'] + + cmd.include_dirs = None + cmd.finalize_options() + assert cmd.include_dirs == [] + + cmd.distribution.libraries = 'WONTWORK' + with pytest.raises(DistutilsSetupError): + cmd.finalize_options() + + @pytest.mark.skipif('platform.system() == "Windows"') + def test_run(self): + pkg_dir, dist = self.create_dist() + cmd = build_clib(dist) + + foo_c = os.path.join(pkg_dir, 'foo.c') + self.write_file(foo_c, 'int main(void) { return 1;}\n') + cmd.libraries = [('foo', {'sources': [foo_c]})] + + build_temp = os.path.join(pkg_dir, 'build') + os.mkdir(build_temp) + cmd.build_temp = build_temp + cmd.build_clib = build_temp + + # Before we run the command, we want to make sure + # all commands are present on the system. + ccmd = missing_compiler_executable() + if ccmd is not None: + self.skipTest(f'The {ccmd!r} command is not found') + + # this should work + cmd.run() + + # let's check the result + assert 'libfoo.a' in os.listdir(build_temp) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py new file mode 100644 index 0000000000000000000000000000000000000000..dab0507f3d3ec104fb4acfe5b15f92661ff33a37 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py @@ -0,0 +1,628 @@ +import contextlib +import glob +import importlib +import os.path +import platform +import re +import shutil +import site +import subprocess +import sys +import tempfile +import textwrap +import time +from distutils import sysconfig +from distutils.command.build_ext import build_ext +from distutils.core import Distribution +from distutils.errors import ( + CompileError, + DistutilsPlatformError, + DistutilsSetupError, + UnknownFileError, +) +from distutils.extension import Extension +from distutils.tests import missing_compiler_executable +from distutils.tests.support import TempdirManager, copy_xxmodule_c, fixup_build_ext +from io import StringIO + +import jaraco.path +import path +import pytest +from test import support + +from .compat import py39 as import_helper + + +@pytest.fixture() +def user_site_dir(request): + self = request.instance + self.tmp_dir = self.mkdtemp() + self.tmp_path = path.Path(self.tmp_dir) + from distutils.command import build_ext + + orig_user_base = site.USER_BASE + + site.USER_BASE = self.mkdtemp() + build_ext.USER_BASE = site.USER_BASE + + # bpo-30132: On Windows, a .pdb file may be created in the current + # working directory. Create a temporary working directory to cleanup + # everything at the end of the test. + with self.tmp_path: + yield + + site.USER_BASE = orig_user_base + build_ext.USER_BASE = orig_user_base + + if sys.platform == 'cygwin': + time.sleep(1) + + +@contextlib.contextmanager +def safe_extension_import(name, path): + with import_helper.CleanImport(name): + with extension_redirect(name, path) as new_path: + with import_helper.DirsOnSysPath(new_path): + yield + + +@contextlib.contextmanager +def extension_redirect(mod, path): + """ + Tests will fail to tear down an extension module if it's been imported. + + Before importing, copy the file to a temporary directory that won't + be cleaned up. Yield the new path. + """ + if platform.system() != "Windows" and sys.platform != "cygwin": + yield path + return + with import_helper.DirsOnSysPath(path): + spec = importlib.util.find_spec(mod) + filename = os.path.basename(spec.origin) + trash_dir = tempfile.mkdtemp(prefix='deleteme') + dest = os.path.join(trash_dir, os.path.basename(filename)) + shutil.copy(spec.origin, dest) + yield trash_dir + # TODO: can the file be scheduled for deletion? + + +@pytest.mark.usefixtures('user_site_dir') +class TestBuildExt(TempdirManager): + def build_ext(self, *args, **kwargs): + return build_ext(*args, **kwargs) + + @pytest.mark.parametrize("copy_so", [False]) + def test_build_ext(self, copy_so): + missing_compiler_executable() + copy_xxmodule_c(self.tmp_dir) + xx_c = os.path.join(self.tmp_dir, 'xxmodule.c') + xx_ext = Extension('xx', [xx_c]) + if sys.platform != "win32": + if not copy_so: + xx_ext = Extension( + 'xx', + [xx_c], + library_dirs=['/usr/lib'], + libraries=['z'], + runtime_library_dirs=['/usr/lib'], + ) + elif sys.platform == 'linux': + libz_so = { + os.path.realpath(name) for name in glob.iglob('/usr/lib*/libz.so*') + } + libz_so = sorted(libz_so, key=lambda lib_path: len(lib_path)) + shutil.copyfile(libz_so[-1], '/tmp/libxx_z.so') + + xx_ext = Extension( + 'xx', + [xx_c], + library_dirs=['/tmp'], + libraries=['xx_z'], + runtime_library_dirs=['/tmp'], + ) + dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]}) + dist.package_dir = self.tmp_dir + cmd = self.build_ext(dist) + fixup_build_ext(cmd) + cmd.build_lib = self.tmp_dir + cmd.build_temp = self.tmp_dir + + old_stdout = sys.stdout + if not support.verbose: + # silence compiler output + sys.stdout = StringIO() + try: + cmd.ensure_finalized() + cmd.run() + finally: + sys.stdout = old_stdout + + with safe_extension_import('xx', self.tmp_dir): + self._test_xx(copy_so) + + if sys.platform == 'linux' and copy_so: + os.unlink('/tmp/libxx_z.so') + + @staticmethod + def _test_xx(copy_so): + import xx # type: ignore[import-not-found] # Module generated for tests + + for attr in ('error', 'foo', 'new', 'roj'): + assert hasattr(xx, attr) + + assert xx.foo(2, 5) == 7 + assert xx.foo(13, 15) == 28 + assert xx.new().demo() is None + if support.HAVE_DOCSTRINGS: + doc = 'This is a template module just for instruction.' + assert xx.__doc__ == doc + assert isinstance(xx.Null(), xx.Null) + assert isinstance(xx.Str(), xx.Str) + + if sys.platform == 'linux': + so_headers = subprocess.check_output( + ["readelf", "-d", xx.__file__], universal_newlines=True + ) + import pprint + + pprint.pprint(so_headers) + rpaths = [ + rpath + for line in so_headers.split("\n") + if "RPATH" in line or "RUNPATH" in line + for rpath in line.split()[2][1:-1].split(":") + ] + if not copy_so: + pprint.pprint(rpaths) + # Linked against a library in /usr/lib{,64} + assert "/usr/lib" not in rpaths and "/usr/lib64" not in rpaths + else: + # Linked against a library in /tmp + assert "/tmp" in rpaths + # The import is the real test here + + def test_solaris_enable_shared(self): + dist = Distribution({'name': 'xx'}) + cmd = self.build_ext(dist) + old = sys.platform + + sys.platform = 'sunos' # fooling finalize_options + from distutils.sysconfig import _config_vars + + old_var = _config_vars.get('Py_ENABLE_SHARED') + _config_vars['Py_ENABLE_SHARED'] = True + try: + cmd.ensure_finalized() + finally: + sys.platform = old + if old_var is None: + del _config_vars['Py_ENABLE_SHARED'] + else: + _config_vars['Py_ENABLE_SHARED'] = old_var + + # make sure we get some library dirs under solaris + assert len(cmd.library_dirs) > 0 + + def test_user_site(self): + import site + + dist = Distribution({'name': 'xx'}) + cmd = self.build_ext(dist) + + # making sure the user option is there + options = [name for name, short, label in cmd.user_options] + assert 'user' in options + + # setting a value + cmd.user = True + + # setting user based lib and include + lib = os.path.join(site.USER_BASE, 'lib') + incl = os.path.join(site.USER_BASE, 'include') + os.mkdir(lib) + os.mkdir(incl) + + # let's run finalize + cmd.ensure_finalized() + + # see if include_dirs and library_dirs + # were set + assert lib in cmd.library_dirs + assert lib in cmd.rpath + assert incl in cmd.include_dirs + + def test_optional_extension(self): + # this extension will fail, but let's ignore this failure + # with the optional argument. + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = self.build_ext(dist) + cmd.ensure_finalized() + with pytest.raises((UnknownFileError, CompileError)): + cmd.run() # should raise an error + + modules = [Extension('foo', ['xxx'], optional=True)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = self.build_ext(dist) + cmd.ensure_finalized() + cmd.run() # should pass + + def test_finalize_options(self): + # Make sure Python's include directories (for Python.h, pyconfig.h, + # etc.) are in the include search path. + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = self.build_ext(dist) + cmd.finalize_options() + + py_include = sysconfig.get_python_inc() + for p in py_include.split(os.path.pathsep): + assert p in cmd.include_dirs + + plat_py_include = sysconfig.get_python_inc(plat_specific=True) + for p in plat_py_include.split(os.path.pathsep): + assert p in cmd.include_dirs + + # make sure cmd.libraries is turned into a list + # if it's a string + cmd = self.build_ext(dist) + cmd.libraries = 'my_lib, other_lib lastlib' + cmd.finalize_options() + assert cmd.libraries == ['my_lib', 'other_lib', 'lastlib'] + + # make sure cmd.library_dirs is turned into a list + # if it's a string + cmd = self.build_ext(dist) + cmd.library_dirs = f'my_lib_dir{os.pathsep}other_lib_dir' + cmd.finalize_options() + assert 'my_lib_dir' in cmd.library_dirs + assert 'other_lib_dir' in cmd.library_dirs + + # make sure rpath is turned into a list + # if it's a string + cmd = self.build_ext(dist) + cmd.rpath = f'one{os.pathsep}two' + cmd.finalize_options() + assert cmd.rpath == ['one', 'two'] + + # make sure cmd.link_objects is turned into a list + # if it's a string + cmd = build_ext(dist) + cmd.link_objects = 'one two,three' + cmd.finalize_options() + assert cmd.link_objects == ['one', 'two', 'three'] + + # XXX more tests to perform for win32 + + # make sure define is turned into 2-tuples + # strings if they are ','-separated strings + cmd = self.build_ext(dist) + cmd.define = 'one,two' + cmd.finalize_options() + assert cmd.define == [('one', '1'), ('two', '1')] + + # make sure undef is turned into a list of + # strings if they are ','-separated strings + cmd = self.build_ext(dist) + cmd.undef = 'one,two' + cmd.finalize_options() + assert cmd.undef == ['one', 'two'] + + # make sure swig_opts is turned into a list + cmd = self.build_ext(dist) + cmd.swig_opts = None + cmd.finalize_options() + assert cmd.swig_opts == [] + + cmd = self.build_ext(dist) + cmd.swig_opts = '1 2' + cmd.finalize_options() + assert cmd.swig_opts == ['1', '2'] + + def test_check_extensions_list(self): + dist = Distribution() + cmd = self.build_ext(dist) + cmd.finalize_options() + + # 'extensions' option must be a list of Extension instances + with pytest.raises(DistutilsSetupError): + cmd.check_extensions_list('foo') + + # each element of 'ext_modules' option must be an + # Extension instance or 2-tuple + exts = [('bar', 'foo', 'bar'), 'foo'] + with pytest.raises(DistutilsSetupError): + cmd.check_extensions_list(exts) + + # first element of each tuple in 'ext_modules' + # must be the extension name (a string) and match + # a python dotted-separated name + exts = [('foo-bar', '')] + with pytest.raises(DistutilsSetupError): + cmd.check_extensions_list(exts) + + # second element of each tuple in 'ext_modules' + # must be a dictionary (build info) + exts = [('foo.bar', '')] + with pytest.raises(DistutilsSetupError): + cmd.check_extensions_list(exts) + + # ok this one should pass + exts = [('foo.bar', {'sources': [''], 'libraries': 'foo', 'some': 'bar'})] + cmd.check_extensions_list(exts) + ext = exts[0] + assert isinstance(ext, Extension) + + # check_extensions_list adds in ext the values passed + # when they are in ('include_dirs', 'library_dirs', 'libraries' + # 'extra_objects', 'extra_compile_args', 'extra_link_args') + assert ext.libraries == 'foo' + assert not hasattr(ext, 'some') + + # 'macros' element of build info dict must be 1- or 2-tuple + exts = [ + ( + 'foo.bar', + { + 'sources': [''], + 'libraries': 'foo', + 'some': 'bar', + 'macros': [('1', '2', '3'), 'foo'], + }, + ) + ] + with pytest.raises(DistutilsSetupError): + cmd.check_extensions_list(exts) + + exts[0][1]['macros'] = [('1', '2'), ('3',)] + cmd.check_extensions_list(exts) + assert exts[0].undef_macros == ['3'] + assert exts[0].define_macros == [('1', '2')] + + def test_get_source_files(self): + modules = [Extension('foo', ['xxx'], optional=False)] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = self.build_ext(dist) + cmd.ensure_finalized() + assert cmd.get_source_files() == ['xxx'] + + def test_unicode_module_names(self): + modules = [ + Extension('foo', ['aaa'], optional=False), + Extension('föö', ['uuu'], optional=False), + ] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = self.build_ext(dist) + cmd.ensure_finalized() + assert re.search(r'foo(_d)?\..*', cmd.get_ext_filename(modules[0].name)) + assert re.search(r'föö(_d)?\..*', cmd.get_ext_filename(modules[1].name)) + assert cmd.get_export_symbols(modules[0]) == ['PyInit_foo'] + assert cmd.get_export_symbols(modules[1]) == ['PyInitU_f_1gaa'] + + def test_export_symbols__init__(self): + # https://github.com/python/cpython/issues/80074 + # https://github.com/pypa/setuptools/issues/4826 + modules = [ + Extension('foo.__init__', ['aaa']), + Extension('föö.__init__', ['uuu']), + ] + dist = Distribution({'name': 'xx', 'ext_modules': modules}) + cmd = self.build_ext(dist) + cmd.ensure_finalized() + assert cmd.get_export_symbols(modules[0]) == ['PyInit_foo'] + assert cmd.get_export_symbols(modules[1]) == ['PyInitU_f_1gaa'] + + def test_compiler_option(self): + # cmd.compiler is an option and + # should not be overridden by a compiler instance + # when the command is run + dist = Distribution() + cmd = self.build_ext(dist) + cmd.compiler = 'unix' + cmd.ensure_finalized() + cmd.run() + assert cmd.compiler == 'unix' + + def test_get_outputs(self): + missing_compiler_executable() + tmp_dir = self.mkdtemp() + c_file = os.path.join(tmp_dir, 'foo.c') + self.write_file(c_file, 'void PyInit_foo(void) {}\n') + ext = Extension('foo', [c_file], optional=False) + dist = Distribution({'name': 'xx', 'ext_modules': [ext]}) + cmd = self.build_ext(dist) + fixup_build_ext(cmd) + cmd.ensure_finalized() + assert len(cmd.get_outputs()) == 1 + + cmd.build_lib = os.path.join(self.tmp_dir, 'build') + cmd.build_temp = os.path.join(self.tmp_dir, 'tempt') + + # issue #5977 : distutils build_ext.get_outputs + # returns wrong result with --inplace + other_tmp_dir = os.path.realpath(self.mkdtemp()) + old_wd = os.getcwd() + os.chdir(other_tmp_dir) + try: + cmd.inplace = True + cmd.run() + so_file = cmd.get_outputs()[0] + finally: + os.chdir(old_wd) + assert os.path.exists(so_file) + ext_suffix = sysconfig.get_config_var('EXT_SUFFIX') + assert so_file.endswith(ext_suffix) + so_dir = os.path.dirname(so_file) + assert so_dir == other_tmp_dir + + cmd.inplace = False + cmd.compiler = None + cmd.run() + so_file = cmd.get_outputs()[0] + assert os.path.exists(so_file) + assert so_file.endswith(ext_suffix) + so_dir = os.path.dirname(so_file) + assert so_dir == cmd.build_lib + + # inplace = False, cmd.package = 'bar' + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {'': 'bar'} + path = cmd.get_ext_fullpath('foo') + # checking that the last directory is the build_dir + path = os.path.split(path)[0] + assert path == cmd.build_lib + + # inplace = True, cmd.package = 'bar' + cmd.inplace = True + other_tmp_dir = os.path.realpath(self.mkdtemp()) + old_wd = os.getcwd() + os.chdir(other_tmp_dir) + try: + path = cmd.get_ext_fullpath('foo') + finally: + os.chdir(old_wd) + # checking that the last directory is bar + path = os.path.split(path)[0] + lastdir = os.path.split(path)[-1] + assert lastdir == 'bar' + + def test_ext_fullpath(self): + ext = sysconfig.get_config_var('EXT_SUFFIX') + # building lxml.etree inplace + # etree_c = os.path.join(self.tmp_dir, 'lxml.etree.c') + # etree_ext = Extension('lxml.etree', [etree_c]) + # dist = Distribution({'name': 'lxml', 'ext_modules': [etree_ext]}) + dist = Distribution() + cmd = self.build_ext(dist) + cmd.inplace = True + cmd.distribution.package_dir = {'': 'src'} + cmd.distribution.packages = ['lxml', 'lxml.html'] + curdir = os.getcwd() + wanted = os.path.join(curdir, 'src', 'lxml', 'etree' + ext) + path = cmd.get_ext_fullpath('lxml.etree') + assert wanted == path + + # building lxml.etree not inplace + cmd.inplace = False + cmd.build_lib = os.path.join(curdir, 'tmpdir') + wanted = os.path.join(curdir, 'tmpdir', 'lxml', 'etree' + ext) + path = cmd.get_ext_fullpath('lxml.etree') + assert wanted == path + + # building twisted.runner.portmap not inplace + build_py = cmd.get_finalized_command('build_py') + build_py.package_dir = {} + cmd.distribution.packages = ['twisted', 'twisted.runner.portmap'] + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'tmpdir', 'twisted', 'runner', 'portmap' + ext) + assert wanted == path + + # building twisted.runner.portmap inplace + cmd.inplace = True + path = cmd.get_ext_fullpath('twisted.runner.portmap') + wanted = os.path.join(curdir, 'twisted', 'runner', 'portmap' + ext) + assert wanted == path + + @pytest.mark.skipif('platform.system() != "Darwin"') + @pytest.mark.usefixtures('save_env') + def test_deployment_target_default(self): + # Issue 9516: Test that, in the absence of the environment variable, + # an extension module is compiled with the same deployment target as + # the interpreter. + self._try_compile_deployment_target('==', None) + + @pytest.mark.skipif('platform.system() != "Darwin"') + @pytest.mark.usefixtures('save_env') + def test_deployment_target_too_low(self): + # Issue 9516: Test that an extension module is not allowed to be + # compiled with a deployment target less than that of the interpreter. + with pytest.raises(DistutilsPlatformError): + self._try_compile_deployment_target('>', '10.1') + + @pytest.mark.skipif('platform.system() != "Darwin"') + @pytest.mark.usefixtures('save_env') + def test_deployment_target_higher_ok(self): # pragma: no cover + # Issue 9516: Test that an extension module can be compiled with a + # deployment target higher than that of the interpreter: the ext + # module may depend on some newer OS feature. + deptarget = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') + if deptarget: + # increment the minor version number (i.e. 10.6 -> 10.7) + deptarget = [int(x) for x in deptarget.split('.')] + deptarget[-1] += 1 + deptarget = '.'.join(str(i) for i in deptarget) + self._try_compile_deployment_target('<', deptarget) + + def _try_compile_deployment_target(self, operator, target): # pragma: no cover + if target is None: + if os.environ.get('MACOSX_DEPLOYMENT_TARGET'): + del os.environ['MACOSX_DEPLOYMENT_TARGET'] + else: + os.environ['MACOSX_DEPLOYMENT_TARGET'] = target + + jaraco.path.build( + { + 'deptargetmodule.c': textwrap.dedent(f"""\ + #include + + int dummy; + + #if TARGET {operator} MAC_OS_X_VERSION_MIN_REQUIRED + #else + #error "Unexpected target" + #endif + + """), + }, + self.tmp_path, + ) + + # get the deployment target that the interpreter was built with + target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') + target = tuple(map(int, target.split('.')[0:2])) + # format the target value as defined in the Apple + # Availability Macros. We can't use the macro names since + # at least one value we test with will not exist yet. + if target[:2] < (10, 10): + # for 10.1 through 10.9.x -> "10n0" + tmpl = '{:02}{:01}0' + else: + # for 10.10 and beyond -> "10nn00" + if len(target) >= 2: + tmpl = '{:02}{:02}00' + else: + # 11 and later can have no minor version (11 instead of 11.0) + tmpl = '{:02}0000' + target = tmpl.format(*target) + deptarget_ext = Extension( + 'deptarget', + [self.tmp_path / 'deptargetmodule.c'], + extra_compile_args=[f'-DTARGET={target}'], + ) + dist = Distribution({'name': 'deptarget', 'ext_modules': [deptarget_ext]}) + dist.package_dir = self.tmp_dir + cmd = self.build_ext(dist) + cmd.build_lib = self.tmp_dir + cmd.build_temp = self.tmp_dir + + try: + old_stdout = sys.stdout + if not support.verbose: + # silence compiler output + sys.stdout = StringIO() + try: + cmd.ensure_finalized() + cmd.run() + finally: + sys.stdout = old_stdout + + except CompileError: + self.fail("Wrong deployment target during compilation") + + +class TestParallelBuildExt(TestBuildExt): + def build_ext(self, *args, **kwargs): + build_ext = super().build_ext(*args, **kwargs) + build_ext.parallel = True + return build_ext diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_py.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_py.py new file mode 100644 index 0000000000000000000000000000000000000000..b316ed43a11836210caeb7177bd8890a1f61d1bb --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_py.py @@ -0,0 +1,196 @@ +"""Tests for distutils.command.build_py.""" + +import os +import sys +from distutils.command.build_py import build_py +from distutils.core import Distribution +from distutils.errors import DistutilsFileError +from distutils.tests import support + +import jaraco.path +import pytest + + +@support.combine_markers +class TestBuildPy(support.TempdirManager): + def test_package_data(self): + sources = self.mkdtemp() + jaraco.path.build( + { + '__init__.py': "# Pretend this is a package.", + 'README.txt': 'Info about this package', + }, + sources, + ) + + destination = self.mkdtemp() + + dist = Distribution({"packages": ["pkg"], "package_dir": {"pkg": sources}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.command_obj["build"] = support.DummyCommand( + force=False, build_lib=destination + ) + dist.packages = ["pkg"] + dist.package_data = {"pkg": ["README.txt"]} + dist.package_dir = {"pkg": sources} + + cmd = build_py(dist) + cmd.compile = True + cmd.ensure_finalized() + assert cmd.package_data == dist.package_data + + cmd.run() + + # This makes sure the list of outputs includes byte-compiled + # files for Python modules but not for package data files + # (there shouldn't *be* byte-code files for those!). + assert len(cmd.get_outputs()) == 3 + pkgdest = os.path.join(destination, "pkg") + files = os.listdir(pkgdest) + pycache_dir = os.path.join(pkgdest, "__pycache__") + assert "__init__.py" in files + assert "README.txt" in files + if sys.dont_write_bytecode: + assert not os.path.exists(pycache_dir) + else: + pyc_files = os.listdir(pycache_dir) + assert f"__init__.{sys.implementation.cache_tag}.pyc" in pyc_files + + def test_empty_package_dir(self): + # See bugs #1668596/#1720897 + sources = self.mkdtemp() + jaraco.path.build({'__init__.py': '', 'doc': {'testfile': ''}}, sources) + + os.chdir(sources) + dist = Distribution({ + "packages": ["pkg"], + "package_dir": {"pkg": ""}, + "package_data": {"pkg": ["doc/*"]}, + }) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data test when package_dir is ''") + + @pytest.mark.skipif('sys.dont_write_bytecode') + def test_byte_compile(self): + project_dir, dist = self.create_dist(py_modules=['boiledeggs']) + os.chdir(project_dir) + self.write_file('boiledeggs.py', 'import antigravity') + cmd = build_py(dist) + cmd.compile = True + cmd.build_lib = 'here' + cmd.finalize_options() + cmd.run() + + found = os.listdir(cmd.build_lib) + assert sorted(found) == ['__pycache__', 'boiledeggs.py'] + found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) + assert found == [f'boiledeggs.{sys.implementation.cache_tag}.pyc'] + + @pytest.mark.skipif('sys.dont_write_bytecode') + def test_byte_compile_optimized(self): + project_dir, dist = self.create_dist(py_modules=['boiledeggs']) + os.chdir(project_dir) + self.write_file('boiledeggs.py', 'import antigravity') + cmd = build_py(dist) + cmd.compile = False + cmd.optimize = 1 + cmd.build_lib = 'here' + cmd.finalize_options() + cmd.run() + + found = os.listdir(cmd.build_lib) + assert sorted(found) == ['__pycache__', 'boiledeggs.py'] + found = os.listdir(os.path.join(cmd.build_lib, '__pycache__')) + expect = f'boiledeggs.{sys.implementation.cache_tag}.opt-1.pyc' + assert sorted(found) == [expect] + + def test_dir_in_package_data(self): + """ + A directory in package_data should not be added to the filelist. + """ + # See bug 19286 + sources = self.mkdtemp() + jaraco.path.build( + { + 'pkg': { + '__init__.py': '', + 'doc': { + 'testfile': '', + # create a directory that could be incorrectly detected as a file + 'otherdir': {}, + }, + } + }, + sources, + ) + + os.chdir(sources) + dist = Distribution({"packages": ["pkg"], "package_data": {"pkg": ["doc/*"]}}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(sources, "setup.py") + dist.script_args = ["build"] + dist.parse_command_line() + + try: + dist.run_commands() + except DistutilsFileError: + self.fail("failed package_data when data dir includes a dir") + + def test_dont_write_bytecode(self, caplog): + # makes sure byte_compile is not used + dist = self.create_dist()[1] + cmd = build_py(dist) + cmd.compile = True + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + assert 'byte-compiling is disabled' in caplog.records[0].message + + def test_namespace_package_does_not_warn(self, caplog): + """ + Originally distutils implementation did not account for PEP 420 + and included warns for package directories that did not contain + ``__init__.py`` files. + After the acceptance of PEP 420, these warnings don't make more sense + so we want to ensure there are not displayed to not confuse the users. + """ + # Create a fake project structure with a package namespace: + tmp = self.mkdtemp() + jaraco.path.build({'ns': {'pkg': {'module.py': ''}}}, tmp) + os.chdir(tmp) + + # Configure the package: + attrs = { + "name": "ns.pkg", + "packages": ["ns", "ns.pkg"], + "script_name": "setup.py", + } + dist = Distribution(attrs) + + # Run code paths that would trigger the trap: + cmd = dist.get_command_obj("build_py") + cmd.finalize_options() + modules = cmd.find_all_modules() + assert len(modules) == 1 + module_path = modules[0][-1] + assert module_path.replace(os.sep, "/") == "ns/pkg/module.py" + + cmd.run() + + assert not any( + "package init file" in msg and "not found" in msg for msg in caplog.messages + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_scripts.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_scripts.py new file mode 100644 index 0000000000000000000000000000000000000000..3582f691ef578a419555c6ffbba6a619310517a6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_build_scripts.py @@ -0,0 +1,96 @@ +"""Tests for distutils.command.build_scripts.""" + +import os +import textwrap +from distutils import sysconfig +from distutils.command.build_scripts import build_scripts +from distutils.core import Distribution +from distutils.tests import support + +import jaraco.path + + +class TestBuildScripts(support.TempdirManager): + def test_default_settings(self): + cmd = self.get_build_scripts_cmd("/foo/bar", []) + assert not cmd.force + assert cmd.build_dir is None + + cmd.finalize_options() + + assert cmd.force + assert cmd.build_dir == "/foo/bar" + + def test_build(self): + source = self.mkdtemp() + target = self.mkdtemp() + expected = self.write_sample_scripts(source) + + cmd = self.get_build_scripts_cmd( + target, [os.path.join(source, fn) for fn in expected] + ) + cmd.finalize_options() + cmd.run() + + built = os.listdir(target) + for name in expected: + assert name in built + + def get_build_scripts_cmd(self, target, scripts): + import sys + + dist = Distribution() + dist.scripts = scripts + dist.command_obj["build"] = support.DummyCommand( + build_scripts=target, force=True, executable=sys.executable + ) + return build_scripts(dist) + + @staticmethod + def write_sample_scripts(dir): + spec = { + 'script1.py': textwrap.dedent(""" + #! /usr/bin/env python2.3 + # bogus script w/ Python sh-bang + pass + """).lstrip(), + 'script2.py': textwrap.dedent(""" + #!/usr/bin/python + # bogus script w/ Python sh-bang + pass + """).lstrip(), + 'shell.sh': textwrap.dedent(""" + #!/bin/sh + # bogus shell script w/ sh-bang + exit 0 + """).lstrip(), + } + jaraco.path.build(spec, dir) + return list(spec) + + def test_version_int(self): + source = self.mkdtemp() + target = self.mkdtemp() + expected = self.write_sample_scripts(source) + + cmd = self.get_build_scripts_cmd( + target, [os.path.join(source, fn) for fn in expected] + ) + cmd.finalize_options() + + # https://bugs.python.org/issue4524 + # + # On linux-g++-32 with command line `./configure --enable-ipv6 + # --with-suffix=3`, python is compiled okay but the build scripts + # failed when writing the name of the executable + old = sysconfig.get_config_vars().get('VERSION') + sysconfig._config_vars['VERSION'] = 4 + try: + cmd.run() + finally: + if old is not None: + sysconfig._config_vars['VERSION'] = old + + built = os.listdir(target) + for name in expected: + assert name in built diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_check.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_check.py new file mode 100644 index 0000000000000000000000000000000000000000..b672b1f972b46f399eb5b2ef263da2548d52ef89 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_check.py @@ -0,0 +1,194 @@ +"""Tests for distutils.command.check.""" + +import os +import textwrap +from distutils.command.check import check +from distutils.errors import DistutilsSetupError +from distutils.tests import support + +import pytest + +try: + import pygments +except ImportError: + pygments = None + + +HERE = os.path.dirname(__file__) + + +@support.combine_markers +class TestCheck(support.TempdirManager): + def _run(self, metadata=None, cwd=None, **options): + if metadata is None: + metadata = {} + if cwd is not None: + old_dir = os.getcwd() + os.chdir(cwd) + pkg_info, dist = self.create_dist(**metadata) + cmd = check(dist) + cmd.initialize_options() + for name, value in options.items(): + setattr(cmd, name, value) + cmd.ensure_finalized() + cmd.run() + if cwd is not None: + os.chdir(old_dir) + return cmd + + def test_check_metadata(self): + # let's run the command with no metadata at all + # by default, check is checking the metadata + # should have some warnings + cmd = self._run() + assert cmd._warnings == 1 + + # now let's add the required fields + # and run it again, to make sure we don't get + # any warning anymore + metadata = { + 'url': 'xxx', + 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', + 'version': 'xxx', + } + cmd = self._run(metadata) + assert cmd._warnings == 0 + + # now with the strict mode, we should + # get an error if there are missing metadata + with pytest.raises(DistutilsSetupError): + self._run({}, **{'strict': 1}) + + # and of course, no error when all metadata are present + cmd = self._run(metadata, strict=True) + assert cmd._warnings == 0 + + # now a test with non-ASCII characters + metadata = { + 'url': 'xxx', + 'author': '\u00c9ric', + 'author_email': 'xxx', + 'name': 'xxx', + 'version': 'xxx', + 'description': 'Something about esszet \u00df', + 'long_description': 'More things about esszet \u00df', + } + cmd = self._run(metadata) + assert cmd._warnings == 0 + + def test_check_author_maintainer(self): + for kind in ("author", "maintainer"): + # ensure no warning when author_email or maintainer_email is given + # (the spec allows these fields to take the form "Name ") + metadata = { + 'url': 'xxx', + kind + '_email': 'Name ', + 'name': 'xxx', + 'version': 'xxx', + } + cmd = self._run(metadata) + assert cmd._warnings == 0 + + # the check should not warn if only email is given + metadata[kind + '_email'] = 'name@email.com' + cmd = self._run(metadata) + assert cmd._warnings == 0 + + # the check should not warn if only the name is given + metadata[kind] = "Name" + del metadata[kind + '_email'] + cmd = self._run(metadata) + assert cmd._warnings == 0 + + def test_check_document(self): + pytest.importorskip('docutils') + pkg_info, dist = self.create_dist() + cmd = check(dist) + + # let's see if it detects broken rest + broken_rest = 'title\n===\n\ntest' + msgs = cmd._check_rst_data(broken_rest) + assert len(msgs) == 1 + + # and non-broken rest + rest = 'title\n=====\n\ntest' + msgs = cmd._check_rst_data(rest) + assert len(msgs) == 0 + + def test_check_restructuredtext(self): + pytest.importorskip('docutils') + # let's see if it detects broken rest in long_description + broken_rest = 'title\n===\n\ntest' + pkg_info, dist = self.create_dist(long_description=broken_rest) + cmd = check(dist) + cmd.check_restructuredtext() + assert cmd._warnings == 1 + + # let's see if we have an error with strict=True + metadata = { + 'url': 'xxx', + 'author': 'xxx', + 'author_email': 'xxx', + 'name': 'xxx', + 'version': 'xxx', + 'long_description': broken_rest, + } + with pytest.raises(DistutilsSetupError): + self._run(metadata, **{'strict': 1, 'restructuredtext': 1}) + + # and non-broken rest, including a non-ASCII character to test #12114 + metadata['long_description'] = 'title\n=====\n\ntest \u00df' + cmd = self._run(metadata, strict=True, restructuredtext=True) + assert cmd._warnings == 0 + + # check that includes work to test #31292 + metadata['long_description'] = 'title\n=====\n\n.. include:: includetest.rst' + cmd = self._run(metadata, cwd=HERE, strict=True, restructuredtext=True) + assert cmd._warnings == 0 + + def test_check_restructuredtext_with_syntax_highlight(self): + pytest.importorskip('docutils') + # Don't fail if there is a `code` or `code-block` directive + + example_rst_docs = [ + textwrap.dedent( + """\ + Here's some code: + + .. code:: python + + def foo(): + pass + """ + ), + textwrap.dedent( + """\ + Here's some code: + + .. code-block:: python + + def foo(): + pass + """ + ), + ] + + for rest_with_code in example_rst_docs: + pkg_info, dist = self.create_dist(long_description=rest_with_code) + cmd = check(dist) + cmd.check_restructuredtext() + msgs = cmd._check_rst_data(rest_with_code) + if pygments is not None: + assert len(msgs) == 0 + else: + assert len(msgs) == 1 + assert ( + str(msgs[0][1]) + == 'Cannot analyze code. Pygments package not found.' + ) + + def test_check_all(self): + with pytest.raises(DistutilsSetupError): + self._run({}, **{'strict': 1, 'restructuredtext': 1}) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_clean.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_clean.py new file mode 100644 index 0000000000000000000000000000000000000000..cc78f30f34b323845b977b9147c2153390774bd3 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_clean.py @@ -0,0 +1,45 @@ +"""Tests for distutils.command.clean.""" + +import os +from distutils.command.clean import clean +from distutils.tests import support + + +class TestClean(support.TempdirManager): + def test_simple_run(self): + pkg_dir, dist = self.create_dist() + cmd = clean(dist) + + # let's add some elements clean should remove + dirs = [ + (d, os.path.join(pkg_dir, d)) + for d in ( + 'build_temp', + 'build_lib', + 'bdist_base', + 'build_scripts', + 'build_base', + ) + ] + + for name, path in dirs: + os.mkdir(path) + setattr(cmd, name, path) + if name == 'build_base': + continue + for f in ('one', 'two', 'three'): + self.write_file(os.path.join(path, f)) + + # let's run the command + cmd.all = 1 + cmd.ensure_finalized() + cmd.run() + + # make sure the files where removed + for _name, path in dirs: + assert not os.path.exists(path), f'{path} was not removed' + + # let's run the command again (should spit warnings but succeed) + cmd.all = 1 + cmd.ensure_finalized() + cmd.run() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_cmd.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_cmd.py new file mode 100644 index 0000000000000000000000000000000000000000..76e8f5989b3b102a32239436ff3b65f26e09e029 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_cmd.py @@ -0,0 +1,107 @@ +"""Tests for distutils.cmd.""" + +import os +from distutils import debug +from distutils.cmd import Command +from distutils.dist import Distribution +from distutils.errors import DistutilsOptionError + +import pytest + + +class MyCmd(Command): + def initialize_options(self): + pass + + +@pytest.fixture +def cmd(request): + return MyCmd(Distribution()) + + +class TestCommand: + def test_ensure_string_list(self, cmd): + cmd.not_string_list = ['one', 2, 'three'] + cmd.yes_string_list = ['one', 'two', 'three'] + cmd.not_string_list2 = object() + cmd.yes_string_list2 = 'ok' + cmd.ensure_string_list('yes_string_list') + cmd.ensure_string_list('yes_string_list2') + + with pytest.raises(DistutilsOptionError): + cmd.ensure_string_list('not_string_list') + + with pytest.raises(DistutilsOptionError): + cmd.ensure_string_list('not_string_list2') + + cmd.option1 = 'ok,dok' + cmd.ensure_string_list('option1') + assert cmd.option1 == ['ok', 'dok'] + + cmd.option2 = ['xxx', 'www'] + cmd.ensure_string_list('option2') + + cmd.option3 = ['ok', 2] + with pytest.raises(DistutilsOptionError): + cmd.ensure_string_list('option3') + + def test_make_file(self, cmd): + # making sure it raises when infiles is not a string or a list/tuple + with pytest.raises(TypeError): + cmd.make_file(infiles=True, outfile='', func='func', args=()) + + # making sure execute gets called properly + def _execute(func, args, exec_msg, level): + assert exec_msg == 'generating out from in' + + cmd.force = True + cmd.execute = _execute + cmd.make_file(infiles='in', outfile='out', func='func', args=()) + + def test_dump_options(self, cmd): + msgs = [] + + def _announce(msg, level): + msgs.append(msg) + + cmd.announce = _announce + cmd.option1 = 1 + cmd.option2 = 1 + cmd.user_options = [('option1', '', ''), ('option2', '', '')] + cmd.dump_options() + + wanted = ["command options for 'MyCmd':", ' option1 = 1', ' option2 = 1'] + assert msgs == wanted + + def test_ensure_string(self, cmd): + cmd.option1 = 'ok' + cmd.ensure_string('option1') + + cmd.option2 = None + cmd.ensure_string('option2', 'xxx') + assert hasattr(cmd, 'option2') + + cmd.option3 = 1 + with pytest.raises(DistutilsOptionError): + cmd.ensure_string('option3') + + def test_ensure_filename(self, cmd): + cmd.option1 = __file__ + cmd.ensure_filename('option1') + cmd.option2 = 'xxx' + with pytest.raises(DistutilsOptionError): + cmd.ensure_filename('option2') + + def test_ensure_dirname(self, cmd): + cmd.option1 = os.path.dirname(__file__) or os.curdir + cmd.ensure_dirname('option1') + cmd.option2 = 'xxx' + with pytest.raises(DistutilsOptionError): + cmd.ensure_dirname('option2') + + def test_debug_print(self, cmd, capsys, monkeypatch): + cmd.debug_print('xxx') + assert capsys.readouterr().out == '' + monkeypatch.setattr(debug, 'DEBUG', True) + cmd.debug_print('xxx') + assert capsys.readouterr().out == 'xxx\n' diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_config_cmd.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_config_cmd.py new file mode 100644 index 0000000000000000000000000000000000000000..ebee2ef93f0bc9d422984e2e4872665b1be3a1de --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_config_cmd.py @@ -0,0 +1,87 @@ +"""Tests for distutils.command.config.""" + +import os +import sys +from distutils._log import log +from distutils.command.config import config, dump_file +from distutils.tests import missing_compiler_executable, support + +import more_itertools +import path +import pytest + + +@pytest.fixture(autouse=True) +def info_log(request, monkeypatch): + self = request.instance + self._logs = [] + monkeypatch.setattr(log, 'info', self._info) + + +@support.combine_markers +class TestConfig(support.TempdirManager): + def _info(self, msg, *args): + for line in msg.splitlines(): + self._logs.append(line) + + def test_dump_file(self): + this_file = path.Path(__file__).with_suffix('.py') + with this_file.open(encoding='utf-8') as f: + numlines = more_itertools.ilen(f) + + dump_file(this_file, 'I am the header') + assert len(self._logs) == numlines + 1 + + @pytest.mark.skipif('platform.system() == "Windows"') + def test_search_cpp(self): + cmd = missing_compiler_executable(['preprocessor']) + if cmd is not None: + self.skipTest(f'The {cmd!r} command is not found') + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd._check_compiler() + compiler = cmd.compiler + if sys.platform[:3] == "aix" and "xlc" in compiler.preprocessor[0].lower(): + self.skipTest( + 'xlc: The -E option overrides the -P, -o, and -qsyntaxonly options' + ) + + # simple pattern searches + match = cmd.search_cpp(pattern='xxx', body='/* xxx */') + assert match == 0 + + match = cmd.search_cpp(pattern='_configtest', body='/* xxx */') + assert match == 1 + + def test_finalize_options(self): + # finalize_options does a bit of transformation + # on options + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd.include_dirs = f'one{os.pathsep}two' + cmd.libraries = 'one' + cmd.library_dirs = f'three{os.pathsep}four' + cmd.ensure_finalized() + + assert cmd.include_dirs == ['one', 'two'] + assert cmd.libraries == ['one'] + assert cmd.library_dirs == ['three', 'four'] + + def test_clean(self): + # _clean removes files + tmp_dir = self.mkdtemp() + f1 = os.path.join(tmp_dir, 'one') + f2 = os.path.join(tmp_dir, 'two') + + self.write_file(f1, 'xxx') + self.write_file(f2, 'xxx') + + for f in (f1, f2): + assert os.path.exists(f) + + pkg_dir, dist = self.create_dist() + cmd = config(dist) + cmd._clean(f1, f2) + + for f in (f1, f2): + assert not os.path.exists(f) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_core.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_core.py new file mode 100644 index 0000000000000000000000000000000000000000..bad3fb7e8318d3ee73ecabe20ed98c279f606a77 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_core.py @@ -0,0 +1,130 @@ +"""Tests for distutils.core.""" + +import distutils.core +import io +import os +import sys +from distutils.dist import Distribution + +import pytest + +# setup script that uses __file__ +setup_using___file__ = """\ + +__file__ + +from distutils.core import setup +setup() +""" + +setup_prints_cwd = """\ + +import os +print(os.getcwd()) + +from distutils.core import setup +setup() +""" + +setup_does_nothing = """\ +from distutils.core import setup +setup() +""" + + +setup_defines_subclass = """\ +from distutils.core import setup +from distutils.command.install import install as _install + +class install(_install): + sub_commands = _install.sub_commands + ['cmd'] + +setup(cmdclass={'install': install}) +""" + +setup_within_if_main = """\ +from distutils.core import setup + +def main(): + return setup(name="setup_within_if_main") + +if __name__ == "__main__": + main() +""" + + +@pytest.fixture(autouse=True) +def save_stdout(monkeypatch): + monkeypatch.setattr(sys, 'stdout', sys.stdout) + + +@pytest.fixture +def temp_file(tmp_path): + return tmp_path / 'file' + + +@pytest.mark.usefixtures('save_env') +@pytest.mark.usefixtures('save_argv') +class TestCore: + def test_run_setup_provides_file(self, temp_file): + # Make sure the script can use __file__; if that's missing, the test + # setup.py script will raise NameError. + temp_file.write_text(setup_using___file__, encoding='utf-8') + distutils.core.run_setup(temp_file) + + def test_run_setup_preserves_sys_argv(self, temp_file): + # Make sure run_setup does not clobber sys.argv + argv_copy = sys.argv.copy() + temp_file.write_text(setup_does_nothing, encoding='utf-8') + distutils.core.run_setup(temp_file) + assert sys.argv == argv_copy + + def test_run_setup_defines_subclass(self, temp_file): + # Make sure the script can use __file__; if that's missing, the test + # setup.py script will raise NameError. + temp_file.write_text(setup_defines_subclass, encoding='utf-8') + dist = distutils.core.run_setup(temp_file) + install = dist.get_command_obj('install') + assert 'cmd' in install.sub_commands + + def test_run_setup_uses_current_dir(self, tmp_path): + """ + Test that the setup script is run with the current directory + as its own current directory. + """ + sys.stdout = io.StringIO() + cwd = os.getcwd() + + # Create a directory and write the setup.py file there: + setup_py = tmp_path / 'setup.py' + setup_py.write_text(setup_prints_cwd, encoding='utf-8') + distutils.core.run_setup(setup_py) + + output = sys.stdout.getvalue() + if output.endswith("\n"): + output = output[:-1] + assert cwd == output + + def test_run_setup_within_if_main(self, temp_file): + temp_file.write_text(setup_within_if_main, encoding='utf-8') + dist = distutils.core.run_setup(temp_file, stop_after="config") + assert isinstance(dist, Distribution) + assert dist.get_name() == "setup_within_if_main" + + def test_run_commands(self, temp_file): + sys.argv = ['setup.py', 'build'] + temp_file.write_text(setup_within_if_main, encoding='utf-8') + dist = distutils.core.run_setup(temp_file, stop_after="commandline") + assert 'build' not in dist.have_run + distutils.core.run_commands(dist) + assert 'build' in dist.have_run + + def test_debug_mode(self, capsys, monkeypatch): + # this covers the code called when DEBUG is set + sys.argv = ['setup.py', '--name'] + distutils.core.setup(name='bar') + assert capsys.readouterr().out == 'bar\n' + monkeypatch.setattr(distutils.core, 'DEBUG', True) + distutils.core.setup(name='bar') + wanted = "options (after parsing config files):\n" + assert capsys.readouterr().out.startswith(wanted) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_dir_util.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_dir_util.py new file mode 100644 index 0000000000000000000000000000000000000000..326cb346145ec7e3a1dd0384c33d4125131feaae --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_dir_util.py @@ -0,0 +1,139 @@ +"""Tests for distutils.dir_util.""" + +import os +import pathlib +import stat +import sys +import unittest.mock as mock +from distutils import dir_util, errors +from distutils.dir_util import ( + copy_tree, + create_tree, + ensure_relative, + mkpath, + remove_tree, +) +from distutils.tests import support + +import jaraco.path +import path +import pytest + + +@pytest.fixture(autouse=True) +def stuff(request, monkeypatch, distutils_managed_tempdir): + self = request.instance + tmp_dir = self.mkdtemp() + self.root_target = os.path.join(tmp_dir, 'deep') + self.target = os.path.join(self.root_target, 'here') + self.target2 = os.path.join(tmp_dir, 'deep2') + + +class TestDirUtil(support.TempdirManager): + def test_mkpath_remove_tree_verbosity(self, caplog): + mkpath(self.target, verbose=False) + assert not caplog.records + remove_tree(self.root_target, verbose=False) + + mkpath(self.target, verbose=True) + wanted = [f'creating {self.target}'] + assert caplog.messages == wanted + caplog.clear() + + remove_tree(self.root_target, verbose=True) + wanted = [f"removing '{self.root_target}' (and everything under it)"] + assert caplog.messages == wanted + + @pytest.mark.skipif("platform.system() == 'Windows'") + def test_mkpath_with_custom_mode(self): + # Get and set the current umask value for testing mode bits. + umask = os.umask(0o002) + os.umask(umask) + mkpath(self.target, 0o700) + assert stat.S_IMODE(os.stat(self.target).st_mode) == 0o700 & ~umask + mkpath(self.target2, 0o555) + assert stat.S_IMODE(os.stat(self.target2).st_mode) == 0o555 & ~umask + + def test_create_tree_verbosity(self, caplog): + create_tree(self.root_target, ['one', 'two', 'three'], verbose=False) + assert caplog.messages == [] + remove_tree(self.root_target, verbose=False) + + wanted = [f'creating {self.root_target}'] + create_tree(self.root_target, ['one', 'two', 'three'], verbose=True) + assert caplog.messages == wanted + + remove_tree(self.root_target, verbose=False) + + def test_copy_tree_verbosity(self, caplog): + mkpath(self.target, verbose=False) + + copy_tree(self.target, self.target2, verbose=False) + assert caplog.messages == [] + + remove_tree(self.root_target, verbose=False) + + mkpath(self.target, verbose=False) + a_file = path.Path(self.target) / 'ok.txt' + jaraco.path.build({'ok.txt': 'some content'}, self.target) + + wanted = [f'copying {a_file} -> {self.target2}'] + copy_tree(self.target, self.target2, verbose=True) + assert caplog.messages == wanted + + remove_tree(self.root_target, verbose=False) + remove_tree(self.target2, verbose=False) + + def test_copy_tree_skips_nfs_temp_files(self): + mkpath(self.target, verbose=False) + + jaraco.path.build({'ok.txt': 'some content', '.nfs123abc': ''}, self.target) + + copy_tree(self.target, self.target2) + assert os.listdir(self.target2) == ['ok.txt'] + + remove_tree(self.root_target, verbose=False) + remove_tree(self.target2, verbose=False) + + def test_ensure_relative(self): + if os.sep == '/': + assert ensure_relative('/home/foo') == 'home/foo' + assert ensure_relative('some/path') == 'some/path' + else: # \\ + assert ensure_relative('c:\\home\\foo') == 'c:home\\foo' + assert ensure_relative('home\\foo') == 'home\\foo' + + def test_copy_tree_exception_in_listdir(self): + """ + An exception in listdir should raise a DistutilsFileError + """ + with ( + mock.patch("os.listdir", side_effect=OSError()), + pytest.raises(errors.DistutilsFileError), + ): + src = self.tempdirs[-1] + dir_util.copy_tree(src, None) + + def test_mkpath_exception_uncached(self, monkeypatch, tmp_path): + """ + Caching should not remember failed attempts. + + pypa/distutils#304 + """ + + class FailPath(pathlib.Path): + def mkdir(self, *args, **kwargs): + raise OSError("Failed to create directory") + + if sys.version_info < (3, 12): + _flavour = pathlib.Path()._flavour + + target = tmp_path / 'foodir' + + with pytest.raises(errors.DistutilsFileError): + mkpath(FailPath(target)) + + assert not target.exists() + + mkpath(target) + assert target.exists() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_dist.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_dist.py new file mode 100644 index 0000000000000000000000000000000000000000..2c5beebe64eb9d747088cf117082a546330b29f3 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_dist.py @@ -0,0 +1,552 @@ +"""Tests for distutils.dist.""" + +import email +import email.generator +import email.policy +import functools +import io +import os +import sys +import textwrap +import unittest.mock as mock +import warnings +from distutils.cmd import Command +from distutils.dist import Distribution, fix_help_options +from distutils.tests import support +from typing import ClassVar + +import jaraco.path +import pytest + +pydistutils_cfg = '.' * (os.name == 'posix') + 'pydistutils.cfg' + + +class test_dist(Command): + """Sample distutils extension command.""" + + user_options: ClassVar[list[tuple[str, str, str]]] = [ + ("sample-option=", "S", "help text"), + ] + + def initialize_options(self): + self.sample_option = None + + +class TestDistribution(Distribution): + """Distribution subclasses that avoids the default search for + configuration files. + + The ._config_files attribute must be set before + .parse_config_files() is called. + """ + + def find_config_files(self): + return self._config_files + + +@pytest.fixture +def clear_argv(): + del sys.argv[1:] + + +@support.combine_markers +@pytest.mark.usefixtures('save_env') +@pytest.mark.usefixtures('save_argv') +class TestDistributionBehavior(support.TempdirManager): + def create_distribution(self, configfiles=()): + d = TestDistribution() + d._config_files = configfiles + d.parse_config_files() + d.parse_command_line() + return d + + def test_command_packages_unspecified(self, clear_argv): + sys.argv.append("build") + d = self.create_distribution() + assert d.get_command_packages() == ["distutils.command"] + + def test_command_packages_cmdline(self, clear_argv): + from distutils.tests.test_dist import test_dist + + sys.argv.extend([ + "--command-packages", + "foo.bar,distutils.tests", + "test_dist", + "-Ssometext", + ]) + d = self.create_distribution() + # let's actually try to load our test command: + assert d.get_command_packages() == [ + "distutils.command", + "foo.bar", + "distutils.tests", + ] + cmd = d.get_command_obj("test_dist") + assert isinstance(cmd, test_dist) + assert cmd.sample_option == "sometext" + + @pytest.mark.skipif( + 'distutils' not in Distribution.parse_config_files.__module__, + reason='Cannot test when virtualenv has monkey-patched Distribution', + ) + def test_venv_install_options(self, tmp_path, clear_argv): + sys.argv.append("install") + file = str(tmp_path / 'file') + + fakepath = '/somedir' + + jaraco.path.build({ + file: f""" + [install] + install-base = {fakepath} + install-platbase = {fakepath} + install-lib = {fakepath} + install-platlib = {fakepath} + install-purelib = {fakepath} + install-headers = {fakepath} + install-scripts = {fakepath} + install-data = {fakepath} + prefix = {fakepath} + exec-prefix = {fakepath} + home = {fakepath} + user = {fakepath} + root = {fakepath} + """, + }) + + # Base case: Not in a Virtual Environment + with mock.patch.multiple(sys, prefix='/a', base_prefix='/a'): + d = self.create_distribution([file]) + + option_tuple = (file, fakepath) + + result_dict = { + 'install_base': option_tuple, + 'install_platbase': option_tuple, + 'install_lib': option_tuple, + 'install_platlib': option_tuple, + 'install_purelib': option_tuple, + 'install_headers': option_tuple, + 'install_scripts': option_tuple, + 'install_data': option_tuple, + 'prefix': option_tuple, + 'exec_prefix': option_tuple, + 'home': option_tuple, + 'user': option_tuple, + 'root': option_tuple, + } + + assert sorted(d.command_options.get('install').keys()) == sorted( + result_dict.keys() + ) + + for key, value in d.command_options.get('install').items(): + assert value == result_dict[key] + + # Test case: In a Virtual Environment + with mock.patch.multiple(sys, prefix='/a', base_prefix='/b'): + d = self.create_distribution([file]) + + for key in result_dict.keys(): + assert key not in d.command_options.get('install', {}) + + def test_command_packages_configfile(self, tmp_path, clear_argv): + sys.argv.append("build") + file = str(tmp_path / "file") + jaraco.path.build({ + file: """ + [global] + command_packages = foo.bar, splat + """, + }) + + d = self.create_distribution([file]) + assert d.get_command_packages() == ["distutils.command", "foo.bar", "splat"] + + # ensure command line overrides config: + sys.argv[1:] = ["--command-packages", "spork", "build"] + d = self.create_distribution([file]) + assert d.get_command_packages() == ["distutils.command", "spork"] + + # Setting --command-packages to '' should cause the default to + # be used even if a config file specified something else: + sys.argv[1:] = ["--command-packages", "", "build"] + d = self.create_distribution([file]) + assert d.get_command_packages() == ["distutils.command"] + + def test_empty_options(self, request): + # an empty options dictionary should not stay in the + # list of attributes + + # catching warnings + warns = [] + + def _warn(msg): + warns.append(msg) + + request.addfinalizer( + functools.partial(setattr, warnings, 'warn', warnings.warn) + ) + warnings.warn = _warn + dist = Distribution( + attrs={ + 'author': 'xxx', + 'name': 'xxx', + 'version': 'xxx', + 'url': 'xxxx', + 'options': {}, + } + ) + + assert len(warns) == 0 + assert 'options' not in dir(dist) + + def test_finalize_options(self): + attrs = {'keywords': 'one,two', 'platforms': 'one,two'} + + dist = Distribution(attrs=attrs) + dist.finalize_options() + + # finalize_option splits platforms and keywords + assert dist.metadata.platforms == ['one', 'two'] + assert dist.metadata.keywords == ['one', 'two'] + + attrs = {'keywords': 'foo bar', 'platforms': 'foo bar'} + dist = Distribution(attrs=attrs) + dist.finalize_options() + assert dist.metadata.platforms == ['foo bar'] + assert dist.metadata.keywords == ['foo bar'] + + def test_get_command_packages(self): + dist = Distribution() + assert dist.command_packages is None + cmds = dist.get_command_packages() + assert cmds == ['distutils.command'] + assert dist.command_packages == ['distutils.command'] + + dist.command_packages = 'one,two' + cmds = dist.get_command_packages() + assert cmds == ['distutils.command', 'one', 'two'] + + def test_announce(self): + # make sure the level is known + dist = Distribution() + with pytest.raises(TypeError): + dist.announce('ok', level='ok2') + + def test_find_config_files_disable(self, temp_home): + # Ticket #1180: Allow user to disable their home config file. + jaraco.path.build({pydistutils_cfg: '[distutils]\n'}, temp_home) + + d = Distribution() + all_files = d.find_config_files() + + d = Distribution(attrs={'script_args': ['--no-user-cfg']}) + files = d.find_config_files() + + # make sure --no-user-cfg disables the user cfg file + assert len(all_files) - 1 == len(files) + + def test_script_args_list_coercion(self): + d = Distribution(attrs={'script_args': ('build', '--no-user-cfg')}) + + # make sure script_args is a list even if it started as a different iterable + assert d.script_args == ['build', '--no-user-cfg'] + + @pytest.mark.skipif( + 'platform.system() == "Windows"', + reason='Windows does not honor chmod 000', + ) + def test_find_config_files_permission_error(self, fake_home): + """ + Finding config files should not fail when directory is inaccessible. + """ + fake_home.joinpath(pydistutils_cfg).write_text('', encoding='utf-8') + fake_home.chmod(0o000) + Distribution().find_config_files() + + +@pytest.mark.usefixtures('save_env') +@pytest.mark.usefixtures('save_argv') +class TestMetadata(support.TempdirManager): + def format_metadata(self, dist): + sio = io.StringIO() + dist.metadata.write_pkg_file(sio) + return sio.getvalue() + + def test_simple_metadata(self): + attrs = {"name": "package", "version": "1.0"} + dist = Distribution(attrs) + meta = self.format_metadata(dist) + assert "Metadata-Version: 1.0" in meta + assert "provides:" not in meta.lower() + assert "requires:" not in meta.lower() + assert "obsoletes:" not in meta.lower() + + def test_provides(self): + attrs = { + "name": "package", + "version": "1.0", + "provides": ["package", "package.sub"], + } + dist = Distribution(attrs) + assert dist.metadata.get_provides() == ["package", "package.sub"] + assert dist.get_provides() == ["package", "package.sub"] + meta = self.format_metadata(dist) + assert "Metadata-Version: 1.1" in meta + assert "requires:" not in meta.lower() + assert "obsoletes:" not in meta.lower() + + def test_provides_illegal(self): + with pytest.raises(ValueError): + Distribution( + {"name": "package", "version": "1.0", "provides": ["my.pkg (splat)"]}, + ) + + def test_requires(self): + attrs = { + "name": "package", + "version": "1.0", + "requires": ["other", "another (==1.0)"], + } + dist = Distribution(attrs) + assert dist.metadata.get_requires() == ["other", "another (==1.0)"] + assert dist.get_requires() == ["other", "another (==1.0)"] + meta = self.format_metadata(dist) + assert "Metadata-Version: 1.1" in meta + assert "provides:" not in meta.lower() + assert "Requires: other" in meta + assert "Requires: another (==1.0)" in meta + assert "obsoletes:" not in meta.lower() + + def test_requires_illegal(self): + with pytest.raises(ValueError): + Distribution( + {"name": "package", "version": "1.0", "requires": ["my.pkg (splat)"]}, + ) + + def test_requires_to_list(self): + attrs = {"name": "package", "requires": iter(["other"])} + dist = Distribution(attrs) + assert isinstance(dist.metadata.requires, list) + + def test_obsoletes(self): + attrs = { + "name": "package", + "version": "1.0", + "obsoletes": ["other", "another (<1.0)"], + } + dist = Distribution(attrs) + assert dist.metadata.get_obsoletes() == ["other", "another (<1.0)"] + assert dist.get_obsoletes() == ["other", "another (<1.0)"] + meta = self.format_metadata(dist) + assert "Metadata-Version: 1.1" in meta + assert "provides:" not in meta.lower() + assert "requires:" not in meta.lower() + assert "Obsoletes: other" in meta + assert "Obsoletes: another (<1.0)" in meta + + def test_obsoletes_illegal(self): + with pytest.raises(ValueError): + Distribution( + {"name": "package", "version": "1.0", "obsoletes": ["my.pkg (splat)"]}, + ) + + def test_obsoletes_to_list(self): + attrs = {"name": "package", "obsoletes": iter(["other"])} + dist = Distribution(attrs) + assert isinstance(dist.metadata.obsoletes, list) + + def test_classifier(self): + attrs = { + 'name': 'Boa', + 'version': '3.0', + 'classifiers': ['Programming Language :: Python :: 3'], + } + dist = Distribution(attrs) + assert dist.get_classifiers() == ['Programming Language :: Python :: 3'] + meta = self.format_metadata(dist) + assert 'Metadata-Version: 1.1' in meta + + def test_classifier_invalid_type(self, caplog): + attrs = { + 'name': 'Boa', + 'version': '3.0', + 'classifiers': ('Programming Language :: Python :: 3',), + } + d = Distribution(attrs) + # should have warning about passing a non-list + assert 'should be a list' in caplog.messages[0] + # should be converted to a list + assert isinstance(d.metadata.classifiers, list) + assert d.metadata.classifiers == list(attrs['classifiers']) + + def test_keywords(self): + attrs = { + 'name': 'Monty', + 'version': '1.0', + 'keywords': ['spam', 'eggs', 'life of brian'], + } + dist = Distribution(attrs) + assert dist.get_keywords() == ['spam', 'eggs', 'life of brian'] + + def test_keywords_invalid_type(self, caplog): + attrs = { + 'name': 'Monty', + 'version': '1.0', + 'keywords': ('spam', 'eggs', 'life of brian'), + } + d = Distribution(attrs) + # should have warning about passing a non-list + assert 'should be a list' in caplog.messages[0] + # should be converted to a list + assert isinstance(d.metadata.keywords, list) + assert d.metadata.keywords == list(attrs['keywords']) + + def test_platforms(self): + attrs = { + 'name': 'Monty', + 'version': '1.0', + 'platforms': ['GNU/Linux', 'Some Evil Platform'], + } + dist = Distribution(attrs) + assert dist.get_platforms() == ['GNU/Linux', 'Some Evil Platform'] + + def test_platforms_invalid_types(self, caplog): + attrs = { + 'name': 'Monty', + 'version': '1.0', + 'platforms': ('GNU/Linux', 'Some Evil Platform'), + } + d = Distribution(attrs) + # should have warning about passing a non-list + assert 'should be a list' in caplog.messages[0] + # should be converted to a list + assert isinstance(d.metadata.platforms, list) + assert d.metadata.platforms == list(attrs['platforms']) + + def test_download_url(self): + attrs = { + 'name': 'Boa', + 'version': '3.0', + 'download_url': 'http://example.org/boa', + } + dist = Distribution(attrs) + meta = self.format_metadata(dist) + assert 'Metadata-Version: 1.1' in meta + + def test_long_description(self): + long_desc = textwrap.dedent( + """\ + example:: + We start here + and continue here + and end here.""" + ) + attrs = {"name": "package", "version": "1.0", "long_description": long_desc} + + dist = Distribution(attrs) + meta = self.format_metadata(dist) + meta = meta.replace('\n' + 8 * ' ', '\n') + assert long_desc in meta + + def test_custom_pydistutils(self, temp_home): + """ + pydistutils.cfg is found + """ + jaraco.path.build({pydistutils_cfg: ''}, temp_home) + config_path = temp_home / pydistutils_cfg + + assert str(config_path) in Distribution().find_config_files() + + def test_extra_pydistutils(self, monkeypatch, tmp_path): + jaraco.path.build({'overrides.cfg': ''}, tmp_path) + filename = tmp_path / 'overrides.cfg' + monkeypatch.setenv('DIST_EXTRA_CONFIG', str(filename)) + assert str(filename) in Distribution().find_config_files() + + def test_fix_help_options(self): + help_tuples = [('a', 'b', 'c', 'd'), (1, 2, 3, 4)] + fancy_options = fix_help_options(help_tuples) + assert fancy_options[0] == ('a', 'b', 'c') + assert fancy_options[1] == (1, 2, 3) + + def test_show_help(self, request, capsys): + # smoke test, just makes sure some help is displayed + dist = Distribution() + sys.argv = [] + dist.help = True + dist.script_name = 'setup.py' + dist.parse_command_line() + + output = [ + line for line in capsys.readouterr().out.split('\n') if line.strip() != '' + ] + assert output + + def test_read_metadata(self): + attrs = { + "name": "package", + "version": "1.0", + "long_description": "desc", + "description": "xxx", + "download_url": "http://example.com", + "keywords": ['one', 'two'], + "requires": ['foo'], + } + + dist = Distribution(attrs) + metadata = dist.metadata + + # write it then reloads it + PKG_INFO = io.StringIO() + metadata.write_pkg_file(PKG_INFO) + PKG_INFO.seek(0) + metadata.read_pkg_file(PKG_INFO) + + assert metadata.name == "package" + assert metadata.version == "1.0" + assert metadata.description == "xxx" + assert metadata.download_url == 'http://example.com' + assert metadata.keywords == ['one', 'two'] + assert metadata.platforms is None + assert metadata.obsoletes is None + assert metadata.requires == ['foo'] + + def test_round_trip_through_email_generator(self): + """ + In pypa/setuptools#4033, it was shown that once PKG-INFO is + re-generated using ``email.generator.Generator``, some control + characters might cause problems. + """ + # Given a PKG-INFO file ... + attrs = { + "name": "package", + "version": "1.0", + "long_description": "hello\x0b\nworld\n", + } + dist = Distribution(attrs) + metadata = dist.metadata + + with io.StringIO() as buffer: + metadata.write_pkg_file(buffer) + msg = buffer.getvalue() + + # ... when it is read and re-written using stdlib's email library, + orig = email.message_from_string(msg) + policy = email.policy.EmailPolicy( + utf8=True, + mangle_from_=False, + max_line_length=0, + ) + with io.StringIO() as buffer: + email.generator.Generator(buffer, policy=policy).flatten(orig) + + buffer.seek(0) + regen = email.message_from_file(buffer) + + # ... then it should be the same as the original + # (except for the specific line break characters) + orig_desc = set(orig["Description"].splitlines()) + regen_desc = set(regen["Description"].splitlines()) + assert regen_desc == orig_desc diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_extension.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_extension.py new file mode 100644 index 0000000000000000000000000000000000000000..5e8e768223ea40d7a629111db181a946cf8ca5b0 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_extension.py @@ -0,0 +1,117 @@ +"""Tests for distutils.extension.""" + +import os +import pathlib +import warnings +from distutils.extension import Extension, read_setup_file + +import pytest +from test.support.warnings_helper import check_warnings + + +class TestExtension: + def test_read_setup_file(self): + # trying to read a Setup file + # (sample extracted from the PyGame project) + setup = os.path.join(os.path.dirname(__file__), 'Setup.sample') + + exts = read_setup_file(setup) + names = [ext.name for ext in exts] + names.sort() + + # here are the extensions read_setup_file should have created + # out of the file + wanted = [ + '_arraysurfarray', + '_camera', + '_numericsndarray', + '_numericsurfarray', + 'base', + 'bufferproxy', + 'cdrom', + 'color', + 'constants', + 'display', + 'draw', + 'event', + 'fastevent', + 'font', + 'gfxdraw', + 'image', + 'imageext', + 'joystick', + 'key', + 'mask', + 'mixer', + 'mixer_music', + 'mouse', + 'movie', + 'overlay', + 'pixelarray', + 'pypm', + 'rect', + 'rwobject', + 'scrap', + 'surface', + 'surflock', + 'time', + 'transform', + ] + + assert names == wanted + + def test_extension_init(self): + # the first argument, which is the name, must be a string + with pytest.raises(TypeError): + Extension(1, []) + ext = Extension('name', []) + assert ext.name == 'name' + + # the second argument, which is the list of files, must + # be an iterable of strings or PathLike objects, and not a string + with pytest.raises(TypeError): + Extension('name', 'file') + with pytest.raises(TypeError): + Extension('name', ['file', 1]) + ext = Extension('name', ['file1', 'file2']) + assert ext.sources == ['file1', 'file2'] + ext = Extension('name', [pathlib.Path('file1'), pathlib.Path('file2')]) + assert ext.sources == ['file1', 'file2'] + + # any non-string iterable of strings or PathLike objects should work + ext = Extension('name', ('file1', 'file2')) # tuple + assert ext.sources == ['file1', 'file2'] + ext = Extension('name', {'file1', 'file2'}) # set + assert sorted(ext.sources) == ['file1', 'file2'] + ext = Extension('name', iter(['file1', 'file2'])) # iterator + assert ext.sources == ['file1', 'file2'] + ext = Extension('name', [pathlib.Path('file1'), 'file2']) # mixed types + assert ext.sources == ['file1', 'file2'] + + # others arguments have defaults + for attr in ( + 'include_dirs', + 'define_macros', + 'undef_macros', + 'library_dirs', + 'libraries', + 'runtime_library_dirs', + 'extra_objects', + 'extra_compile_args', + 'extra_link_args', + 'export_symbols', + 'swig_opts', + 'depends', + ): + assert getattr(ext, attr) == [] + + assert ext.language is None + assert ext.optional is None + + # if there are unknown keyword options, warn about them + with check_warnings() as w: + warnings.simplefilter('always') + ext = Extension('name', ['file1', 'file2'], chic=True) + + assert len(w.warnings) == 1 + assert str(w.warnings[0].message) == "Unknown Extension options: 'chic'" diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_file_util.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_file_util.py new file mode 100644 index 0000000000000000000000000000000000000000..a75d4a0317dc717c24f67127370aa87089eeba1a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_file_util.py @@ -0,0 +1,95 @@ +"""Tests for distutils.file_util.""" + +import errno +import os +import unittest.mock as mock +from distutils.errors import DistutilsFileError +from distutils.file_util import copy_file, move_file + +import jaraco.path +import pytest + + +@pytest.fixture(autouse=True) +def stuff(request, tmp_path): + self = request.instance + self.source = tmp_path / 'f1' + self.target = tmp_path / 'f2' + self.target_dir = tmp_path / 'd1' + + +class TestFileUtil: + def test_move_file_verbosity(self, caplog): + jaraco.path.build({self.source: 'some content'}) + + move_file(self.source, self.target, verbose=False) + assert not caplog.messages + + # back to original state + move_file(self.target, self.source, verbose=False) + + move_file(self.source, self.target, verbose=True) + wanted = [f'moving {self.source} -> {self.target}'] + assert caplog.messages == wanted + + # back to original state + move_file(self.target, self.source, verbose=False) + + caplog.clear() + # now the target is a dir + os.mkdir(self.target_dir) + move_file(self.source, self.target_dir, verbose=True) + wanted = [f'moving {self.source} -> {self.target_dir}'] + assert caplog.messages == wanted + + def test_move_file_exception_unpacking_rename(self): + # see issue 22182 + with ( + mock.patch("os.rename", side_effect=OSError("wrong", 1)), + pytest.raises(DistutilsFileError), + ): + jaraco.path.build({self.source: 'spam eggs'}) + move_file(self.source, self.target, verbose=False) + + def test_move_file_exception_unpacking_unlink(self): + # see issue 22182 + with ( + mock.patch("os.rename", side_effect=OSError(errno.EXDEV, "wrong")), + mock.patch("os.unlink", side_effect=OSError("wrong", 1)), + pytest.raises(DistutilsFileError), + ): + jaraco.path.build({self.source: 'spam eggs'}) + move_file(self.source, self.target, verbose=False) + + def test_copy_file_hard_link(self): + jaraco.path.build({self.source: 'some content'}) + # Check first that copy_file() will not fall back on copying the file + # instead of creating the hard link. + try: + os.link(self.source, self.target) + except OSError as e: + self.skipTest(f'os.link: {e}') + else: + self.target.unlink() + st = os.stat(self.source) + copy_file(self.source, self.target, link='hard') + st2 = os.stat(self.source) + st3 = os.stat(self.target) + assert os.path.samestat(st, st2), (st, st2) + assert os.path.samestat(st2, st3), (st2, st3) + assert self.source.read_text(encoding='utf-8') == 'some content' + + def test_copy_file_hard_link_failure(self): + # If hard linking fails, copy_file() falls back on copying file + # (some special filesystems don't support hard linking even under + # Unix, see issue #8876). + jaraco.path.build({self.source: 'some content'}) + st = os.stat(self.source) + with mock.patch("os.link", side_effect=OSError(0, "linking unsupported")): + copy_file(self.source, self.target, link='hard') + st2 = os.stat(self.source) + st3 = os.stat(self.target) + assert os.path.samestat(st, st2), (st, st2) + assert not os.path.samestat(st2, st3), (st2, st3) + for fn in (self.source, self.target): + assert fn.read_text(encoding='utf-8') == 'some content' diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_filelist.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_filelist.py new file mode 100644 index 0000000000000000000000000000000000000000..130e6fb53b0bd9670bdcfe6d4bc7fcf8fd90416e --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_filelist.py @@ -0,0 +1,336 @@ +"""Tests for distutils.filelist.""" + +import logging +import os +import re +from distutils import debug, filelist +from distutils.errors import DistutilsTemplateError +from distutils.filelist import FileList, glob_to_re, translate_pattern + +import jaraco.path +import pytest + +from .compat import py39 as os_helper + +MANIFEST_IN = """\ +include ok +include xo +exclude xo +include foo.tmp +include buildout.cfg +global-include *.x +global-include *.txt +global-exclude *.tmp +recursive-include f *.oo +recursive-exclude global *.x +graft dir +prune dir3 +""" + + +def make_local_path(s): + """Converts '/' in a string to os.sep""" + return s.replace('/', os.sep) + + +class TestFileList: + def assertNoWarnings(self, caplog): + warnings = [rec for rec in caplog.records if rec.levelno == logging.WARNING] + assert not warnings + caplog.clear() + + def assertWarnings(self, caplog): + warnings = [rec for rec in caplog.records if rec.levelno == logging.WARNING] + assert warnings + caplog.clear() + + def test_glob_to_re(self): + sep = os.sep + if os.sep == '\\': + sep = re.escape(os.sep) + + for glob, regex in ( + # simple cases + ('foo*', r'(?s:foo[^%(sep)s]*)\Z'), + ('foo?', r'(?s:foo[^%(sep)s])\Z'), + ('foo??', r'(?s:foo[^%(sep)s][^%(sep)s])\Z'), + # special cases + (r'foo\\*', r'(?s:foo\\\\[^%(sep)s]*)\Z'), + (r'foo\\\*', r'(?s:foo\\\\\\[^%(sep)s]*)\Z'), + ('foo????', r'(?s:foo[^%(sep)s][^%(sep)s][^%(sep)s][^%(sep)s])\Z'), + (r'foo\\??', r'(?s:foo\\\\[^%(sep)s][^%(sep)s])\Z'), + ): + regex = regex % {'sep': sep} + assert glob_to_re(glob) == regex + + def test_process_template_line(self): + # testing all MANIFEST.in template patterns + file_list = FileList() + mlp = make_local_path + + # simulated file list + file_list.allfiles = [ + 'foo.tmp', + 'ok', + 'xo', + 'four.txt', + 'buildout.cfg', + # filelist does not filter out VCS directories, + # it's sdist that does + mlp('.hg/last-message.txt'), + mlp('global/one.txt'), + mlp('global/two.txt'), + mlp('global/files.x'), + mlp('global/here.tmp'), + mlp('f/o/f.oo'), + mlp('dir/graft-one'), + mlp('dir/dir2/graft2'), + mlp('dir3/ok'), + mlp('dir3/sub/ok.txt'), + ] + + for line in MANIFEST_IN.split('\n'): + if line.strip() == '': + continue + file_list.process_template_line(line) + + wanted = [ + 'ok', + 'buildout.cfg', + 'four.txt', + mlp('.hg/last-message.txt'), + mlp('global/one.txt'), + mlp('global/two.txt'), + mlp('f/o/f.oo'), + mlp('dir/graft-one'), + mlp('dir/dir2/graft2'), + ] + + assert file_list.files == wanted + + def test_debug_print(self, capsys, monkeypatch): + file_list = FileList() + file_list.debug_print('xxx') + assert capsys.readouterr().out == '' + + monkeypatch.setattr(debug, 'DEBUG', True) + file_list.debug_print('xxx') + assert capsys.readouterr().out == 'xxx\n' + + def test_set_allfiles(self): + file_list = FileList() + files = ['a', 'b', 'c'] + file_list.set_allfiles(files) + assert file_list.allfiles == files + + def test_remove_duplicates(self): + file_list = FileList() + file_list.files = ['a', 'b', 'a', 'g', 'c', 'g'] + # files must be sorted beforehand (sdist does it) + file_list.sort() + file_list.remove_duplicates() + assert file_list.files == ['a', 'b', 'c', 'g'] + + def test_translate_pattern(self): + # not regex + assert hasattr(translate_pattern('a', anchor=True, is_regex=False), 'search') + + # is a regex + regex = re.compile('a') + assert translate_pattern(regex, anchor=True, is_regex=True) == regex + + # plain string flagged as regex + assert hasattr(translate_pattern('a', anchor=True, is_regex=True), 'search') + + # glob support + assert translate_pattern('*.py', anchor=True, is_regex=False).search( + 'filelist.py' + ) + + def test_exclude_pattern(self): + # return False if no match + file_list = FileList() + assert not file_list.exclude_pattern('*.py') + + # return True if files match + file_list = FileList() + file_list.files = ['a.py', 'b.py'] + assert file_list.exclude_pattern('*.py') + + # test excludes + file_list = FileList() + file_list.files = ['a.py', 'a.txt'] + file_list.exclude_pattern('*.py') + assert file_list.files == ['a.txt'] + + def test_include_pattern(self): + # return False if no match + file_list = FileList() + file_list.set_allfiles([]) + assert not file_list.include_pattern('*.py') + + # return True if files match + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt']) + assert file_list.include_pattern('*.py') + + # test * matches all files + file_list = FileList() + assert file_list.allfiles is None + file_list.set_allfiles(['a.py', 'b.txt']) + file_list.include_pattern('*') + assert file_list.allfiles == ['a.py', 'b.txt'] + + def test_process_template(self, caplog): + mlp = make_local_path + # invalid lines + file_list = FileList() + for action in ( + 'include', + 'exclude', + 'global-include', + 'global-exclude', + 'recursive-include', + 'recursive-exclude', + 'graft', + 'prune', + 'blarg', + ): + with pytest.raises(DistutilsTemplateError): + file_list.process_template_line(action) + + # include + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt', mlp('d/c.py')]) + + file_list.process_template_line('include *.py') + assert file_list.files == ['a.py'] + self.assertNoWarnings(caplog) + + file_list.process_template_line('include *.rb') + assert file_list.files == ['a.py'] + self.assertWarnings(caplog) + + # exclude + file_list = FileList() + file_list.files = ['a.py', 'b.txt', mlp('d/c.py')] + + file_list.process_template_line('exclude *.py') + assert file_list.files == ['b.txt', mlp('d/c.py')] + self.assertNoWarnings(caplog) + + file_list.process_template_line('exclude *.rb') + assert file_list.files == ['b.txt', mlp('d/c.py')] + self.assertWarnings(caplog) + + # global-include + file_list = FileList() + file_list.set_allfiles(['a.py', 'b.txt', mlp('d/c.py')]) + + file_list.process_template_line('global-include *.py') + assert file_list.files == ['a.py', mlp('d/c.py')] + self.assertNoWarnings(caplog) + + file_list.process_template_line('global-include *.rb') + assert file_list.files == ['a.py', mlp('d/c.py')] + self.assertWarnings(caplog) + + # global-exclude + file_list = FileList() + file_list.files = ['a.py', 'b.txt', mlp('d/c.py')] + + file_list.process_template_line('global-exclude *.py') + assert file_list.files == ['b.txt'] + self.assertNoWarnings(caplog) + + file_list.process_template_line('global-exclude *.rb') + assert file_list.files == ['b.txt'] + self.assertWarnings(caplog) + + # recursive-include + file_list = FileList() + file_list.set_allfiles(['a.py', mlp('d/b.py'), mlp('d/c.txt'), mlp('d/d/e.py')]) + + file_list.process_template_line('recursive-include d *.py') + assert file_list.files == [mlp('d/b.py'), mlp('d/d/e.py')] + self.assertNoWarnings(caplog) + + file_list.process_template_line('recursive-include e *.py') + assert file_list.files == [mlp('d/b.py'), mlp('d/d/e.py')] + self.assertWarnings(caplog) + + # recursive-exclude + file_list = FileList() + file_list.files = ['a.py', mlp('d/b.py'), mlp('d/c.txt'), mlp('d/d/e.py')] + + file_list.process_template_line('recursive-exclude d *.py') + assert file_list.files == ['a.py', mlp('d/c.txt')] + self.assertNoWarnings(caplog) + + file_list.process_template_line('recursive-exclude e *.py') + assert file_list.files == ['a.py', mlp('d/c.txt')] + self.assertWarnings(caplog) + + # graft + file_list = FileList() + file_list.set_allfiles(['a.py', mlp('d/b.py'), mlp('d/d/e.py'), mlp('f/f.py')]) + + file_list.process_template_line('graft d') + assert file_list.files == [mlp('d/b.py'), mlp('d/d/e.py')] + self.assertNoWarnings(caplog) + + file_list.process_template_line('graft e') + assert file_list.files == [mlp('d/b.py'), mlp('d/d/e.py')] + self.assertWarnings(caplog) + + # prune + file_list = FileList() + file_list.files = ['a.py', mlp('d/b.py'), mlp('d/d/e.py'), mlp('f/f.py')] + + file_list.process_template_line('prune d') + assert file_list.files == ['a.py', mlp('f/f.py')] + self.assertNoWarnings(caplog) + + file_list.process_template_line('prune e') + assert file_list.files == ['a.py', mlp('f/f.py')] + self.assertWarnings(caplog) + + +class TestFindAll: + @os_helper.skip_unless_symlink + def test_missing_symlink(self, temp_cwd): + os.symlink('foo', 'bar') + assert filelist.findall() == [] + + def test_basic_discovery(self, temp_cwd): + """ + When findall is called with no parameters or with + '.' as the parameter, the dot should be omitted from + the results. + """ + jaraco.path.build({'foo': {'file1.txt': ''}, 'bar': {'file2.txt': ''}}) + file1 = os.path.join('foo', 'file1.txt') + file2 = os.path.join('bar', 'file2.txt') + expected = [file2, file1] + assert sorted(filelist.findall()) == expected + + def test_non_local_discovery(self, tmp_path): + """ + When findall is called with another path, the full + path name should be returned. + """ + jaraco.path.build({'file1.txt': ''}, tmp_path) + expected = [str(tmp_path / 'file1.txt')] + assert filelist.findall(tmp_path) == expected + + @os_helper.skip_unless_symlink + def test_symlink_loop(self, tmp_path): + jaraco.path.build( + { + 'link-to-parent': jaraco.path.Symlink('.'), + 'somefile': '', + }, + tmp_path, + ) + files = filelist.findall(tmp_path) + assert len(files) == 1 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install.py new file mode 100644 index 0000000000000000000000000000000000000000..b3ffb2e668ac5a042c5a2889d7b51b5755b73157 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install.py @@ -0,0 +1,245 @@ +"""Tests for distutils.command.install.""" + +import logging +import os +import pathlib +import site +import sys +from distutils import sysconfig +from distutils.command import install as install_module +from distutils.command.build_ext import build_ext +from distutils.command.install import INSTALL_SCHEMES, install +from distutils.core import Distribution +from distutils.errors import DistutilsOptionError +from distutils.extension import Extension +from distutils.tests import missing_compiler_executable, support +from distutils.util import is_mingw + +import pytest + + +def _make_ext_name(modname): + return modname + sysconfig.get_config_var('EXT_SUFFIX') + + +@support.combine_markers +@pytest.mark.usefixtures('save_env') +class TestInstall( + support.TempdirManager, +): + @pytest.mark.xfail( + 'platform.system() == "Windows" and sys.version_info > (3, 11)', + reason="pypa/distutils#148", + ) + def test_home_installation_scheme(self): + # This ensure two things: + # - that --home generates the desired set of directory names + # - test --home is supported on all platforms + builddir = self.mkdtemp() + destination = os.path.join(builddir, "installation") + + dist = Distribution({"name": "foopkg"}) + # script_name need not exist, it just need to be initialized + dist.script_name = os.path.join(builddir, "setup.py") + dist.command_obj["build"] = support.DummyCommand( + build_base=builddir, + build_lib=os.path.join(builddir, "lib"), + ) + + cmd = install(dist) + cmd.home = destination + cmd.ensure_finalized() + + assert cmd.install_base == destination + assert cmd.install_platbase == destination + + def check_path(got, expected): + got = os.path.normpath(got) + expected = os.path.normpath(expected) + assert got == expected + + impl_name = sys.implementation.name.replace("cpython", "python") + libdir = os.path.join(destination, "lib", impl_name) + check_path(cmd.install_lib, libdir) + _platlibdir = getattr(sys, "platlibdir", "lib") + platlibdir = os.path.join(destination, _platlibdir, impl_name) + check_path(cmd.install_platlib, platlibdir) + check_path(cmd.install_purelib, libdir) + check_path( + cmd.install_headers, + os.path.join(destination, "include", impl_name, "foopkg"), + ) + check_path(cmd.install_scripts, os.path.join(destination, "bin")) + check_path(cmd.install_data, destination) + + def test_user_site(self, monkeypatch): + # test install with --user + # preparing the environment for the test + self.tmpdir = self.mkdtemp() + orig_site = site.USER_SITE + orig_base = site.USER_BASE + monkeypatch.setattr(site, 'USER_BASE', os.path.join(self.tmpdir, 'B')) + monkeypatch.setattr(site, 'USER_SITE', os.path.join(self.tmpdir, 'S')) + monkeypatch.setattr(install_module, 'USER_BASE', site.USER_BASE) + monkeypatch.setattr(install_module, 'USER_SITE', site.USER_SITE) + + def _expanduser(path): + if path.startswith('~'): + return os.path.normpath(self.tmpdir + path[1:]) + return path + + monkeypatch.setattr(os.path, 'expanduser', _expanduser) + + for key in ('nt_user', 'posix_user'): + assert key in INSTALL_SCHEMES + + dist = Distribution({'name': 'xx'}) + cmd = install(dist) + + # making sure the user option is there + options = [name for name, short, label in cmd.user_options] + assert 'user' in options + + # setting a value + cmd.user = True + + # user base and site shouldn't be created yet + assert not os.path.exists(site.USER_BASE) + assert not os.path.exists(site.USER_SITE) + + # let's run finalize + cmd.ensure_finalized() + + # now they should + assert os.path.exists(site.USER_BASE) + assert os.path.exists(site.USER_SITE) + + assert 'userbase' in cmd.config_vars + assert 'usersite' in cmd.config_vars + + actual_headers = os.path.relpath(cmd.install_headers, site.USER_BASE) + if os.name == 'nt' and not is_mingw(): + site_path = os.path.relpath(os.path.dirname(orig_site), orig_base) + include = os.path.join(site_path, 'Include') + else: + include = sysconfig.get_python_inc(0, '') + expect_headers = os.path.join(include, 'xx') + + assert os.path.normcase(actual_headers) == os.path.normcase(expect_headers) + + def test_handle_extra_path(self): + dist = Distribution({'name': 'xx', 'extra_path': 'path,dirs'}) + cmd = install(dist) + + # two elements + cmd.handle_extra_path() + assert cmd.extra_path == ['path', 'dirs'] + assert cmd.extra_dirs == 'dirs' + assert cmd.path_file == 'path' + + # one element + cmd.extra_path = ['path'] + cmd.handle_extra_path() + assert cmd.extra_path == ['path'] + assert cmd.extra_dirs == 'path' + assert cmd.path_file == 'path' + + # none + dist.extra_path = cmd.extra_path = None + cmd.handle_extra_path() + assert cmd.extra_path is None + assert cmd.extra_dirs == '' + assert cmd.path_file is None + + # three elements (no way !) + cmd.extra_path = 'path,dirs,again' + with pytest.raises(DistutilsOptionError): + cmd.handle_extra_path() + + def test_finalize_options(self): + dist = Distribution({'name': 'xx'}) + cmd = install(dist) + + # must supply either prefix/exec-prefix/home or + # install-base/install-platbase -- not both + cmd.prefix = 'prefix' + cmd.install_base = 'base' + with pytest.raises(DistutilsOptionError): + cmd.finalize_options() + + # must supply either home or prefix/exec-prefix -- not both + cmd.install_base = None + cmd.home = 'home' + with pytest.raises(DistutilsOptionError): + cmd.finalize_options() + + # can't combine user with prefix/exec_prefix/home or + # install_(plat)base + cmd.prefix = None + cmd.user = 'user' + with pytest.raises(DistutilsOptionError): + cmd.finalize_options() + + def test_record(self): + install_dir = self.mkdtemp() + project_dir, dist = self.create_dist(py_modules=['hello'], scripts=['sayhi']) + os.chdir(project_dir) + self.write_file('hello.py', "def main(): print('o hai')") + self.write_file('sayhi', 'from hello import main; main()') + + cmd = install(dist) + dist.command_obj['install'] = cmd + cmd.root = install_dir + cmd.record = os.path.join(project_dir, 'filelist') + cmd.ensure_finalized() + cmd.run() + + content = pathlib.Path(cmd.record).read_text(encoding='utf-8') + + found = [pathlib.Path(line).name for line in content.splitlines()] + expected = [ + 'hello.py', + f'hello.{sys.implementation.cache_tag}.pyc', + 'sayhi', + 'UNKNOWN-0.0.0-py{}.{}.egg-info'.format(*sys.version_info[:2]), + ] + assert found == expected + + def test_record_extensions(self): + cmd = missing_compiler_executable() + if cmd is not None: + pytest.skip(f'The {cmd!r} command is not found') + install_dir = self.mkdtemp() + project_dir, dist = self.create_dist( + ext_modules=[Extension('xx', ['xxmodule.c'])] + ) + os.chdir(project_dir) + support.copy_xxmodule_c(project_dir) + + buildextcmd = build_ext(dist) + support.fixup_build_ext(buildextcmd) + buildextcmd.ensure_finalized() + + cmd = install(dist) + dist.command_obj['install'] = cmd + dist.command_obj['build_ext'] = buildextcmd + cmd.root = install_dir + cmd.record = os.path.join(project_dir, 'filelist') + cmd.ensure_finalized() + cmd.run() + + content = pathlib.Path(cmd.record).read_text(encoding='utf-8') + + found = [pathlib.Path(line).name for line in content.splitlines()] + expected = [ + _make_ext_name('xx'), + 'UNKNOWN-0.0.0-py{}.{}.egg-info'.format(*sys.version_info[:2]), + ] + assert found == expected + + def test_debug_mode(self, caplog, monkeypatch): + # this covers the code called when DEBUG is set + monkeypatch.setattr(install_module, 'DEBUG', True) + caplog.set_level(logging.DEBUG) + self.test_record() + assert any(rec for rec in caplog.records if rec.levelno == logging.DEBUG) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_data.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_data.py new file mode 100644 index 0000000000000000000000000000000000000000..c800f86c645d86fcb11aa3bef1513325ef163132 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_data.py @@ -0,0 +1,74 @@ +"""Tests for distutils.command.install_data.""" + +import os +import pathlib +from distutils.command.install_data import install_data +from distutils.tests import support + +import pytest + + +@pytest.mark.usefixtures('save_env') +class TestInstallData( + support.TempdirManager, +): + def test_simple_run(self): + pkg_dir, dist = self.create_dist() + cmd = install_data(dist) + cmd.install_dir = inst = os.path.join(pkg_dir, 'inst') + + # data_files can contain + # - simple files + # - a Path object + # - a tuple with a path, and a list of file + one = os.path.join(pkg_dir, 'one') + self.write_file(one, 'xxx') + inst2 = os.path.join(pkg_dir, 'inst2') + two = os.path.join(pkg_dir, 'two') + self.write_file(two, 'xxx') + three = pathlib.Path(pkg_dir) / 'three' + self.write_file(three, 'xxx') + + cmd.data_files = [one, (inst2, [two]), three] + assert cmd.get_inputs() == [one, (inst2, [two]), three] + + # let's run the command + cmd.ensure_finalized() + cmd.run() + + # let's check the result + assert len(cmd.get_outputs()) == 3 + rthree = os.path.split(one)[-1] + assert os.path.exists(os.path.join(inst, rthree)) + rtwo = os.path.split(two)[-1] + assert os.path.exists(os.path.join(inst2, rtwo)) + rone = os.path.split(one)[-1] + assert os.path.exists(os.path.join(inst, rone)) + cmd.outfiles = [] + + # let's try with warn_dir one + cmd.warn_dir = True + cmd.ensure_finalized() + cmd.run() + + # let's check the result + assert len(cmd.get_outputs()) == 3 + assert os.path.exists(os.path.join(inst, rthree)) + assert os.path.exists(os.path.join(inst2, rtwo)) + assert os.path.exists(os.path.join(inst, rone)) + cmd.outfiles = [] + + # now using root and empty dir + cmd.root = os.path.join(pkg_dir, 'root') + inst5 = os.path.join(pkg_dir, 'inst5') + four = os.path.join(cmd.install_dir, 'four') + self.write_file(four, 'xx') + cmd.data_files = [one, (inst2, [two]), three, ('inst5', [four]), (inst5, [])] + cmd.ensure_finalized() + cmd.run() + + # let's check the result + assert len(cmd.get_outputs()) == 5 + assert os.path.exists(os.path.join(inst, rthree)) + assert os.path.exists(os.path.join(inst2, rtwo)) + assert os.path.exists(os.path.join(inst, rone)) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_headers.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_headers.py new file mode 100644 index 0000000000000000000000000000000000000000..2c74f06b976f3c3ea977667a5c16c0e7f201a558 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_headers.py @@ -0,0 +1,33 @@ +"""Tests for distutils.command.install_headers.""" + +import os +from distutils.command.install_headers import install_headers +from distutils.tests import support + +import pytest + + +@pytest.mark.usefixtures('save_env') +class TestInstallHeaders( + support.TempdirManager, +): + def test_simple_run(self): + # we have two headers + header_list = self.mkdtemp() + header1 = os.path.join(header_list, 'header1') + header2 = os.path.join(header_list, 'header2') + self.write_file(header1) + self.write_file(header2) + headers = [header1, header2] + + pkg_dir, dist = self.create_dist(headers=headers) + cmd = install_headers(dist) + assert cmd.get_inputs() == headers + + # let's run the command + cmd.install_dir = os.path.join(pkg_dir, 'inst') + cmd.ensure_finalized() + cmd.run() + + # let's check the results + assert len(cmd.get_outputs()) == 2 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_lib.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_lib.py new file mode 100644 index 0000000000000000000000000000000000000000..f685a579560ea70bceea221de0e54485975ce180 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_lib.py @@ -0,0 +1,110 @@ +"""Tests for distutils.command.install_data.""" + +import importlib.util +import os +import sys +from distutils.command.install_lib import install_lib +from distutils.errors import DistutilsOptionError +from distutils.extension import Extension +from distutils.tests import support + +import pytest + + +@support.combine_markers +@pytest.mark.usefixtures('save_env') +class TestInstallLib( + support.TempdirManager, +): + def test_finalize_options(self): + dist = self.create_dist()[1] + cmd = install_lib(dist) + + cmd.finalize_options() + assert cmd.compile == 1 + assert cmd.optimize == 0 + + # optimize must be 0, 1, or 2 + cmd.optimize = 'foo' + with pytest.raises(DistutilsOptionError): + cmd.finalize_options() + cmd.optimize = '4' + with pytest.raises(DistutilsOptionError): + cmd.finalize_options() + + cmd.optimize = '2' + cmd.finalize_options() + assert cmd.optimize == 2 + + @pytest.mark.skipif('sys.dont_write_bytecode') + def test_byte_compile(self): + project_dir, dist = self.create_dist() + os.chdir(project_dir) + cmd = install_lib(dist) + cmd.compile = cmd.optimize = 1 + + f = os.path.join(project_dir, 'foo.py') + self.write_file(f, '# python file') + cmd.byte_compile([f]) + pyc_file = importlib.util.cache_from_source('foo.py', optimization='') + pyc_opt_file = importlib.util.cache_from_source( + 'foo.py', optimization=cmd.optimize + ) + assert os.path.exists(pyc_file) + assert os.path.exists(pyc_opt_file) + + def test_get_outputs(self): + project_dir, dist = self.create_dist() + os.chdir(project_dir) + os.mkdir('spam') + cmd = install_lib(dist) + + # setting up a dist environment + cmd.compile = cmd.optimize = 1 + cmd.install_dir = self.mkdtemp() + f = os.path.join(project_dir, 'spam', '__init__.py') + self.write_file(f, '# python package') + cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] + cmd.distribution.packages = ['spam'] + cmd.distribution.script_name = 'setup.py' + + # get_outputs should return 4 elements: spam/__init__.py and .pyc, + # foo.import-tag-abiflags.so / foo.pyd + outputs = cmd.get_outputs() + assert len(outputs) == 4, outputs + + def test_get_inputs(self): + project_dir, dist = self.create_dist() + os.chdir(project_dir) + os.mkdir('spam') + cmd = install_lib(dist) + + # setting up a dist environment + cmd.compile = cmd.optimize = 1 + cmd.install_dir = self.mkdtemp() + f = os.path.join(project_dir, 'spam', '__init__.py') + self.write_file(f, '# python package') + cmd.distribution.ext_modules = [Extension('foo', ['xxx'])] + cmd.distribution.packages = ['spam'] + cmd.distribution.script_name = 'setup.py' + + # get_inputs should return 2 elements: spam/__init__.py and + # foo.import-tag-abiflags.so / foo.pyd + inputs = cmd.get_inputs() + assert len(inputs) == 2, inputs + + def test_dont_write_bytecode(self, caplog): + # makes sure byte_compile is not used + dist = self.create_dist()[1] + cmd = install_lib(dist) + cmd.compile = True + cmd.optimize = 1 + + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + cmd.byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + assert 'byte-compiling is disabled' in caplog.messages[0] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_scripts.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_scripts.py new file mode 100644 index 0000000000000000000000000000000000000000..868b1c22521f23a5dd398e4636c94330d4c238ac --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_install_scripts.py @@ -0,0 +1,52 @@ +"""Tests for distutils.command.install_scripts.""" + +import os +from distutils.command.install_scripts import install_scripts +from distutils.core import Distribution +from distutils.tests import support + +from . import test_build_scripts + + +class TestInstallScripts(support.TempdirManager): + def test_default_settings(self): + dist = Distribution() + dist.command_obj["build"] = support.DummyCommand(build_scripts="/foo/bar") + dist.command_obj["install"] = support.DummyCommand( + install_scripts="/splat/funk", + force=True, + skip_build=True, + ) + cmd = install_scripts(dist) + assert not cmd.force + assert not cmd.skip_build + assert cmd.build_dir is None + assert cmd.install_dir is None + + cmd.finalize_options() + + assert cmd.force + assert cmd.skip_build + assert cmd.build_dir == "/foo/bar" + assert cmd.install_dir == "/splat/funk" + + def test_installation(self): + source = self.mkdtemp() + + expected = test_build_scripts.TestBuildScripts.write_sample_scripts(source) + + target = self.mkdtemp() + dist = Distribution() + dist.command_obj["build"] = support.DummyCommand(build_scripts=source) + dist.command_obj["install"] = support.DummyCommand( + install_scripts=target, + force=True, + skip_build=True, + ) + cmd = install_scripts(dist) + cmd.finalize_options() + cmd.run() + + installed = os.listdir(target) + for name in expected: + assert name in installed diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_log.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_log.py new file mode 100644 index 0000000000000000000000000000000000000000..d67779fc9fa0f58a010929d5a456890c6dde3376 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_log.py @@ -0,0 +1,12 @@ +"""Tests for distutils.log""" + +import logging +from distutils._log import log + + +class TestLog: + def test_non_ascii(self, caplog): + caplog.set_level(logging.DEBUG) + log.debug('Dεbug\tMėssãge') + log.fatal('Fαtal\tÈrrōr') + assert caplog.messages == ['Dεbug\tMėssãge', 'Fαtal\tÈrrōr'] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_modified.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_modified.py new file mode 100644 index 0000000000000000000000000000000000000000..e35cec2d6f1a8d27619e33c253f0a83f0f72a75d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_modified.py @@ -0,0 +1,126 @@ +"""Tests for distutils._modified.""" + +import os +import types +from distutils._modified import newer, newer_group, newer_pairwise, newer_pairwise_group +from distutils.errors import DistutilsFileError +from distutils.tests import support + +import pytest + + +class TestDepUtil(support.TempdirManager): + def test_newer(self): + tmpdir = self.mkdtemp() + new_file = os.path.join(tmpdir, 'new') + old_file = os.path.abspath(__file__) + + # Raise DistutilsFileError if 'new_file' does not exist. + with pytest.raises(DistutilsFileError): + newer(new_file, old_file) + + # Return true if 'new_file' exists and is more recently modified than + # 'old_file', or if 'new_file' exists and 'old_file' doesn't. + self.write_file(new_file) + assert newer(new_file, 'I_dont_exist') + assert newer(new_file, old_file) + + # Return false if both exist and 'old_file' is the same age or younger + # than 'new_file'. + assert not newer(old_file, new_file) + + def _setup_1234(self): + tmpdir = self.mkdtemp() + sources = os.path.join(tmpdir, 'sources') + targets = os.path.join(tmpdir, 'targets') + os.mkdir(sources) + os.mkdir(targets) + one = os.path.join(sources, 'one') + two = os.path.join(sources, 'two') + three = os.path.abspath(__file__) # I am the old file + four = os.path.join(targets, 'four') + self.write_file(one) + self.write_file(two) + self.write_file(four) + return one, two, three, four + + def test_newer_pairwise(self): + one, two, three, four = self._setup_1234() + + assert newer_pairwise([one, two], [three, four]) == ([one], [three]) + + def test_newer_pairwise_mismatch(self): + one, two, three, four = self._setup_1234() + + with pytest.raises(ValueError): + newer_pairwise([one], [three, four]) + + with pytest.raises(ValueError): + newer_pairwise([one, two], [three]) + + def test_newer_pairwise_empty(self): + assert newer_pairwise([], []) == ([], []) + + def test_newer_pairwise_fresh(self): + one, two, three, four = self._setup_1234() + + assert newer_pairwise([one, three], [two, four]) == ([], []) + + def test_newer_group(self): + tmpdir = self.mkdtemp() + sources = os.path.join(tmpdir, 'sources') + os.mkdir(sources) + one = os.path.join(sources, 'one') + two = os.path.join(sources, 'two') + three = os.path.join(sources, 'three') + old_file = os.path.abspath(__file__) + + # return true if 'old_file' is out-of-date with respect to any file + # listed in 'sources'. + self.write_file(one) + self.write_file(two) + self.write_file(three) + assert newer_group([one, two, three], old_file) + assert not newer_group([one, two, old_file], three) + + # missing handling + os.remove(one) + with pytest.raises(OSError): + newer_group([one, two, old_file], three) + + assert not newer_group([one, two, old_file], three, missing='ignore') + + assert newer_group([one, two, old_file], three, missing='newer') + + +@pytest.fixture +def groups_target(tmp_path): + """ + Set up some older sources, a target, and newer sources. + + Returns a simple namespace with these values. + """ + filenames = ['older.c', 'older.h', 'target.o', 'newer.c', 'newer.h'] + paths = [tmp_path / name for name in filenames] + + for mtime, path in enumerate(paths): + path.write_text('', encoding='utf-8') + + # make sure modification times are sequential + os.utime(path, (mtime, mtime)) + + return types.SimpleNamespace(older=paths[:2], target=paths[2], newer=paths[3:]) + + +def test_newer_pairwise_group(groups_target): + older = newer_pairwise_group([groups_target.older], [groups_target.target]) + newer = newer_pairwise_group([groups_target.newer], [groups_target.target]) + assert older == ([], []) + assert newer == ([groups_target.newer], [groups_target.target]) + + +def test_newer_group_no_sources_no_target(tmp_path): + """ + Consider no sources and no target "newer". + """ + assert newer_group([], str(tmp_path / 'does-not-exist')) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_sdist.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_sdist.py new file mode 100644 index 0000000000000000000000000000000000000000..6b1a376b262162aa7c8d3d989709c05b38563d6c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_sdist.py @@ -0,0 +1,470 @@ +"""Tests for distutils.command.sdist.""" + +import os +import pathlib +import shutil # noqa: F401 +import tarfile +import zipfile +from distutils.archive_util import ARCHIVE_FORMATS +from distutils.command.sdist import sdist, show_formats +from distutils.core import Distribution +from distutils.errors import DistutilsOptionError +from distutils.filelist import FileList +from os.path import join +from textwrap import dedent + +import jaraco.path +import path +import pytest +from more_itertools import ilen + +from . import support +from .unix_compat import grp, pwd, require_uid_0, require_unix_id + +SETUP_PY = """ +from distutils.core import setup +import somecode + +setup(name='fake') +""" + +MANIFEST = """\ +# file GENERATED by distutils, do NOT edit +README +buildout.cfg +inroot.txt +setup.py +data%(sep)sdata.dt +scripts%(sep)sscript.py +some%(sep)sfile.txt +some%(sep)sother_file.txt +somecode%(sep)s__init__.py +somecode%(sep)sdoc.dat +somecode%(sep)sdoc.txt +""" + + +@pytest.fixture(autouse=True) +def project_dir(request, distutils_managed_tempdir): + self = request.instance + self.tmp_dir = self.mkdtemp() + jaraco.path.build( + { + 'somecode': { + '__init__.py': '#', + }, + 'README': 'xxx', + 'setup.py': SETUP_PY, + }, + self.tmp_dir, + ) + with path.Path(self.tmp_dir): + yield + + +def clean_lines(filepath): + with pathlib.Path(filepath).open(encoding='utf-8') as f: + yield from filter(None, map(str.strip, f)) + + +class TestSDist(support.TempdirManager): + def get_cmd(self, metadata=None): + """Returns a cmd""" + if metadata is None: + metadata = { + 'name': 'ns.fake--pkg', + 'version': '1.0', + 'url': 'xxx', + 'author': 'xxx', + 'author_email': 'xxx', + } + dist = Distribution(metadata) + dist.script_name = 'setup.py' + dist.packages = ['somecode'] + dist.include_package_data = True + cmd = sdist(dist) + cmd.dist_dir = 'dist' + return dist, cmd + + @pytest.mark.usefixtures('needs_zlib') + def test_prune_file_list(self): + # this test creates a project with some VCS dirs and an NFS rename + # file, then launches sdist to check they get pruned on all systems + + # creating VCS directories with some files in them + os.mkdir(join(self.tmp_dir, 'somecode', '.svn')) + self.write_file((self.tmp_dir, 'somecode', '.svn', 'ok.py'), 'xxx') + + os.mkdir(join(self.tmp_dir, 'somecode', '.hg')) + self.write_file((self.tmp_dir, 'somecode', '.hg', 'ok'), 'xxx') + + os.mkdir(join(self.tmp_dir, 'somecode', '.git')) + self.write_file((self.tmp_dir, 'somecode', '.git', 'ok'), 'xxx') + + self.write_file((self.tmp_dir, 'somecode', '.nfs0001'), 'xxx') + + # now building a sdist + dist, cmd = self.get_cmd() + + # zip is available universally + # (tar might not be installed under win32) + cmd.formats = ['zip'] + + cmd.ensure_finalized() + cmd.run() + + # now let's check what we have + dist_folder = join(self.tmp_dir, 'dist') + files = os.listdir(dist_folder) + assert files == ['ns_fake_pkg-1.0.zip'] + + zip_file = zipfile.ZipFile(join(dist_folder, 'ns_fake_pkg-1.0.zip')) + try: + content = zip_file.namelist() + finally: + zip_file.close() + + # making sure everything has been pruned correctly + expected = [ + '', + 'PKG-INFO', + 'README', + 'setup.py', + 'somecode/', + 'somecode/__init__.py', + ] + assert sorted(content) == ['ns_fake_pkg-1.0/' + x for x in expected] + + @pytest.mark.usefixtures('needs_zlib') + @pytest.mark.skipif("not shutil.which('tar')") + @pytest.mark.skipif("not shutil.which('gzip')") + def test_make_distribution(self): + # now building a sdist + dist, cmd = self.get_cmd() + + # creating a gztar then a tar + cmd.formats = ['gztar', 'tar'] + cmd.ensure_finalized() + cmd.run() + + # making sure we have two files + dist_folder = join(self.tmp_dir, 'dist') + result = os.listdir(dist_folder) + result.sort() + assert result == ['ns_fake_pkg-1.0.tar', 'ns_fake_pkg-1.0.tar.gz'] + + os.remove(join(dist_folder, 'ns_fake_pkg-1.0.tar')) + os.remove(join(dist_folder, 'ns_fake_pkg-1.0.tar.gz')) + + # now trying a tar then a gztar + cmd.formats = ['tar', 'gztar'] + + cmd.ensure_finalized() + cmd.run() + + result = os.listdir(dist_folder) + result.sort() + assert result == ['ns_fake_pkg-1.0.tar', 'ns_fake_pkg-1.0.tar.gz'] + + @pytest.mark.usefixtures('needs_zlib') + def test_add_defaults(self): + # https://bugs.python.org/issue2279 + + # add_default should also include + # data_files and package_data + dist, cmd = self.get_cmd() + + # filling data_files by pointing files + # in package_data + dist.package_data = {'': ['*.cfg', '*.dat'], 'somecode': ['*.txt']} + self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + self.write_file((self.tmp_dir, 'somecode', 'doc.dat'), '#') + + # adding some data in data_files + data_dir = join(self.tmp_dir, 'data') + os.mkdir(data_dir) + self.write_file((data_dir, 'data.dt'), '#') + some_dir = join(self.tmp_dir, 'some') + os.mkdir(some_dir) + # make sure VCS directories are pruned (#14004) + hg_dir = join(self.tmp_dir, '.hg') + os.mkdir(hg_dir) + self.write_file((hg_dir, 'last-message.txt'), '#') + # a buggy regex used to prevent this from working on windows (#6884) + self.write_file((self.tmp_dir, 'buildout.cfg'), '#') + self.write_file((self.tmp_dir, 'inroot.txt'), '#') + self.write_file((some_dir, 'file.txt'), '#') + self.write_file((some_dir, 'other_file.txt'), '#') + + dist.data_files = [ + ('data', ['data/data.dt', 'buildout.cfg', 'inroot.txt', 'notexisting']), + 'some/file.txt', + 'some/other_file.txt', + ] + + # adding a script + script_dir = join(self.tmp_dir, 'scripts') + os.mkdir(script_dir) + self.write_file((script_dir, 'script.py'), '#') + dist.scripts = [join('scripts', 'script.py')] + + cmd.formats = ['zip'] + cmd.use_defaults = True + + cmd.ensure_finalized() + cmd.run() + + # now let's check what we have + dist_folder = join(self.tmp_dir, 'dist') + files = os.listdir(dist_folder) + assert files == ['ns_fake_pkg-1.0.zip'] + + zip_file = zipfile.ZipFile(join(dist_folder, 'ns_fake_pkg-1.0.zip')) + try: + content = zip_file.namelist() + finally: + zip_file.close() + + # making sure everything was added + expected = [ + '', + 'PKG-INFO', + 'README', + 'buildout.cfg', + 'data/', + 'data/data.dt', + 'inroot.txt', + 'scripts/', + 'scripts/script.py', + 'setup.py', + 'some/', + 'some/file.txt', + 'some/other_file.txt', + 'somecode/', + 'somecode/__init__.py', + 'somecode/doc.dat', + 'somecode/doc.txt', + ] + assert sorted(content) == ['ns_fake_pkg-1.0/' + x for x in expected] + + # checking the MANIFEST + manifest = pathlib.Path(self.tmp_dir, 'MANIFEST').read_text(encoding='utf-8') + assert manifest == MANIFEST % {'sep': os.sep} + + @staticmethod + def warnings(messages, prefix='warning: '): + return [msg for msg in messages if msg.startswith(prefix)] + + @pytest.mark.usefixtures('needs_zlib') + def test_metadata_check_option(self, caplog): + # testing the `medata-check` option + dist, cmd = self.get_cmd(metadata={}) + + # this should raise some warnings ! + # with the `check` subcommand + cmd.ensure_finalized() + cmd.run() + assert len(self.warnings(caplog.messages, 'warning: check: ')) == 1 + + # trying with a complete set of metadata + caplog.clear() + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + cmd.metadata_check = False + cmd.run() + assert len(self.warnings(caplog.messages, 'warning: check: ')) == 0 + + def test_show_formats(self, capsys): + show_formats() + + # the output should be a header line + one line per format + num_formats = len(ARCHIVE_FORMATS.keys()) + output = [ + line + for line in capsys.readouterr().out.split('\n') + if line.strip().startswith('--formats=') + ] + assert len(output) == num_formats + + def test_finalize_options(self): + dist, cmd = self.get_cmd() + cmd.finalize_options() + + # default options set by finalize + assert cmd.manifest == 'MANIFEST' + assert cmd.template == 'MANIFEST.in' + assert cmd.dist_dir == 'dist' + + # formats has to be a string splitable on (' ', ',') or + # a stringlist + cmd.formats = 1 + with pytest.raises(DistutilsOptionError): + cmd.finalize_options() + cmd.formats = ['zip'] + cmd.finalize_options() + + # formats has to be known + cmd.formats = 'supazipa' + with pytest.raises(DistutilsOptionError): + cmd.finalize_options() + + # the following tests make sure there is a nice error message instead + # of a traceback when parsing an invalid manifest template + + def _check_template(self, content, caplog): + dist, cmd = self.get_cmd() + os.chdir(self.tmp_dir) + self.write_file('MANIFEST.in', content) + cmd.ensure_finalized() + cmd.filelist = FileList() + cmd.read_template() + assert len(self.warnings(caplog.messages)) == 1 + + def test_invalid_template_unknown_command(self, caplog): + self._check_template('taunt knights *', caplog) + + def test_invalid_template_wrong_arguments(self, caplog): + # this manifest command takes one argument + self._check_template('prune', caplog) + + @pytest.mark.skipif("platform.system() != 'Windows'") + def test_invalid_template_wrong_path(self, caplog): + # on Windows, trailing slashes are not allowed + # this used to crash instead of raising a warning: #8286 + self._check_template('include examples/', caplog) + + @pytest.mark.usefixtures('needs_zlib') + def test_get_file_list(self): + # make sure MANIFEST is recalculated + dist, cmd = self.get_cmd() + + # filling data_files by pointing files in package_data + dist.package_data = {'somecode': ['*.txt']} + self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') + cmd.formats = ['gztar'] + cmd.ensure_finalized() + cmd.run() + + assert ilen(clean_lines(cmd.manifest)) == 5 + + # adding a file + self.write_file((self.tmp_dir, 'somecode', 'doc2.txt'), '#') + + # make sure build_py is reinitialized, like a fresh run + build_py = dist.get_command_obj('build_py') + build_py.finalized = False + build_py.ensure_finalized() + + cmd.run() + + manifest2 = list(clean_lines(cmd.manifest)) + + # do we have the new file in MANIFEST ? + assert len(manifest2) == 6 + assert 'doc2.txt' in manifest2[-1] + + @pytest.mark.usefixtures('needs_zlib') + def test_manifest_marker(self): + # check that autogenerated MANIFESTs have a marker + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + cmd.run() + + assert ( + next(clean_lines(cmd.manifest)) + == '# file GENERATED by distutils, do NOT edit' + ) + + @pytest.mark.usefixtures('needs_zlib') + def test_manifest_comments(self): + # make sure comments don't cause exceptions or wrong includes + contents = dedent( + """\ + # bad.py + #bad.py + good.py + """ + ) + dist, cmd = self.get_cmd() + cmd.ensure_finalized() + self.write_file((self.tmp_dir, cmd.manifest), contents) + self.write_file((self.tmp_dir, 'good.py'), '# pick me!') + self.write_file((self.tmp_dir, 'bad.py'), "# don't pick me!") + self.write_file((self.tmp_dir, '#bad.py'), "# don't pick me!") + cmd.run() + assert cmd.filelist.files == ['good.py'] + + @pytest.mark.usefixtures('needs_zlib') + def test_manual_manifest(self): + # check that a MANIFEST without a marker is left alone + dist, cmd = self.get_cmd() + cmd.formats = ['gztar'] + cmd.ensure_finalized() + self.write_file((self.tmp_dir, cmd.manifest), 'README.manual') + self.write_file( + (self.tmp_dir, 'README.manual'), + 'This project maintains its MANIFEST file itself.', + ) + cmd.run() + assert cmd.filelist.files == ['README.manual'] + + assert list(clean_lines(cmd.manifest)) == ['README.manual'] + + archive_name = join(self.tmp_dir, 'dist', 'ns_fake_pkg-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + filenames = [tarinfo.name for tarinfo in archive] + finally: + archive.close() + assert sorted(filenames) == [ + 'ns_fake_pkg-1.0', + 'ns_fake_pkg-1.0/PKG-INFO', + 'ns_fake_pkg-1.0/README.manual', + ] + + @pytest.mark.usefixtures('needs_zlib') + @require_unix_id + @require_uid_0 + @pytest.mark.skipif("not shutil.which('tar')") + @pytest.mark.skipif("not shutil.which('gzip')") + def test_make_distribution_owner_group(self): + # now building a sdist + dist, cmd = self.get_cmd() + + # creating a gztar and specifying the owner+group + cmd.formats = ['gztar'] + cmd.owner = pwd.getpwuid(0)[0] + cmd.group = grp.getgrgid(0)[0] + cmd.ensure_finalized() + cmd.run() + + # making sure we have the good rights + archive_name = join(self.tmp_dir, 'dist', 'ns_fake_pkg-1.0.tar.gz') + archive = tarfile.open(archive_name) + try: + for member in archive.getmembers(): + assert member.uid == 0 + assert member.gid == 0 + finally: + archive.close() + + # building a sdist again + dist, cmd = self.get_cmd() + + # creating a gztar + cmd.formats = ['gztar'] + cmd.ensure_finalized() + cmd.run() + + # making sure we have the good rights + archive_name = join(self.tmp_dir, 'dist', 'ns_fake_pkg-1.0.tar.gz') + archive = tarfile.open(archive_name) + + # note that we are not testing the group ownership here + # because, depending on the platforms and the container + # rights (see #7408) + try: + for member in archive.getmembers(): + assert member.uid == os.getuid() + finally: + archive.close() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_spawn.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_spawn.py new file mode 100644 index 0000000000000000000000000000000000000000..3b9fc926f6ffc41673630fbf5775e6f4ad638b18 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_spawn.py @@ -0,0 +1,141 @@ +"""Tests for distutils.spawn.""" + +import os +import stat +import sys +import unittest.mock as mock +from distutils.errors import DistutilsExecError +from distutils.spawn import find_executable, spawn +from distutils.tests import support + +import path +import pytest +from test.support import unix_shell + +from .compat import py39 as os_helper + + +class TestSpawn(support.TempdirManager): + @pytest.mark.skipif("os.name not in ('nt', 'posix')") + def test_spawn(self): + tmpdir = self.mkdtemp() + + # creating something executable + # through the shell that returns 1 + if sys.platform != 'win32': + exe = os.path.join(tmpdir, 'foo.sh') + self.write_file(exe, f'#!{unix_shell}\nexit 1') + else: + exe = os.path.join(tmpdir, 'foo.bat') + self.write_file(exe, 'exit 1') + + os.chmod(exe, 0o777) + with pytest.raises(DistutilsExecError): + spawn([exe]) + + # now something that works + if sys.platform != 'win32': + exe = os.path.join(tmpdir, 'foo.sh') + self.write_file(exe, f'#!{unix_shell}\nexit 0') + else: + exe = os.path.join(tmpdir, 'foo.bat') + self.write_file(exe, 'exit 0') + + os.chmod(exe, 0o777) + spawn([exe]) # should work without any error + + def test_find_executable(self, tmp_path): + program_path = self._make_executable(tmp_path, '.exe') + program = program_path.name + program_noeext = program_path.with_suffix('').name + filename = str(program_path) + tmp_dir = path.Path(tmp_path) + + # test path parameter + rv = find_executable(program, path=tmp_dir) + assert rv == filename + + if sys.platform == 'win32': + # test without ".exe" extension + rv = find_executable(program_noeext, path=tmp_dir) + assert rv == filename + + # test find in the current directory + with tmp_dir: + rv = find_executable(program) + assert rv == program + + # test non-existent program + dont_exist_program = "dontexist_" + program + rv = find_executable(dont_exist_program, path=tmp_dir) + assert rv is None + + # PATH='': no match, except in the current directory + with os_helper.EnvironmentVarGuard() as env: + env['PATH'] = '' + with ( + mock.patch( + 'distutils.spawn.os.confstr', return_value=tmp_dir, create=True + ), + mock.patch('distutils.spawn.os.defpath', tmp_dir), + ): + rv = find_executable(program) + assert rv is None + + # look in current directory + with tmp_dir: + rv = find_executable(program) + assert rv == program + + # PATH=':': explicitly looks in the current directory + with os_helper.EnvironmentVarGuard() as env: + env['PATH'] = os.pathsep + with ( + mock.patch('distutils.spawn.os.confstr', return_value='', create=True), + mock.patch('distutils.spawn.os.defpath', ''), + ): + rv = find_executable(program) + assert rv is None + + # look in current directory + with tmp_dir: + rv = find_executable(program) + assert rv == program + + # missing PATH: test os.confstr("CS_PATH") and os.defpath + with os_helper.EnvironmentVarGuard() as env: + env.pop('PATH', None) + + # without confstr + with ( + mock.patch( + 'distutils.spawn.os.confstr', side_effect=ValueError, create=True + ), + mock.patch('distutils.spawn.os.defpath', tmp_dir), + ): + rv = find_executable(program) + assert rv == filename + + # with confstr + with ( + mock.patch( + 'distutils.spawn.os.confstr', return_value=tmp_dir, create=True + ), + mock.patch('distutils.spawn.os.defpath', ''), + ): + rv = find_executable(program) + assert rv == filename + + @staticmethod + def _make_executable(tmp_path, ext): + # Give the temporary program a suffix regardless of platform. + # It's needed on Windows and not harmful on others. + program = tmp_path.joinpath('program').with_suffix(ext) + program.write_text("", encoding='utf-8') + program.chmod(stat.S_IXUSR) + return program + + def test_spawn_missing_exe(self): + with pytest.raises(DistutilsExecError) as ctx: + spawn(['does-not-exist']) + assert "command 'does-not-exist' failed" in str(ctx.value) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_sysconfig.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_sysconfig.py new file mode 100644 index 0000000000000000000000000000000000000000..43d77c23fad426be237b9f91a6d98d7c36233d84 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_sysconfig.py @@ -0,0 +1,319 @@ +"""Tests for distutils.sysconfig.""" + +import contextlib +import distutils +import os +import pathlib +import subprocess +import sys +from distutils import sysconfig +from distutils.ccompiler import new_compiler # noqa: F401 +from distutils.unixccompiler import UnixCCompiler + +import jaraco.envs +import path +import pytest +from jaraco.text import trim +from test.support import swap_item + + +def _gen_makefile(root, contents): + jaraco.path.build({'Makefile': trim(contents)}, root) + return root / 'Makefile' + + +@pytest.mark.usefixtures('save_env') +class TestSysconfig: + def test_get_config_h_filename(self): + config_h = sysconfig.get_config_h_filename() + assert os.path.isfile(config_h) + + @pytest.mark.skipif("platform.system() == 'Windows'") + @pytest.mark.skipif("sys.implementation.name != 'cpython'") + def test_get_makefile_filename(self): + makefile = sysconfig.get_makefile_filename() + assert os.path.isfile(makefile) + + def test_get_python_lib(self, tmp_path): + assert sysconfig.get_python_lib() != sysconfig.get_python_lib(prefix=tmp_path) + + def test_get_config_vars(self): + cvars = sysconfig.get_config_vars() + assert isinstance(cvars, dict) + assert cvars + + @pytest.mark.skipif('sysconfig.IS_PYPY') + @pytest.mark.skipif('sysconfig.python_build') + @pytest.mark.xfail('platform.system() == "Windows"') + def test_srcdir_simple(self): + # See #15364. + srcdir = pathlib.Path(sysconfig.get_config_var('srcdir')) + + assert srcdir.absolute() + assert srcdir.is_dir() + + makefile = pathlib.Path(sysconfig.get_makefile_filename()) + assert makefile.parent.samefile(srcdir) + + @pytest.mark.skipif('sysconfig.IS_PYPY') + @pytest.mark.skipif('not sysconfig.python_build') + def test_srcdir_python_build(self): + # See #15364. + srcdir = pathlib.Path(sysconfig.get_config_var('srcdir')) + + # The python executable has not been installed so srcdir + # should be a full source checkout. + Python_h = srcdir.joinpath('Include', 'Python.h') + assert Python_h.is_file() + assert sysconfig._is_python_source_dir(srcdir) + assert sysconfig._is_python_source_dir(str(srcdir)) + + def test_srcdir_independent_of_cwd(self): + """ + srcdir should be independent of the current working directory + """ + # See #15364. + srcdir = sysconfig.get_config_var('srcdir') + with path.Path('..'): + srcdir2 = sysconfig.get_config_var('srcdir') + assert srcdir == srcdir2 + + def customize_compiler(self): + # make sure AR gets caught + class compiler: + compiler_type = 'unix' + executables = UnixCCompiler.executables + + def __init__(self): + self.exes = {} + + def set_executables(self, **kw): + for k, v in kw.items(): + self.exes[k] = v + + sysconfig_vars = { + 'AR': 'sc_ar', + 'CC': 'sc_cc', + 'CXX': 'sc_cxx', + 'ARFLAGS': '--sc-arflags', + 'CFLAGS': '--sc-cflags', + 'CCSHARED': '--sc-ccshared', + 'LDSHARED': 'sc_ldshared', + 'SHLIB_SUFFIX': 'sc_shutil_suffix', + } + + comp = compiler() + with contextlib.ExitStack() as cm: + for key, value in sysconfig_vars.items(): + cm.enter_context(swap_item(sysconfig._config_vars, key, value)) + sysconfig.customize_compiler(comp) + + return comp + + @pytest.mark.skipif("not isinstance(new_compiler(), UnixCCompiler)") + @pytest.mark.usefixtures('disable_macos_customization') + def test_customize_compiler(self): + # Make sure that sysconfig._config_vars is initialized + sysconfig.get_config_vars() + + os.environ['AR'] = 'env_ar' + os.environ['CC'] = 'env_cc' + os.environ['CPP'] = 'env_cpp' + os.environ['CXX'] = 'env_cxx --env-cxx-flags' + os.environ['LDSHARED'] = 'env_ldshared' + os.environ['LDFLAGS'] = '--env-ldflags' + os.environ['ARFLAGS'] = '--env-arflags' + os.environ['CFLAGS'] = '--env-cflags' + os.environ['CPPFLAGS'] = '--env-cppflags' + os.environ['RANLIB'] = 'env_ranlib' + + comp = self.customize_compiler() + assert comp.exes['archiver'] == 'env_ar --env-arflags' + assert comp.exes['preprocessor'] == 'env_cpp --env-cppflags' + assert comp.exes['compiler'] == 'env_cc --env-cflags --env-cppflags' + assert comp.exes['compiler_so'] == ( + 'env_cc --env-cflags --env-cppflags --sc-ccshared' + ) + assert ( + comp.exes['compiler_cxx'] + == 'env_cxx --env-cxx-flags --sc-cflags --env-cppflags' + ) + assert comp.exes['linker_exe'] == 'env_cc' + assert comp.exes['linker_so'] == ( + 'env_ldshared --env-ldflags --env-cflags --env-cppflags' + ) + assert comp.shared_lib_extension == 'sc_shutil_suffix' + + if sys.platform == "darwin": + assert comp.exes['ranlib'] == 'env_ranlib' + else: + assert 'ranlib' not in comp.exes + + del os.environ['AR'] + del os.environ['CC'] + del os.environ['CPP'] + del os.environ['CXX'] + del os.environ['LDSHARED'] + del os.environ['LDFLAGS'] + del os.environ['ARFLAGS'] + del os.environ['CFLAGS'] + del os.environ['CPPFLAGS'] + del os.environ['RANLIB'] + + comp = self.customize_compiler() + assert comp.exes['archiver'] == 'sc_ar --sc-arflags' + assert comp.exes['preprocessor'] == 'sc_cc -E' + assert comp.exes['compiler'] == 'sc_cc --sc-cflags' + assert comp.exes['compiler_so'] == 'sc_cc --sc-cflags --sc-ccshared' + assert comp.exes['compiler_cxx'] == 'sc_cxx --sc-cflags' + assert comp.exes['linker_exe'] == 'sc_cc' + assert comp.exes['linker_so'] == 'sc_ldshared' + assert comp.shared_lib_extension == 'sc_shutil_suffix' + assert 'ranlib' not in comp.exes + + def test_parse_makefile_base(self, tmp_path): + makefile = _gen_makefile( + tmp_path, + """ + CONFIG_ARGS= '--arg1=optarg1' 'ENV=LIB' + VAR=$OTHER + OTHER=foo + """, + ) + d = sysconfig.parse_makefile(makefile) + assert d == {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'", 'OTHER': 'foo'} + + def test_parse_makefile_literal_dollar(self, tmp_path): + makefile = _gen_makefile( + tmp_path, + """ + CONFIG_ARGS= '--arg1=optarg1' 'ENV=\\$$LIB' + VAR=$OTHER + OTHER=foo + """, + ) + d = sysconfig.parse_makefile(makefile) + assert d == {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'", 'OTHER': 'foo'} + + def test_sysconfig_module(self): + import sysconfig as global_sysconfig + + assert global_sysconfig.get_config_var('CFLAGS') == sysconfig.get_config_var( + 'CFLAGS' + ) + assert global_sysconfig.get_config_var('LDFLAGS') == sysconfig.get_config_var( + 'LDFLAGS' + ) + + # On macOS, binary installers support extension module building on + # various levels of the operating system with differing Xcode + # configurations, requiring customization of some of the + # compiler configuration directives to suit the environment on + # the installed machine. Some of these customizations may require + # running external programs and are thus deferred until needed by + # the first extension module build. Only + # the Distutils version of sysconfig is used for extension module + # builds, which happens earlier in the Distutils tests. This may + # cause the following tests to fail since no tests have caused + # the global version of sysconfig to call the customization yet. + # The solution for now is to simply skip this test in this case. + # The longer-term solution is to only have one version of sysconfig. + @pytest.mark.skipif("sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER')") + def test_sysconfig_compiler_vars(self): + import sysconfig as global_sysconfig + + if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'): + pytest.skip('compiler flags customized') + assert global_sysconfig.get_config_var('LDSHARED') == sysconfig.get_config_var( + 'LDSHARED' + ) + assert global_sysconfig.get_config_var('CC') == sysconfig.get_config_var('CC') + + @pytest.mark.skipif("not sysconfig.get_config_var('EXT_SUFFIX')") + def test_SO_deprecation(self): + with pytest.warns(DeprecationWarning): + sysconfig.get_config_var('SO') + + def test_customize_compiler_before_get_config_vars(self, tmp_path): + # Issue #21923: test that a Distribution compiler + # instance can be called without an explicit call to + # get_config_vars(). + jaraco.path.build( + { + 'file': trim(""" + from distutils.core import Distribution + config = Distribution().get_command_obj('config') + # try_compile may pass or it may fail if no compiler + # is found but it should not raise an exception. + rc = config.try_compile('int x;') + """) + }, + tmp_path, + ) + p = subprocess.Popen( + [sys.executable, tmp_path / 'file'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + universal_newlines=True, + encoding='utf-8', + ) + outs, errs = p.communicate() + assert 0 == p.returncode, "Subprocess failed: " + outs + + def test_parse_config_h(self): + config_h = sysconfig.get_config_h_filename() + input = {} + with open(config_h, encoding="utf-8") as f: + result = sysconfig.parse_config_h(f, g=input) + assert input is result + with open(config_h, encoding="utf-8") as f: + result = sysconfig.parse_config_h(f) + assert isinstance(result, dict) + + @pytest.mark.skipif("platform.system() != 'Windows'") + @pytest.mark.skipif("sys.implementation.name != 'cpython'") + def test_win_ext_suffix(self): + assert sysconfig.get_config_var("EXT_SUFFIX").endswith(".pyd") + assert sysconfig.get_config_var("EXT_SUFFIX") != ".pyd" + + @pytest.mark.skipif("platform.system() != 'Windows'") + @pytest.mark.skipif("sys.implementation.name != 'cpython'") + @pytest.mark.skipif( + '\\PCbuild\\'.casefold() not in sys.executable.casefold(), + reason='Need sys.executable to be in a source tree', + ) + def test_win_build_venv_from_source_tree(self, tmp_path): + """Ensure distutils.sysconfig detects venvs from source tree builds.""" + env = jaraco.envs.VEnv() + env.create_opts = env.clean_opts + env.root = tmp_path + env.ensure_env() + cmd = [ + env.exe(), + "-c", + "import distutils.sysconfig; print(distutils.sysconfig.python_build)", + ] + distutils_path = os.path.dirname(os.path.dirname(distutils.__file__)) + out = subprocess.check_output( + cmd, env={**os.environ, "PYTHONPATH": distutils_path} + ) + assert out == "True" + + def test_get_python_inc_missing_config_dir(self, monkeypatch): + """ + In portable Python installations, the sysconfig will be broken, + pointing to the directories where the installation was built and + not where it currently is. In this case, ensure that the missing + directory isn't used for get_python_inc. + + See pypa/distutils#178. + """ + + def override(name): + if name == 'INCLUDEPY': + return '/does-not-exist' + return sysconfig.get_config_var(name) + + monkeypatch.setattr(sysconfig, 'get_config_var', override) + + assert os.path.exists(sysconfig.get_python_inc()) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_text_file.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_text_file.py new file mode 100644 index 0000000000000000000000000000000000000000..f51115656135cd3f348a45d4a14f97eeee47fb98 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_text_file.py @@ -0,0 +1,127 @@ +"""Tests for distutils.text_file.""" + +from distutils.tests import support +from distutils.text_file import TextFile + +import jaraco.path +import path + +TEST_DATA = """# test file + +line 3 \\ +# intervening comment + continues on next line +""" + + +class TestTextFile(support.TempdirManager): + def test_class(self): + # old tests moved from text_file.__main__ + # so they are really called by the buildbots + + # result 1: no fancy options + result1 = [ + '# test file\n', + '\n', + 'line 3 \\\n', + '# intervening comment\n', + ' continues on next line\n', + ] + + # result 2: just strip comments + result2 = ["\n", "line 3 \\\n", " continues on next line\n"] + + # result 3: just strip blank lines + result3 = [ + "# test file\n", + "line 3 \\\n", + "# intervening comment\n", + " continues on next line\n", + ] + + # result 4: default, strip comments, blank lines, + # and trailing whitespace + result4 = ["line 3 \\", " continues on next line"] + + # result 5: strip comments and blanks, plus join lines (but don't + # "collapse" joined lines + result5 = ["line 3 continues on next line"] + + # result 6: strip comments and blanks, plus join lines (and + # "collapse" joined lines + result6 = ["line 3 continues on next line"] + + def test_input(count, description, file, expected_result): + result = file.readlines() + assert result == expected_result + + tmp_path = path.Path(self.mkdtemp()) + filename = tmp_path / 'test.txt' + jaraco.path.build({filename.name: TEST_DATA}, tmp_path) + + in_file = TextFile( + filename, + strip_comments=False, + skip_blanks=False, + lstrip_ws=False, + rstrip_ws=False, + ) + try: + test_input(1, "no processing", in_file, result1) + finally: + in_file.close() + + in_file = TextFile( + filename, + strip_comments=True, + skip_blanks=False, + lstrip_ws=False, + rstrip_ws=False, + ) + try: + test_input(2, "strip comments", in_file, result2) + finally: + in_file.close() + + in_file = TextFile( + filename, + strip_comments=False, + skip_blanks=True, + lstrip_ws=False, + rstrip_ws=False, + ) + try: + test_input(3, "strip blanks", in_file, result3) + finally: + in_file.close() + + in_file = TextFile(filename) + try: + test_input(4, "default processing", in_file, result4) + finally: + in_file.close() + + in_file = TextFile( + filename, + strip_comments=True, + skip_blanks=True, + join_lines=True, + rstrip_ws=True, + ) + try: + test_input(5, "join lines without collapsing", in_file, result5) + finally: + in_file.close() + + in_file = TextFile( + filename, + strip_comments=True, + skip_blanks=True, + join_lines=True, + rstrip_ws=True, + collapse_join=True, + ) + try: + test_input(6, "join lines with collapsing", in_file, result6) + finally: + in_file.close() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_util.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_util.py new file mode 100644 index 0000000000000000000000000000000000000000..00c9743ed0a2664039060ef149d30f165bf2f465 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_util.py @@ -0,0 +1,243 @@ +"""Tests for distutils.util.""" + +import email +import email.generator +import email.policy +import io +import os +import pathlib +import sys +import sysconfig as stdlib_sysconfig +import unittest.mock as mock +from copy import copy +from distutils import sysconfig, util +from distutils.errors import DistutilsByteCompileError, DistutilsPlatformError +from distutils.util import ( + byte_compile, + change_root, + check_environ, + convert_path, + get_host_platform, + get_platform, + grok_environment_error, + rfc822_escape, + split_quoted, + strtobool, +) + +import pytest + + +@pytest.fixture(autouse=True) +def environment(monkeypatch): + monkeypatch.setattr(os, 'name', os.name) + monkeypatch.setattr(sys, 'platform', sys.platform) + monkeypatch.setattr(sys, 'version', sys.version) + monkeypatch.setattr(os, 'sep', os.sep) + monkeypatch.setattr(os.path, 'join', os.path.join) + monkeypatch.setattr(os.path, 'isabs', os.path.isabs) + monkeypatch.setattr(os.path, 'splitdrive', os.path.splitdrive) + monkeypatch.setattr(sysconfig, '_config_vars', copy(sysconfig._config_vars)) + + +@pytest.mark.usefixtures('save_env') +class TestUtil: + def test_get_host_platform(self): + with mock.patch('os.name', 'nt'): + with mock.patch('sys.version', '... [... (ARM64)]'): + assert get_host_platform() == 'win-arm64' + with mock.patch('sys.version', '... [... (ARM)]'): + assert get_host_platform() == 'win-arm32' + + with mock.patch('sys.version_info', (3, 9, 0, 'final', 0)): + assert get_host_platform() == stdlib_sysconfig.get_platform() + + def test_get_platform(self): + with mock.patch('os.name', 'nt'): + with mock.patch.dict('os.environ', {'VSCMD_ARG_TGT_ARCH': 'x86'}): + assert get_platform() == 'win32' + with mock.patch.dict('os.environ', {'VSCMD_ARG_TGT_ARCH': 'x64'}): + assert get_platform() == 'win-amd64' + with mock.patch.dict('os.environ', {'VSCMD_ARG_TGT_ARCH': 'arm'}): + assert get_platform() == 'win-arm32' + with mock.patch.dict('os.environ', {'VSCMD_ARG_TGT_ARCH': 'arm64'}): + assert get_platform() == 'win-arm64' + + def test_convert_path(self): + expected = os.sep.join(('', 'home', 'to', 'my', 'stuff')) + assert convert_path('/home/to/my/stuff') == expected + assert convert_path(pathlib.Path('/home/to/my/stuff')) == expected + assert convert_path('.') == os.curdir + + def test_change_root(self): + # linux/mac + os.name = 'posix' + + def _isabs(path): + return path[0] == '/' + + os.path.isabs = _isabs + + def _join(*path): + return '/'.join(path) + + os.path.join = _join + + assert change_root('/root', '/old/its/here') == '/root/old/its/here' + assert change_root('/root', 'its/here') == '/root/its/here' + + # windows + os.name = 'nt' + os.sep = '\\' + + def _isabs(path): + return path.startswith('c:\\') + + os.path.isabs = _isabs + + def _splitdrive(path): + if path.startswith('c:'): + return ('', path.replace('c:', '')) + return ('', path) + + os.path.splitdrive = _splitdrive + + def _join(*path): + return '\\'.join(path) + + os.path.join = _join + + assert ( + change_root('c:\\root', 'c:\\old\\its\\here') == 'c:\\root\\old\\its\\here' + ) + assert change_root('c:\\root', 'its\\here') == 'c:\\root\\its\\here' + + # BugsBunny os (it's a great os) + os.name = 'BugsBunny' + with pytest.raises(DistutilsPlatformError): + change_root('c:\\root', 'its\\here') + + # XXX platforms to be covered: mac + + def test_check_environ(self): + util.check_environ.cache_clear() + os.environ.pop('HOME', None) + + check_environ() + + assert os.environ['PLAT'] == get_platform() + + @pytest.mark.skipif("os.name != 'posix'") + def test_check_environ_getpwuid(self): + util.check_environ.cache_clear() + os.environ.pop('HOME', None) + + import pwd + + # only set pw_dir field, other fields are not used + result = pwd.struct_passwd(( + None, + None, + None, + None, + None, + '/home/distutils', + None, + )) + with mock.patch.object(pwd, 'getpwuid', return_value=result): + check_environ() + assert os.environ['HOME'] == '/home/distutils' + + util.check_environ.cache_clear() + os.environ.pop('HOME', None) + + # bpo-10496: Catch pwd.getpwuid() error + with mock.patch.object(pwd, 'getpwuid', side_effect=KeyError): + check_environ() + assert 'HOME' not in os.environ + + def test_split_quoted(self): + assert split_quoted('""one"" "two" \'three\' \\four') == [ + 'one', + 'two', + 'three', + 'four', + ] + + def test_strtobool(self): + yes = ('y', 'Y', 'yes', 'True', 't', 'true', 'True', 'On', 'on', '1') + no = ('n', 'no', 'f', 'false', 'off', '0', 'Off', 'No', 'N') + + for y in yes: + assert strtobool(y) + + for n in no: + assert not strtobool(n) + + indent = 8 * ' ' + + @pytest.mark.parametrize( + "given,wanted", + [ + # 0x0b, 0x0c, ..., etc are also considered a line break by Python + ("hello\x0b\nworld\n", f"hello\x0b{indent}\n{indent}world\n{indent}"), + ("hello\x1eworld", f"hello\x1e{indent}world"), + ("", ""), + ( + "I am a\npoor\nlonesome\nheader\n", + f"I am a\n{indent}poor\n{indent}lonesome\n{indent}header\n{indent}", + ), + ], + ) + def test_rfc822_escape(self, given, wanted): + """ + We want to ensure a multi-line header parses correctly. + + For interoperability, the escaped value should also "round-trip" over + `email.generator.Generator.flatten` and `email.message_from_*` + (see pypa/setuptools#4033). + + The main issue is that internally `email.policy.EmailPolicy` uses + `splitlines` which will split on some control chars. If all the new lines + are not prefixed with spaces, the parser will interrupt reading + the current header and produce an incomplete value, while + incorrectly interpreting the rest of the headers as part of the payload. + """ + res = rfc822_escape(given) + + policy = email.policy.EmailPolicy( + utf8=True, + mangle_from_=False, + max_line_length=0, + ) + with io.StringIO() as buffer: + raw = f"header: {res}\nother-header: 42\n\npayload\n" + orig = email.message_from_string(raw) + email.generator.Generator(buffer, policy=policy).flatten(orig) + buffer.seek(0) + regen = email.message_from_file(buffer) + + for msg in (orig, regen): + assert msg.get_payload() == "payload\n" + assert msg["other-header"] == "42" + # Generator may replace control chars with `\n` + assert set(msg["header"].splitlines()) == set(res.splitlines()) + + assert res == wanted + + def test_dont_write_bytecode(self): + # makes sure byte_compile raise a DistutilsError + # if sys.dont_write_bytecode is True + old_dont_write_bytecode = sys.dont_write_bytecode + sys.dont_write_bytecode = True + try: + with pytest.raises(DistutilsByteCompileError): + byte_compile([]) + finally: + sys.dont_write_bytecode = old_dont_write_bytecode + + def test_grok_environment_error(self): + # test obsolete function to ensure backward compat (#4931) + exc = OSError("Unable to find batch file") + msg = grok_environment_error(exc) + assert msg == "error: Unable to find batch file" diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_version.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_version.py new file mode 100644 index 0000000000000000000000000000000000000000..b68f0977249aa23aafbf31cf74a0e4127f777d05 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_version.py @@ -0,0 +1,80 @@ +"""Tests for distutils.version.""" + +import distutils +from distutils.version import LooseVersion, StrictVersion + +import pytest + + +@pytest.fixture(autouse=True) +def suppress_deprecation(): + with distutils.version.suppress_known_deprecation(): + yield + + +class TestVersion: + def test_prerelease(self): + version = StrictVersion('1.2.3a1') + assert version.version == (1, 2, 3) + assert version.prerelease == ('a', 1) + assert str(version) == '1.2.3a1' + + version = StrictVersion('1.2.0') + assert str(version) == '1.2' + + def test_cmp_strict(self): + versions = ( + ('1.5.1', '1.5.2b2', -1), + ('161', '3.10a', ValueError), + ('8.02', '8.02', 0), + ('3.4j', '1996.07.12', ValueError), + ('3.2.pl0', '3.1.1.6', ValueError), + ('2g6', '11g', ValueError), + ('0.9', '2.2', -1), + ('1.2.1', '1.2', 1), + ('1.1', '1.2.2', -1), + ('1.2', '1.1', 1), + ('1.2.1', '1.2.2', -1), + ('1.2.2', '1.2', 1), + ('1.2', '1.2.2', -1), + ('0.4.0', '0.4', 0), + ('1.13++', '5.5.kw', ValueError), + ) + + for v1, v2, wanted in versions: + try: + res = StrictVersion(v1)._cmp(StrictVersion(v2)) + except ValueError: + if wanted is ValueError: + continue + else: + raise AssertionError(f"cmp({v1}, {v2}) shouldn't raise ValueError") + assert res == wanted, f'cmp({v1}, {v2}) should be {wanted}, got {res}' + res = StrictVersion(v1)._cmp(v2) + assert res == wanted, f'cmp({v1}, {v2}) should be {wanted}, got {res}' + res = StrictVersion(v1)._cmp(object()) + assert res is NotImplemented, ( + f'cmp({v1}, {v2}) should be NotImplemented, got {res}' + ) + + def test_cmp(self): + versions = ( + ('1.5.1', '1.5.2b2', -1), + ('161', '3.10a', 1), + ('8.02', '8.02', 0), + ('3.4j', '1996.07.12', -1), + ('3.2.pl0', '3.1.1.6', 1), + ('2g6', '11g', -1), + ('0.960923', '2.2beta29', -1), + ('1.13++', '5.5.kw', -1), + ) + + for v1, v2, wanted in versions: + res = LooseVersion(v1)._cmp(LooseVersion(v2)) + assert res == wanted, f'cmp({v1}, {v2}) should be {wanted}, got {res}' + res = LooseVersion(v1)._cmp(v2) + assert res == wanted, f'cmp({v1}, {v2}) should be {wanted}, got {res}' + res = LooseVersion(v1)._cmp(object()) + assert res is NotImplemented, ( + f'cmp({v1}, {v2}) should be NotImplemented, got {res}' + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_versionpredicate.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/test_versionpredicate.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/unix_compat.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/unix_compat.py new file mode 100644 index 0000000000000000000000000000000000000000..a5d9ee45ccc639794d29ba0a5fd24f781ee5ecf5 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/_distutils/tests/unix_compat.py @@ -0,0 +1,17 @@ +import sys + +try: + import grp + import pwd +except ImportError: + grp = pwd = None + +import pytest + +UNIX_ID_SUPPORT = grp and pwd +UID_0_SUPPORT = UNIX_ID_SUPPORT and sys.platform != "cygwin" + +require_unix_id = pytest.mark.skipif( + not UNIX_ID_SUPPORT, reason="Requires grp and pwd support" +) +require_uid_0 = pytest.mark.skipif(not UID_0_SUPPORT, reason="Requires UID 0 support") diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5d50e63bbe12ba901b6146b3446aa61bf65873df Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/_requirestxt.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/_requirestxt.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b07186fcee53a05d1e5219fbecfe8a8bea15ab8 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/_requirestxt.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/alias.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/alias.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f02058259a78aa10c6e6806aa5d5c43bf846e0c8 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/alias.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3b833b634bc8660380c5ba2cf7be6d1ae97edb3d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_rpm.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_rpm.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7e17d5fe33e8435b31b948769cfa5002c9713dcf Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_rpm.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_wheel.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..997a0d12f87491a0c50302a6d48d12bfd4ce5a5b Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/bdist_wheel.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a4ed0457df4add697d81d3217699f1398cecf6f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_clib.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_clib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2bff537177ad904651a66268b038cb46f2f68135 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_clib.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_ext.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_ext.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff6419090490e3f547e42a836cd9adfb333d53c4 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_ext.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_py.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_py.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a0f1acd5094ae56fc89d1a1c1c51422028d4985 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/build_py.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/develop.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/develop.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..302838a99ef0c04d3dbbdff51810e2b9e67f1279 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/develop.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/dist_info.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/dist_info.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8698eccd8afc35094c5b239dcc1519e6610a2374 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/dist_info.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/easy_install.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/easy_install.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2e49567530f75ed21d5b1964a1de01f4321797e4 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/easy_install.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/editable_wheel.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/editable_wheel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9356fc7a10a217d2d93418f7199708944224c7ff Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/editable_wheel.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/egg_info.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/egg_info.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4fb153a4ea28837dcc5e21e17656f7f9e09ba1b1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/egg_info.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d255649885cd085ca1b927715408e075d0436054 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76c6654acbd795f92ef08de59098858ef87ae907 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_egg_info.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_lib.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_lib.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd937b9f641b117daca055f2c2b8974212671f06 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_lib.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_scripts.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_scripts.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..69d69ec2ae10b30b78a7c23779f8bf93c29f92c1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/install_scripts.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/rotate.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/rotate.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3551512d4fb7df9d69b7abbf66835980c7a3fb79 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/rotate.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/saveopts.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/saveopts.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..68c88642ae8ad2afa4d83a6d301faa2b4609eb26 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/saveopts.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/sdist.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/sdist.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..300deebb08dbefe4954d422ed9c66e4b7a6c2568 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/sdist.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/setopt.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/setopt.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67f0fea02b99acff1df4a70e479d2b1ec6a06352 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/setopt.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/test.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/test.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..00fa13af662d32314a599bb32164a9f5e3910333 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/command/__pycache__/test.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a6a80c3baad7f44eb8f5b03ab44d5ceda723b1b Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py310.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py310.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..89fb6dc7a5b2eb5b7414a8711da7ca39119a58e4 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py310.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py311.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py311.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7505ac254d7ed5c484a97cc3b8ee7dd243ef04a1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py311.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py312.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py312.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..afe2400c520fc06114e490dd10120fac846de987 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py312.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py39.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py39.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e483d8a43bff81a5a29fea2922e1f3a68364f2e0 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/compat/__pycache__/py39.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66e6a3f683500980416f787e4eaeb78eee234f90 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/_apply_pyprojecttoml.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/_apply_pyprojecttoml.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82ad6450efc9c1e21bc9fc2cdfba5f3cf6b8364a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/_apply_pyprojecttoml.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/expand.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/expand.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9f24fd59d8e9704f5af0c07b1e5c5efcca0260e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/expand.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/pyprojecttoml.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/pyprojecttoml.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff7abf322d8a3602c652f1d36bc8325495a236b1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/pyprojecttoml.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/setupcfg.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/setupcfg.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..52310f4d6129c79c357889327aa17cd299b781cf Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/__pycache__/setupcfg.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/NOTICE b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..ac5464d88c6f071c18d8eceb1e81d2550573599b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/NOTICE @@ -0,0 +1,438 @@ +The code contained in this directory was automatically generated using the +following command: + + python -m validate_pyproject.pre_compile --output-dir=setuptools/config/_validate_pyproject --enable-plugins setuptools distutils --very-verbose -t setuptools=setuptools/config/setuptools.schema.json -t distutils=setuptools/config/distutils.schema.json + +Please avoid changing it manually. + + +You can report issues or suggest changes directly to `validate-pyproject` +(or to the relevant plugin repository) + +- https://github.com/abravalheri/validate-pyproject/issues + + +*** + +The following files include code from opensource projects +(either as direct copies or modified versions): + +- `fastjsonschema_exceptions.py`: + - project: `fastjsonschema` - licensed under BSD-3-Clause + (https://github.com/horejsek/python-fastjsonschema) +- `extra_validations.py` and `format.py`, `error_reporting.py`: + - project: `validate-pyproject` - licensed under MPL-2.0 + (https://github.com/abravalheri/validate-pyproject) + + +Additionally the following files are automatically generated by tools provided +by the same projects: + +- `__init__.py` +- `fastjsonschema_validations.py` + +The relevant copyright notes and licenses are included below. + + +*** + +`fastjsonschema` +================ + +Copyright (c) 2018, Michal Horejsek +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + + Neither the name of the {organization} nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +*** + +`validate-pyproject` +==================== + +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + https://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f612bd51c4ac1d272318ed6fb96e4aeb57e3e27 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__init__.py @@ -0,0 +1,34 @@ +from functools import reduce +from typing import Any, Callable, Dict + +from . import formats +from .error_reporting import detailed_errors, ValidationError +from .extra_validations import EXTRA_VALIDATIONS +from .fastjsonschema_exceptions import JsonSchemaException, JsonSchemaValueException +from .fastjsonschema_validations import validate as _validate + +__all__ = [ + "validate", + "FORMAT_FUNCTIONS", + "EXTRA_VALIDATIONS", + "ValidationError", + "JsonSchemaException", + "JsonSchemaValueException", +] + + +FORMAT_FUNCTIONS: Dict[str, Callable[[str], bool]] = { + fn.__name__.replace("_", "-"): fn + for fn in formats.__dict__.values() + if callable(fn) and not fn.__name__.startswith("_") +} + + +def validate(data: Any) -> bool: + """Validate the given ``data`` object using JSON Schema + This function raises ``ValidationError`` if ``data`` is invalid. + """ + with detailed_errors(): + _validate(data, custom_formats=FORMAT_FUNCTIONS) + reduce(lambda acc, fn: fn(acc), EXTRA_VALIDATIONS, data) + return True diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb4f3cfd31a015b4bda82dfc6a1294a6e4b8d1c6 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/error_reporting.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/error_reporting.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae36186396285ffe214b2152a8a4873058f68a0c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/error_reporting.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/extra_validations.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/extra_validations.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7600e7605ae4cf9c6334d7d173da0a7ada81dd1f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/extra_validations.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_exceptions.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_exceptions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed0ef401ca7cd3212a21241f89b85a7296914d2e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/fastjsonschema_exceptions.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/formats.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/formats.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..143babe984244ac2256194809bd7c975f0484d21 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/__pycache__/formats.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/error_reporting.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/error_reporting.py new file mode 100644 index 0000000000000000000000000000000000000000..3591231c09f56494eb46119f9794053439b3fe8c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/error_reporting.py @@ -0,0 +1,336 @@ +import io +import json +import logging +import os +import re +import typing +from contextlib import contextmanager +from textwrap import indent, wrap +from typing import Any, Dict, Generator, Iterator, List, Optional, Sequence, Union + +from .fastjsonschema_exceptions import JsonSchemaValueException + +if typing.TYPE_CHECKING: + import sys + + if sys.version_info < (3, 11): + from typing_extensions import Self + else: + from typing import Self + +_logger = logging.getLogger(__name__) + +_MESSAGE_REPLACEMENTS = { + "must be named by propertyName definition": "keys must be named by", + "one of contains definition": "at least one item that matches", + " same as const definition:": "", + "only specified items": "only items matching the definition", +} + +_SKIP_DETAILS = ( + "must not be empty", + "is always invalid", + "must not be there", +) + +_NEED_DETAILS = {"anyOf", "oneOf", "allOf", "contains", "propertyNames", "not", "items"} + +_CAMEL_CASE_SPLITTER = re.compile(r"\W+|([A-Z][^A-Z\W]*)") +_IDENTIFIER = re.compile(r"^[\w_]+$", re.I) + +_TOML_JARGON = { + "object": "table", + "property": "key", + "properties": "keys", + "property names": "keys", +} + +_FORMATS_HELP = """ +For more details about `format` see +https://validate-pyproject.readthedocs.io/en/latest/api/validate_pyproject.formats.html +""" + + +class ValidationError(JsonSchemaValueException): + """Report violations of a given JSON schema. + + This class extends :exc:`~fastjsonschema.JsonSchemaValueException` + by adding the following properties: + + - ``summary``: an improved version of the ``JsonSchemaValueException`` error message + with only the necessary information) + + - ``details``: more contextual information about the error like the failing schema + itself and the value that violates the schema. + + Depending on the level of the verbosity of the ``logging`` configuration + the exception message will be only ``summary`` (default) or a combination of + ``summary`` and ``details`` (when the logging level is set to :obj:`logging.DEBUG`). + """ + + summary = "" + details = "" + _original_message = "" + + @classmethod + def _from_jsonschema(cls, ex: JsonSchemaValueException) -> "Self": + formatter = _ErrorFormatting(ex) + obj = cls(str(formatter), ex.value, formatter.name, ex.definition, ex.rule) + debug_code = os.getenv("JSONSCHEMA_DEBUG_CODE_GENERATION", "false").lower() + if debug_code != "false": # pragma: no cover + obj.__cause__, obj.__traceback__ = ex.__cause__, ex.__traceback__ + obj._original_message = ex.message + obj.summary = formatter.summary + obj.details = formatter.details + return obj + + +@contextmanager +def detailed_errors() -> Generator[None, None, None]: + try: + yield + except JsonSchemaValueException as ex: + raise ValidationError._from_jsonschema(ex) from None + + +class _ErrorFormatting: + def __init__(self, ex: JsonSchemaValueException): + self.ex = ex + self.name = f"`{self._simplify_name(ex.name)}`" + self._original_message: str = self.ex.message.replace(ex.name, self.name) + self._summary = "" + self._details = "" + + def __str__(self) -> str: + if _logger.getEffectiveLevel() <= logging.DEBUG and self.details: + return f"{self.summary}\n\n{self.details}" + + return self.summary + + @property + def summary(self) -> str: + if not self._summary: + self._summary = self._expand_summary() + + return self._summary + + @property + def details(self) -> str: + if not self._details: + self._details = self._expand_details() + + return self._details + + @staticmethod + def _simplify_name(name: str) -> str: + x = len("data.") + return name[x:] if name.startswith("data.") else name + + def _expand_summary(self) -> str: + msg = self._original_message + + for bad, repl in _MESSAGE_REPLACEMENTS.items(): + msg = msg.replace(bad, repl) + + if any(substring in msg for substring in _SKIP_DETAILS): + return msg + + schema = self.ex.rule_definition + if self.ex.rule in _NEED_DETAILS and schema: + summary = _SummaryWriter(_TOML_JARGON) + return f"{msg}:\n\n{indent(summary(schema), ' ')}" + + return msg + + def _expand_details(self) -> str: + optional = [] + definition = self.ex.definition or {} + desc_lines = definition.pop("$$description", []) + desc = definition.pop("description", None) or " ".join(desc_lines) + if desc: + description = "\n".join( + wrap( + desc, + width=80, + initial_indent=" ", + subsequent_indent=" ", + break_long_words=False, + ) + ) + optional.append(f"DESCRIPTION:\n{description}") + schema = json.dumps(definition, indent=4) + value = json.dumps(self.ex.value, indent=4) + defaults = [ + f"GIVEN VALUE:\n{indent(value, ' ')}", + f"OFFENDING RULE: {self.ex.rule!r}", + f"DEFINITION:\n{indent(schema, ' ')}", + ] + msg = "\n\n".join(optional + defaults) + epilog = f"\n{_FORMATS_HELP}" if "format" in msg.lower() else "" + return msg + epilog + + +class _SummaryWriter: + _IGNORE = frozenset(("description", "default", "title", "examples")) + + def __init__(self, jargon: Optional[Dict[str, str]] = None): + self.jargon: Dict[str, str] = jargon or {} + # Clarify confusing terms + self._terms = { + "anyOf": "at least one of the following", + "oneOf": "exactly one of the following", + "allOf": "all of the following", + "not": "(*NOT* the following)", + "prefixItems": f"{self._jargon('items')} (in order)", + "items": "items", + "contains": "contains at least one of", + "propertyNames": ( + f"non-predefined acceptable {self._jargon('property names')}" + ), + "patternProperties": f"{self._jargon('properties')} named via pattern", + "const": "predefined value", + "enum": "one of", + } + # Attributes that indicate that the definition is easy and can be done + # inline (e.g. string and number) + self._guess_inline_defs = [ + "enum", + "const", + "maxLength", + "minLength", + "pattern", + "format", + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + ] + + def _jargon(self, term: Union[str, List[str]]) -> Union[str, List[str]]: + if isinstance(term, list): + return [self.jargon.get(t, t) for t in term] + return self.jargon.get(term, term) + + def __call__( + self, + schema: Union[dict, List[dict]], + prefix: str = "", + *, + _path: Sequence[str] = (), + ) -> str: + if isinstance(schema, list): + return self._handle_list(schema, prefix, _path) + + filtered = self._filter_unecessary(schema, _path) + simple = self._handle_simple_dict(filtered, _path) + if simple: + return f"{prefix}{simple}" + + child_prefix = self._child_prefix(prefix, " ") + item_prefix = self._child_prefix(prefix, "- ") + indent = len(prefix) * " " + with io.StringIO() as buffer: + for i, (key, value) in enumerate(filtered.items()): + child_path = [*_path, key] + line_prefix = prefix if i == 0 else indent + buffer.write(f"{line_prefix}{self._label(child_path)}:") + # ^ just the first item should receive the complete prefix + if isinstance(value, dict): + filtered = self._filter_unecessary(value, child_path) + simple = self._handle_simple_dict(filtered, child_path) + buffer.write( + f" {simple}" + if simple + else f"\n{self(value, child_prefix, _path=child_path)}" + ) + elif isinstance(value, list) and ( + key != "type" or self._is_property(child_path) + ): + children = self._handle_list(value, item_prefix, child_path) + sep = " " if children.startswith("[") else "\n" + buffer.write(f"{sep}{children}") + else: + buffer.write(f" {self._value(value, child_path)}\n") + return buffer.getvalue() + + def _is_unecessary(self, path: Sequence[str]) -> bool: + if self._is_property(path) or not path: # empty path => instruction @ root + return False + key = path[-1] + return any(key.startswith(k) for k in "$_") or key in self._IGNORE + + def _filter_unecessary( + self, schema: Dict[str, Any], path: Sequence[str] + ) -> Dict[str, Any]: + return { + key: value + for key, value in schema.items() + if not self._is_unecessary([*path, key]) + } + + def _handle_simple_dict(self, value: dict, path: Sequence[str]) -> Optional[str]: + inline = any(p in value for p in self._guess_inline_defs) + simple = not any(isinstance(v, (list, dict)) for v in value.values()) + if inline or simple: + return f"{{{', '.join(self._inline_attrs(value, path))}}}\n" + return None + + def _handle_list( + self, schemas: list, prefix: str = "", path: Sequence[str] = () + ) -> str: + if self._is_unecessary(path): + return "" + + repr_ = repr(schemas) + if all(not isinstance(e, (dict, list)) for e in schemas) and len(repr_) < 60: + return f"{repr_}\n" + + item_prefix = self._child_prefix(prefix, "- ") + return "".join( + self(v, item_prefix, _path=[*path, f"[{i}]"]) for i, v in enumerate(schemas) + ) + + def _is_property(self, path: Sequence[str]) -> bool: + """Check if the given path can correspond to an arbitrarily named property""" + counter = 0 + for key in path[-2::-1]: + if key not in {"properties", "patternProperties"}: + break + counter += 1 + + # If the counter if even, the path correspond to a JSON Schema keyword + # otherwise it can be any arbitrary string naming a property + return counter % 2 == 1 + + def _label(self, path: Sequence[str]) -> str: + *parents, key = path + if not self._is_property(path): + norm_key = _separate_terms(key) + return self._terms.get(key) or " ".join(self._jargon(norm_key)) + + if parents[-1] == "patternProperties": + return f"(regex {key!r})" + return repr(key) # property name + + def _value(self, value: Any, path: Sequence[str]) -> str: + if path[-1] == "type" and not self._is_property(path): + type_ = self._jargon(value) + return f"[{', '.join(type_)}]" if isinstance(type_, list) else type_ + return repr(value) + + def _inline_attrs(self, schema: dict, path: Sequence[str]) -> Iterator[str]: + for key, value in schema.items(): + child_path = [*path, key] + yield f"{self._label(child_path)}: {self._value(value, child_path)}" + + def _child_prefix(self, parent_prefix: str, child_prefix: str) -> str: + return len(parent_prefix) * " " + child_prefix + + +def _separate_terms(word: str) -> List[str]: + """ + >>> _separate_terms("FooBar-foo") + ['foo', 'bar', 'foo'] + """ + return [w.lower() for w in _CAMEL_CASE_SPLITTER.split(word) if w] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/extra_validations.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/extra_validations.py new file mode 100644 index 0000000000000000000000000000000000000000..789411d0ff397041f87a834e634bac8488024326 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/extra_validations.py @@ -0,0 +1,82 @@ +"""The purpose of this module is implement PEP 621 validations that are +difficult to express as a JSON Schema (or that are not supported by the current +JSON Schema library). +""" + +from inspect import cleandoc +from typing import Mapping, TypeVar + +from .error_reporting import ValidationError + +T = TypeVar("T", bound=Mapping) + + +class RedefiningStaticFieldAsDynamic(ValidationError): + _DESC = """According to PEP 621: + + Build back-ends MUST raise an error if the metadata specifies a field + statically as well as being listed in dynamic. + """ + __doc__ = _DESC + _URL = ( + "https://packaging.python.org/en/latest/specifications/" + "pyproject-toml/#dynamic" + ) + + +class IncludedDependencyGroupMustExist(ValidationError): + _DESC = """An included dependency group must exist and must not be cyclic. + """ + __doc__ = _DESC + _URL = "https://peps.python.org/pep-0735/" + + +def validate_project_dynamic(pyproject: T) -> T: + project_table = pyproject.get("project", {}) + dynamic = project_table.get("dynamic", []) + + for field in dynamic: + if field in project_table: + raise RedefiningStaticFieldAsDynamic( + message=f"You cannot provide a value for `project.{field}` and " + "list it under `project.dynamic` at the same time", + value={ + field: project_table[field], + "...": " # ...", + "dynamic": dynamic, + }, + name=f"data.project.{field}", + definition={ + "description": cleandoc(RedefiningStaticFieldAsDynamic._DESC), + "see": RedefiningStaticFieldAsDynamic._URL, + }, + rule="PEP 621", + ) + + return pyproject + + +def validate_include_depenency(pyproject: T) -> T: + dependency_groups = pyproject.get("dependency-groups", {}) + for key, value in dependency_groups.items(): + for each in value: + if ( + isinstance(each, dict) + and (include_group := each.get("include-group")) + and include_group not in dependency_groups + ): + raise IncludedDependencyGroupMustExist( + message=f"The included dependency group {include_group} doesn't exist", + value=each, + name=f"data.dependency_groups.{key}", + definition={ + "description": cleandoc(IncludedDependencyGroupMustExist._DESC), + "see": IncludedDependencyGroupMustExist._URL, + }, + rule="PEP 735", + ) + # TODO: check for `include-group` cycles (can be conditional to graphlib) + return pyproject + + +EXTRA_VALIDATIONS = (validate_project_dynamic, validate_include_depenency) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..d2dddd6a106f021a4723c1e8f5953ccc09e55e1f --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_exceptions.py @@ -0,0 +1,51 @@ +import re + + +SPLIT_RE = re.compile(r'[\.\[\]]+') + + +class JsonSchemaException(ValueError): + """ + Base exception of ``fastjsonschema`` library. + """ + + +class JsonSchemaValueException(JsonSchemaException): + """ + Exception raised by validation function. Available properties: + + * ``message`` containing human-readable information what is wrong (e.g. ``data.property[index] must be smaller than or equal to 42``), + * invalid ``value`` (e.g. ``60``), + * ``name`` of a path in the data structure (e.g. ``data.property[index]``), + * ``path`` as an array in the data structure (e.g. ``['data', 'property', 'index']``), + * the whole ``definition`` which the ``value`` has to fulfil (e.g. ``{'type': 'number', 'maximum': 42}``), + * ``rule`` which the ``value`` is breaking (e.g. ``maximum``) + * and ``rule_definition`` (e.g. ``42``). + + .. versionchanged:: 2.14.0 + Added all extra properties. + """ + + def __init__(self, message, value=None, name=None, definition=None, rule=None): + super().__init__(message) + self.message = message + self.value = value + self.name = name + self.definition = definition + self.rule = rule + + @property + def path(self): + return [item for item in SPLIT_RE.split(self.name) if item != ''] + + @property + def rule_definition(self): + if not self.rule or not self.definition: + return None + return self.definition.get(self.rule) + + +class JsonSchemaDefinitionException(JsonSchemaException): + """ + Exception raised by generator of validation function. + """ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py new file mode 100644 index 0000000000000000000000000000000000000000..c69368a83ff1bdb89cf4853e00429f0125ca3dce --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py @@ -0,0 +1,1412 @@ +# noqa +# ruff: noqa +# flake8: noqa +# pylint: skip-file +# mypy: ignore-errors +# yapf: disable +# pylama:skip=1 + + +# *** PLEASE DO NOT MODIFY DIRECTLY: Automatically generated code *** + + +VERSION = "2.20.0" +from decimal import Decimal +import re +from .fastjsonschema_exceptions import JsonSchemaValueException + + +REGEX_PATTERNS = { + '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': re.compile('^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])\\Z'), + '^.*$': re.compile('^.*$'), + '.+': re.compile('.+'), + '^.+$': re.compile('^.+$'), + 'idn-email_re_pattern': re.compile('^[^@]+@[^@]+\\.[^@]+\\Z') +} + +NoneType = type(None) + +def validate(data, custom_formats={}, name_prefix=None): + validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies(data, custom_formats, (name_prefix or "data") + "") + return data + +def validate_https___packaging_python_org_en_latest_specifications_declaring_build_dependencies(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-build-dependencies/', 'title': 'Data structure for ``pyproject.toml`` files', '$$description': ['File format containing build-time configurations for the Python ecosystem. ', ':pep:`517` initially defined a build-system independent format for source trees', 'which was complemented by :pep:`518` to provide a way of specifying dependencies ', 'for building Python projects.', 'Please notice the ``project`` table (as initially defined in :pep:`621`) is not included', 'in this schema and should be considered separately.'], 'type': 'object', 'additionalProperties': False, 'properties': {'build-system': {'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, 'tool': {'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html', 'title': '``tool.distutils`` table', '$$description': ['**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``', 'subtables to configure arguments for ``distutils`` commands.', 'Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` commands via `distutils configuration files', '`_.', 'See also `the old Python docs _`.'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$ref': '#/definitions/ext-module'}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive-for-dependencies'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive-for-dependencies'}}}, 'readme': {'type': 'object', 'anyOf': [{'$ref': '#/definitions/file-directive'}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'$ref': '#/definitions/file-directive/properties/file'}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}, 'dependency-groups': {'type': 'object', 'description': 'Dependency groups following PEP 735', 'additionalProperties': False, 'patternProperties': {'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': {'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}}}}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data_keys = set(data.keys()) + if "build-system" in data_keys: + data_keys.remove("build-system") + data__buildsystem = data["build-system"] + if not isinstance(data__buildsystem, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must be object", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='type') + data__buildsystem_is_dict = isinstance(data__buildsystem, dict) + if data__buildsystem_is_dict: + data__buildsystem__missing_keys = set(['requires']) - data__buildsystem.keys() + if data__buildsystem__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must contain " + (str(sorted(data__buildsystem__missing_keys)) + " properties"), value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='required') + data__buildsystem_keys = set(data__buildsystem.keys()) + if "requires" in data__buildsystem_keys: + data__buildsystem_keys.remove("requires") + data__buildsystem__requires = data__buildsystem["requires"] + if not isinstance(data__buildsystem__requires, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.requires must be array", value=data__buildsystem__requires, name="" + (name_prefix or "data") + ".build-system.requires", definition={'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, rule='type') + data__buildsystem__requires_is_list = isinstance(data__buildsystem__requires, (list, tuple)) + if data__buildsystem__requires_is_list: + data__buildsystem__requires_len = len(data__buildsystem__requires) + for data__buildsystem__requires_x, data__buildsystem__requires_item in enumerate(data__buildsystem__requires): + if not isinstance(data__buildsystem__requires_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.requires[{data__buildsystem__requires_x}]".format(**locals()) + " must be string", value=data__buildsystem__requires_item, name="" + (name_prefix or "data") + ".build-system.requires[{data__buildsystem__requires_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "build-backend" in data__buildsystem_keys: + data__buildsystem_keys.remove("build-backend") + data__buildsystem__buildbackend = data__buildsystem["build-backend"] + if not isinstance(data__buildsystem__buildbackend, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.build-backend must be string", value=data__buildsystem__buildbackend, name="" + (name_prefix or "data") + ".build-system.build-backend", definition={'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, rule='type') + if isinstance(data__buildsystem__buildbackend, str): + if not custom_formats["pep517-backend-reference"](data__buildsystem__buildbackend): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.build-backend must be pep517-backend-reference", value=data__buildsystem__buildbackend, name="" + (name_prefix or "data") + ".build-system.build-backend", definition={'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, rule='format') + if "backend-path" in data__buildsystem_keys: + data__buildsystem_keys.remove("backend-path") + data__buildsystem__backendpath = data__buildsystem["backend-path"] + if not isinstance(data__buildsystem__backendpath, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.backend-path must be array", value=data__buildsystem__backendpath, name="" + (name_prefix or "data") + ".build-system.backend-path", definition={'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}, rule='type') + data__buildsystem__backendpath_is_list = isinstance(data__buildsystem__backendpath, (list, tuple)) + if data__buildsystem__backendpath_is_list: + data__buildsystem__backendpath_len = len(data__buildsystem__backendpath) + for data__buildsystem__backendpath_x, data__buildsystem__backendpath_item in enumerate(data__buildsystem__backendpath): + if not isinstance(data__buildsystem__backendpath_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system.backend-path[{data__buildsystem__backendpath_x}]".format(**locals()) + " must be string", value=data__buildsystem__backendpath_item, name="" + (name_prefix or "data") + ".build-system.backend-path[{data__buildsystem__backendpath_x}]".format(**locals()) + "", definition={'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}, rule='type') + if data__buildsystem_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".build-system must not contain "+str(data__buildsystem_keys)+" properties", value=data__buildsystem, name="" + (name_prefix or "data") + ".build-system", definition={'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, rule='additionalProperties') + if "project" in data_keys: + data_keys.remove("project") + data__project = data["project"] + validate_https___packaging_python_org_en_latest_specifications_pyproject_toml(data__project, custom_formats, (name_prefix or "data") + ".project") + if "tool" in data_keys: + data_keys.remove("tool") + data__tool = data["tool"] + if not isinstance(data__tool, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".tool must be object", value=data__tool, name="" + (name_prefix or "data") + ".tool", definition={'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html', 'title': '``tool.distutils`` table', '$$description': ['**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``', 'subtables to configure arguments for ``distutils`` commands.', 'Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` commands via `distutils configuration files', '`_.', 'See also `the old Python docs _`.'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$ref': '#/definitions/ext-module'}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive-for-dependencies'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive-for-dependencies'}}}, 'readme': {'type': 'object', 'anyOf': [{'$ref': '#/definitions/file-directive'}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'$ref': '#/definitions/file-directive/properties/file'}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}, rule='type') + data__tool_is_dict = isinstance(data__tool, dict) + if data__tool_is_dict: + data__tool_keys = set(data__tool.keys()) + if "distutils" in data__tool_keys: + data__tool_keys.remove("distutils") + data__tool__distutils = data__tool["distutils"] + validate_https___setuptools_pypa_io_en_latest_deprecated_distutils_configfile_html(data__tool__distutils, custom_formats, (name_prefix or "data") + ".tool.distutils") + if "setuptools" in data__tool_keys: + data__tool_keys.remove("setuptools") + data__tool__setuptools = data__tool["setuptools"] + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html(data__tool__setuptools, custom_formats, (name_prefix or "data") + ".tool.setuptools") + if "dependency-groups" in data_keys: + data_keys.remove("dependency-groups") + data__dependencygroups = data["dependency-groups"] + if not isinstance(data__dependencygroups, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups must be object", value=data__dependencygroups, name="" + (name_prefix or "data") + ".dependency-groups", definition={'type': 'object', 'description': 'Dependency groups following PEP 735', 'additionalProperties': False, 'patternProperties': {'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': {'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}}}, rule='type') + data__dependencygroups_is_dict = isinstance(data__dependencygroups, dict) + if data__dependencygroups_is_dict: + data__dependencygroups_keys = set(data__dependencygroups.keys()) + for data__dependencygroups_key, data__dependencygroups_val in data__dependencygroups.items(): + if REGEX_PATTERNS['^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'].search(data__dependencygroups_key): + if data__dependencygroups_key in data__dependencygroups_keys: + data__dependencygroups_keys.remove(data__dependencygroups_key) + if not isinstance(data__dependencygroups_val, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}".format(**locals()) + " must be array", value=data__dependencygroups_val, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}, rule='type') + data__dependencygroups_val_is_list = isinstance(data__dependencygroups_val, (list, tuple)) + if data__dependencygroups_val_is_list: + data__dependencygroups_val_len = len(data__dependencygroups_val) + for data__dependencygroups_val_x, data__dependencygroups_val_item in enumerate(data__dependencygroups_val): + data__dependencygroups_val_item_one_of_count1 = 0 + if data__dependencygroups_val_item_one_of_count1 < 2: + try: + if not isinstance(data__dependencygroups_val_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must be string", value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, rule='type') + if isinstance(data__dependencygroups_val_item, str): + if not custom_formats["pep508"](data__dependencygroups_val_item): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must be pep508", value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, rule='format') + data__dependencygroups_val_item_one_of_count1 += 1 + except JsonSchemaValueException: pass + if data__dependencygroups_val_item_one_of_count1 < 2: + try: + if not isinstance(data__dependencygroups_val_item, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must be object", value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}, rule='type') + data__dependencygroups_val_item_is_dict = isinstance(data__dependencygroups_val_item, dict) + if data__dependencygroups_val_item_is_dict: + data__dependencygroups_val_item_keys = set(data__dependencygroups_val_item.keys()) + if "include-group" in data__dependencygroups_val_item_keys: + data__dependencygroups_val_item_keys.remove("include-group") + data__dependencygroups_val_item__includegroup = data__dependencygroups_val_item["include-group"] + if not isinstance(data__dependencygroups_val_item__includegroup, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}].include-group".format(**locals()) + " must be string", value=data__dependencygroups_val_item__includegroup, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}].include-group".format(**locals()) + "", definition={'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}, rule='type') + if isinstance(data__dependencygroups_val_item__includegroup, str): + if not REGEX_PATTERNS['^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'].search(data__dependencygroups_val_item__includegroup): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}].include-group".format(**locals()) + " must match pattern ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$", value=data__dependencygroups_val_item__includegroup, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}].include-group".format(**locals()) + "", definition={'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}, rule='pattern') + if data__dependencygroups_val_item_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must not contain "+str(data__dependencygroups_val_item_keys)+" properties", value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}, rule='additionalProperties') + data__dependencygroups_val_item_one_of_count1 += 1 + except JsonSchemaValueException: pass + if data__dependencygroups_val_item_one_of_count1 != 1: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + " must be valid exactly by one definition" + (" (" + str(data__dependencygroups_val_item_one_of_count1) + " matches found)"), value=data__dependencygroups_val_item, name="" + (name_prefix or "data") + ".dependency-groups.{data__dependencygroups_key}[{data__dependencygroups_val_x}]".format(**locals()) + "", definition={'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}, rule='oneOf') + if data__dependencygroups_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependency-groups must not contain "+str(data__dependencygroups_keys)+" properties", value=data__dependencygroups, name="" + (name_prefix or "data") + ".dependency-groups", definition={'type': 'object', 'description': 'Dependency groups following PEP 735', 'additionalProperties': False, 'patternProperties': {'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': {'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}}}, rule='additionalProperties') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/declaring-build-dependencies/', 'title': 'Data structure for ``pyproject.toml`` files', '$$description': ['File format containing build-time configurations for the Python ecosystem. ', ':pep:`517` initially defined a build-system independent format for source trees', 'which was complemented by :pep:`518` to provide a way of specifying dependencies ', 'for building Python projects.', 'Please notice the ``project`` table (as initially defined in :pep:`621`) is not included', 'in this schema and should be considered separately.'], 'type': 'object', 'additionalProperties': False, 'properties': {'build-system': {'type': 'object', 'description': 'Table used to store build-related data', 'additionalProperties': False, 'properties': {'requires': {'type': 'array', '$$description': ['List of dependencies in the :pep:`508` format required to execute the build', 'system. Please notice that the resulting dependency graph', '**MUST NOT contain cycles**'], 'items': {'type': 'string'}}, 'build-backend': {'type': 'string', 'description': 'Python object that will be used to perform the build according to :pep:`517`', 'format': 'pep517-backend-reference'}, 'backend-path': {'type': 'array', '$$description': ['List of directories to be prepended to ``sys.path`` when loading the', 'back-end, and running its hooks'], 'items': {'type': 'string', '$comment': 'Should be a path (TODO: enforce it with format?)'}}}, 'required': ['requires']}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, 'tool': {'type': 'object', 'properties': {'distutils': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html', 'title': '``tool.distutils`` table', '$$description': ['**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``', 'subtables to configure arguments for ``distutils`` commands.', 'Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` commands via `distutils configuration files', '`_.', 'See also `the old Python docs _`.'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, 'setuptools': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$ref': '#/definitions/package-name'}}, {'$ref': '#/definitions/find-directive'}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$ref': '#/definitions/package-name'}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$ref': '#/definitions/ext-module'}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'$ref': '#/definitions/attr-directive'}, {'$ref': '#/definitions/file-directive'}]}, 'classifiers': {'$ref': '#/definitions/file-directive'}, 'description': {'$ref': '#/definitions/file-directive'}, 'entry-points': {'$ref': '#/definitions/file-directive'}, 'dependencies': {'$ref': '#/definitions/file-directive-for-dependencies'}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'$ref': '#/definitions/file-directive-for-dependencies'}}}, 'readme': {'type': 'object', 'anyOf': [{'$ref': '#/definitions/file-directive'}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'$ref': '#/definitions/file-directive/properties/file'}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}}}, 'dependency-groups': {'type': 'object', 'description': 'Dependency groups following PEP 735', 'additionalProperties': False, 'patternProperties': {'^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$': {'type': 'array', 'items': {'oneOf': [{'type': 'string', 'description': 'Python package specifiers following PEP 508', 'format': 'pep508'}, {'type': 'object', 'additionalProperties': False, 'properties': {'include-group': {'description': 'Another dependency group to include in this one', 'type': 'string', 'pattern': '^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9])$'}}}]}}}}}, 'project': {'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$ref': '#/definitions/author'}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create command-line wrappers for the given', '`entry points `_.']}, 'gui-scripts': {'$ref': '#/definitions/entry-point-group', '$$description': ['Instruct the installer to create GUI wrappers for the given', '`entry points `_.', 'The difference between ``scripts`` and ``gui-scripts`` is only relevant in', 'Windows.']}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$ref': '#/definitions/entry-point-group'}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$ref': '#/definitions/dependency'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$ref': '#/definitions/dependency'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='additionalProperties') + return data + +def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, 'readme': {'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data_keys = set(data.keys()) + if "platforms" in data_keys: + data_keys.remove("platforms") + data__platforms = data["platforms"] + if not isinstance(data__platforms, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".platforms must be array", value=data__platforms, name="" + (name_prefix or "data") + ".platforms", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__platforms_is_list = isinstance(data__platforms, (list, tuple)) + if data__platforms_is_list: + data__platforms_len = len(data__platforms) + for data__platforms_x, data__platforms_item in enumerate(data__platforms): + if not isinstance(data__platforms_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".platforms[{data__platforms_x}]".format(**locals()) + " must be string", value=data__platforms_item, name="" + (name_prefix or "data") + ".platforms[{data__platforms_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "provides" in data_keys: + data_keys.remove("provides") + data__provides = data["provides"] + if not isinstance(data__provides, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides must be array", value=data__provides, name="" + (name_prefix or "data") + ".provides", definition={'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, rule='type') + data__provides_is_list = isinstance(data__provides, (list, tuple)) + if data__provides_is_list: + data__provides_len = len(data__provides) + for data__provides_x, data__provides_item in enumerate(data__provides): + if not isinstance(data__provides_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + " must be string", value=data__provides_item, name="" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type') + if isinstance(data__provides_item, str): + if not custom_formats["pep508-identifier"](data__provides_item): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + " must be pep508-identifier", value=data__provides_item, name="" + (name_prefix or "data") + ".provides[{data__provides_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format') + if "obsoletes" in data_keys: + data_keys.remove("obsoletes") + data__obsoletes = data["obsoletes"] + if not isinstance(data__obsoletes, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes must be array", value=data__obsoletes, name="" + (name_prefix or "data") + ".obsoletes", definition={'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, rule='type') + data__obsoletes_is_list = isinstance(data__obsoletes, (list, tuple)) + if data__obsoletes_is_list: + data__obsoletes_len = len(data__obsoletes) + for data__obsoletes_x, data__obsoletes_item in enumerate(data__obsoletes): + if not isinstance(data__obsoletes_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + " must be string", value=data__obsoletes_item, name="" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type') + if isinstance(data__obsoletes_item, str): + if not custom_formats["pep508-identifier"](data__obsoletes_item): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + " must be pep508-identifier", value=data__obsoletes_item, name="" + (name_prefix or "data") + ".obsoletes[{data__obsoletes_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format') + if "zip-safe" in data_keys: + data_keys.remove("zip-safe") + data__zipsafe = data["zip-safe"] + if not isinstance(data__zipsafe, (bool)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".zip-safe must be boolean", value=data__zipsafe, name="" + (name_prefix or "data") + ".zip-safe", definition={'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, rule='type') + if "script-files" in data_keys: + data_keys.remove("script-files") + data__scriptfiles = data["script-files"] + if not isinstance(data__scriptfiles, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".script-files must be array", value=data__scriptfiles, name="" + (name_prefix or "data") + ".script-files", definition={'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, rule='type') + data__scriptfiles_is_list = isinstance(data__scriptfiles, (list, tuple)) + if data__scriptfiles_is_list: + data__scriptfiles_len = len(data__scriptfiles) + for data__scriptfiles_x, data__scriptfiles_item in enumerate(data__scriptfiles): + if not isinstance(data__scriptfiles_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".script-files[{data__scriptfiles_x}]".format(**locals()) + " must be string", value=data__scriptfiles_item, name="" + (name_prefix or "data") + ".script-files[{data__scriptfiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "eager-resources" in data_keys: + data_keys.remove("eager-resources") + data__eagerresources = data["eager-resources"] + if not isinstance(data__eagerresources, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".eager-resources must be array", value=data__eagerresources, name="" + (name_prefix or "data") + ".eager-resources", definition={'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__eagerresources_is_list = isinstance(data__eagerresources, (list, tuple)) + if data__eagerresources_is_list: + data__eagerresources_len = len(data__eagerresources) + for data__eagerresources_x, data__eagerresources_item in enumerate(data__eagerresources): + if not isinstance(data__eagerresources_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".eager-resources[{data__eagerresources_x}]".format(**locals()) + " must be string", value=data__eagerresources_item, name="" + (name_prefix or "data") + ".eager-resources[{data__eagerresources_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "packages" in data_keys: + data_keys.remove("packages") + data__packages = data["packages"] + data__packages_one_of_count2 = 0 + if data__packages_one_of_count2 < 2: + try: + if not isinstance(data__packages, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages must be array", value=data__packages, name="" + (name_prefix or "data") + ".packages", definition={'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}}, rule='type') + data__packages_is_list = isinstance(data__packages, (list, tuple)) + if data__packages_is_list: + data__packages_len = len(data__packages) + for data__packages_x, data__packages_item in enumerate(data__packages): + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_package_name(data__packages_item, custom_formats, (name_prefix or "data") + ".packages[{data__packages_x}]".format(**locals())) + data__packages_one_of_count2 += 1 + except JsonSchemaValueException: pass + if data__packages_one_of_count2 < 2: + try: + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_find_directive(data__packages, custom_formats, (name_prefix or "data") + ".packages") + data__packages_one_of_count2 += 1 + except JsonSchemaValueException: pass + if data__packages_one_of_count2 != 1: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".packages must be valid exactly by one definition" + (" (" + str(data__packages_one_of_count2) + " matches found)"), value=data__packages, name="" + (name_prefix or "data") + ".packages", definition={'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, rule='oneOf') + if "package-dir" in data_keys: + data_keys.remove("package-dir") + data__packagedir = data["package-dir"] + if not isinstance(data__packagedir, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be object", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='type') + data__packagedir_is_dict = isinstance(data__packagedir, dict) + if data__packagedir_is_dict: + data__packagedir_keys = set(data__packagedir.keys()) + for data__packagedir_key, data__packagedir_val in data__packagedir.items(): + if REGEX_PATTERNS['^.*$'].search(data__packagedir_key): + if data__packagedir_key in data__packagedir_keys: + data__packagedir_keys.remove(data__packagedir_key) + if not isinstance(data__packagedir_val, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir.{data__packagedir_key}".format(**locals()) + " must be string", value=data__packagedir_val, name="" + (name_prefix or "data") + ".package-dir.{data__packagedir_key}".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if data__packagedir_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must not contain "+str(data__packagedir_keys)+" properties", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='additionalProperties') + data__packagedir_len = len(data__packagedir) + if data__packagedir_len != 0: + data__packagedir_property_names = True + for data__packagedir_key in data__packagedir: + try: + data__packagedir_key_any_of_count3 = 0 + if not data__packagedir_key_any_of_count3: + try: + if data__packagedir_key != "": + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be same as const definition: ", value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'const': ''}, rule='const') + data__packagedir_key_any_of_count3 += 1 + except JsonSchemaValueException: pass + if not data__packagedir_key_any_of_count3: + try: + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_package_name(data__packagedir_key, custom_formats, (name_prefix or "data") + ".package-dir") + data__packagedir_key_any_of_count3 += 1 + except JsonSchemaValueException: pass + if not data__packagedir_key_any_of_count3: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir cannot be validated by any definition", value=data__packagedir_key, name="" + (name_prefix or "data") + ".package-dir", definition={'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, rule='anyOf') + except JsonSchemaValueException: + data__packagedir_property_names = False + if not data__packagedir_property_names: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-dir must be named by propertyName definition", value=data__packagedir, name="" + (name_prefix or "data") + ".package-dir", definition={'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, rule='propertyNames') + if "package-data" in data_keys: + data_keys.remove("package-data") + data__packagedata = data["package-data"] + if not isinstance(data__packagedata, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be object", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type') + data__packagedata_is_dict = isinstance(data__packagedata, dict) + if data__packagedata_is_dict: + data__packagedata_keys = set(data__packagedata.keys()) + for data__packagedata_key, data__packagedata_val in data__packagedata.items(): + if REGEX_PATTERNS['^.*$'].search(data__packagedata_key): + if data__packagedata_key in data__packagedata_keys: + data__packagedata_keys.remove(data__packagedata_key) + if not isinstance(data__packagedata_val, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data.{data__packagedata_key}".format(**locals()) + " must be array", value=data__packagedata_val, name="" + (name_prefix or "data") + ".package-data.{data__packagedata_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__packagedata_val_is_list = isinstance(data__packagedata_val, (list, tuple)) + if data__packagedata_val_is_list: + data__packagedata_val_len = len(data__packagedata_val) + for data__packagedata_val_x, data__packagedata_val_item in enumerate(data__packagedata_val): + if not isinstance(data__packagedata_val_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data.{data__packagedata_key}[{data__packagedata_val_x}]".format(**locals()) + " must be string", value=data__packagedata_val_item, name="" + (name_prefix or "data") + ".package-data.{data__packagedata_key}[{data__packagedata_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if data__packagedata_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must not contain "+str(data__packagedata_keys)+" properties", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='additionalProperties') + data__packagedata_len = len(data__packagedata) + if data__packagedata_len != 0: + data__packagedata_property_names = True + for data__packagedata_key in data__packagedata: + try: + data__packagedata_key_any_of_count4 = 0 + if not data__packagedata_key_any_of_count4: + try: + if not isinstance(data__packagedata_key, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be string", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'type': 'string', 'format': 'python-module-name'}, rule='type') + if isinstance(data__packagedata_key, str): + if not custom_formats["python-module-name"](data__packagedata_key): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be python-module-name", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'type': 'string', 'format': 'python-module-name'}, rule='format') + data__packagedata_key_any_of_count4 += 1 + except JsonSchemaValueException: pass + if not data__packagedata_key_any_of_count4: + try: + if data__packagedata_key != "*": + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be same as const definition: *", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'const': '*'}, rule='const') + data__packagedata_key_any_of_count4 += 1 + except JsonSchemaValueException: pass + if not data__packagedata_key_any_of_count4: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data cannot be validated by any definition", value=data__packagedata_key, name="" + (name_prefix or "data") + ".package-data", definition={'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, rule='anyOf') + except JsonSchemaValueException: + data__packagedata_property_names = False + if not data__packagedata_property_names: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".package-data must be named by propertyName definition", value=data__packagedata, name="" + (name_prefix or "data") + ".package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='propertyNames') + if "include-package-data" in data_keys: + data_keys.remove("include-package-data") + data__includepackagedata = data["include-package-data"] + if not isinstance(data__includepackagedata, (bool)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".include-package-data must be boolean", value=data__includepackagedata, name="" + (name_prefix or "data") + ".include-package-data", definition={'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, rule='type') + if "exclude-package-data" in data_keys: + data_keys.remove("exclude-package-data") + data__excludepackagedata = data["exclude-package-data"] + if not isinstance(data__excludepackagedata, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be object", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type') + data__excludepackagedata_is_dict = isinstance(data__excludepackagedata, dict) + if data__excludepackagedata_is_dict: + data__excludepackagedata_keys = set(data__excludepackagedata.keys()) + for data__excludepackagedata_key, data__excludepackagedata_val in data__excludepackagedata.items(): + if REGEX_PATTERNS['^.*$'].search(data__excludepackagedata_key): + if data__excludepackagedata_key in data__excludepackagedata_keys: + data__excludepackagedata_keys.remove(data__excludepackagedata_key) + if not isinstance(data__excludepackagedata_val, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}".format(**locals()) + " must be array", value=data__excludepackagedata_val, name="" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__excludepackagedata_val_is_list = isinstance(data__excludepackagedata_val, (list, tuple)) + if data__excludepackagedata_val_is_list: + data__excludepackagedata_val_len = len(data__excludepackagedata_val) + for data__excludepackagedata_val_x, data__excludepackagedata_val_item in enumerate(data__excludepackagedata_val): + if not isinstance(data__excludepackagedata_val_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]".format(**locals()) + " must be string", value=data__excludepackagedata_val_item, name="" + (name_prefix or "data") + ".exclude-package-data.{data__excludepackagedata_key}[{data__excludepackagedata_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if data__excludepackagedata_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must not contain "+str(data__excludepackagedata_keys)+" properties", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='additionalProperties') + data__excludepackagedata_len = len(data__excludepackagedata) + if data__excludepackagedata_len != 0: + data__excludepackagedata_property_names = True + for data__excludepackagedata_key in data__excludepackagedata: + try: + data__excludepackagedata_key_any_of_count5 = 0 + if not data__excludepackagedata_key_any_of_count5: + try: + if not isinstance(data__excludepackagedata_key, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be string", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'type': 'string', 'format': 'python-module-name'}, rule='type') + if isinstance(data__excludepackagedata_key, str): + if not custom_formats["python-module-name"](data__excludepackagedata_key): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be python-module-name", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'type': 'string', 'format': 'python-module-name'}, rule='format') + data__excludepackagedata_key_any_of_count5 += 1 + except JsonSchemaValueException: pass + if not data__excludepackagedata_key_any_of_count5: + try: + if data__excludepackagedata_key != "*": + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be same as const definition: *", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'const': '*'}, rule='const') + data__excludepackagedata_key_any_of_count5 += 1 + except JsonSchemaValueException: pass + if not data__excludepackagedata_key_any_of_count5: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data cannot be validated by any definition", value=data__excludepackagedata_key, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, rule='anyOf') + except JsonSchemaValueException: + data__excludepackagedata_property_names = False + if not data__excludepackagedata_property_names: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".exclude-package-data must be named by propertyName definition", value=data__excludepackagedata, name="" + (name_prefix or "data") + ".exclude-package-data", definition={'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='propertyNames') + if "namespace-packages" in data_keys: + data_keys.remove("namespace-packages") + data__namespacepackages = data["namespace-packages"] + if not isinstance(data__namespacepackages, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages must be array", value=data__namespacepackages, name="" + (name_prefix or "data") + ".namespace-packages", definition={'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, rule='type') + data__namespacepackages_is_list = isinstance(data__namespacepackages, (list, tuple)) + if data__namespacepackages_is_list: + data__namespacepackages_len = len(data__namespacepackages) + for data__namespacepackages_x, data__namespacepackages_item in enumerate(data__namespacepackages): + if not isinstance(data__namespacepackages_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + " must be string", value=data__namespacepackages_item, name="" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='type') + if isinstance(data__namespacepackages_item, str): + if not custom_formats["python-module-name-relaxed"](data__namespacepackages_item): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + " must be python-module-name-relaxed", value=data__namespacepackages_item, name="" + (name_prefix or "data") + ".namespace-packages[{data__namespacepackages_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='format') + if "py-modules" in data_keys: + data_keys.remove("py-modules") + data__pymodules = data["py-modules"] + if not isinstance(data__pymodules, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules must be array", value=data__pymodules, name="" + (name_prefix or "data") + ".py-modules", definition={'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, rule='type') + data__pymodules_is_list = isinstance(data__pymodules, (list, tuple)) + if data__pymodules_is_list: + data__pymodules_len = len(data__pymodules) + for data__pymodules_x, data__pymodules_item in enumerate(data__pymodules): + if not isinstance(data__pymodules_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + " must be string", value=data__pymodules_item, name="" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='type') + if isinstance(data__pymodules_item, str): + if not custom_formats["python-module-name-relaxed"](data__pymodules_item): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + " must be python-module-name-relaxed", value=data__pymodules_item, name="" + (name_prefix or "data") + ".py-modules[{data__pymodules_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='format') + if "ext-modules" in data_keys: + data_keys.remove("ext-modules") + data__extmodules = data["ext-modules"] + if not isinstance(data__extmodules, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".ext-modules must be array", value=data__extmodules, name="" + (name_prefix or "data") + ".ext-modules", definition={'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}}, rule='type') + data__extmodules_is_list = isinstance(data__extmodules, (list, tuple)) + if data__extmodules_is_list: + data__extmodules_len = len(data__extmodules) + for data__extmodules_x, data__extmodules_item in enumerate(data__extmodules): + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_ext_module(data__extmodules_item, custom_formats, (name_prefix or "data") + ".ext-modules[{data__extmodules_x}]".format(**locals())) + if "data-files" in data_keys: + data_keys.remove("data-files") + data__datafiles = data["data-files"] + if not isinstance(data__datafiles, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files must be object", value=data__datafiles, name="" + (name_prefix or "data") + ".data-files", definition={'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, rule='type') + data__datafiles_is_dict = isinstance(data__datafiles, dict) + if data__datafiles_is_dict: + data__datafiles_keys = set(data__datafiles.keys()) + for data__datafiles_key, data__datafiles_val in data__datafiles.items(): + if REGEX_PATTERNS['^.*$'].search(data__datafiles_key): + if data__datafiles_key in data__datafiles_keys: + data__datafiles_keys.remove(data__datafiles_key) + if not isinstance(data__datafiles_val, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files.{data__datafiles_key}".format(**locals()) + " must be array", value=data__datafiles_val, name="" + (name_prefix or "data") + ".data-files.{data__datafiles_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__datafiles_val_is_list = isinstance(data__datafiles_val, (list, tuple)) + if data__datafiles_val_is_list: + data__datafiles_val_len = len(data__datafiles_val) + for data__datafiles_val_x, data__datafiles_val_item in enumerate(data__datafiles_val): + if not isinstance(data__datafiles_val_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".data-files.{data__datafiles_key}[{data__datafiles_val_x}]".format(**locals()) + " must be string", value=data__datafiles_val_item, name="" + (name_prefix or "data") + ".data-files.{data__datafiles_key}[{data__datafiles_val_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "cmdclass" in data_keys: + data_keys.remove("cmdclass") + data__cmdclass = data["cmdclass"] + if not isinstance(data__cmdclass, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass must be object", value=data__cmdclass, name="" + (name_prefix or "data") + ".cmdclass", definition={'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, rule='type') + data__cmdclass_is_dict = isinstance(data__cmdclass, dict) + if data__cmdclass_is_dict: + data__cmdclass_keys = set(data__cmdclass.keys()) + for data__cmdclass_key, data__cmdclass_val in data__cmdclass.items(): + if REGEX_PATTERNS['^.*$'].search(data__cmdclass_key): + if data__cmdclass_key in data__cmdclass_keys: + data__cmdclass_keys.remove(data__cmdclass_key) + if not isinstance(data__cmdclass_val, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + " must be string", value=data__cmdclass_val, name="" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='type') + if isinstance(data__cmdclass_val, str): + if not custom_formats["python-qualified-identifier"](data__cmdclass_val): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + " must be python-qualified-identifier", value=data__cmdclass_val, name="" + (name_prefix or "data") + ".cmdclass.{data__cmdclass_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='format') + if "license-files" in data_keys: + data_keys.remove("license-files") + data__licensefiles = data["license-files"] + if not isinstance(data__licensefiles, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files must be array", value=data__licensefiles, name="" + (name_prefix or "data") + ".license-files", definition={'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, rule='type') + data__licensefiles_is_list = isinstance(data__licensefiles, (list, tuple)) + if data__licensefiles_is_list: + data__licensefiles_len = len(data__licensefiles) + for data__licensefiles_x, data__licensefiles_item in enumerate(data__licensefiles): + if not isinstance(data__licensefiles_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + " must be string", value=data__licensefiles_item, name="" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "dynamic" in data_keys: + data_keys.remove("dynamic") + data__dynamic = data["dynamic"] + if not isinstance(data__dynamic, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be object", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, 'readme': {'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}}}, rule='type') + data__dynamic_is_dict = isinstance(data__dynamic, dict) + if data__dynamic_is_dict: + data__dynamic_keys = set(data__dynamic.keys()) + if "version" in data__dynamic_keys: + data__dynamic_keys.remove("version") + data__dynamic__version = data__dynamic["version"] + data__dynamic__version_one_of_count6 = 0 + if data__dynamic__version_one_of_count6 < 2: + try: + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_attr_directive(data__dynamic__version, custom_formats, (name_prefix or "data") + ".dynamic.version") + data__dynamic__version_one_of_count6 += 1 + except JsonSchemaValueException: pass + if data__dynamic__version_one_of_count6 < 2: + try: + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__version, custom_formats, (name_prefix or "data") + ".dynamic.version") + data__dynamic__version_one_of_count6 += 1 + except JsonSchemaValueException: pass + if data__dynamic__version_one_of_count6 != 1: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.version must be valid exactly by one definition" + (" (" + str(data__dynamic__version_one_of_count6) + " matches found)"), value=data__dynamic__version, name="" + (name_prefix or "data") + ".dynamic.version", definition={'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, rule='oneOf') + if "classifiers" in data__dynamic_keys: + data__dynamic_keys.remove("classifiers") + data__dynamic__classifiers = data__dynamic["classifiers"] + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__classifiers, custom_formats, (name_prefix or "data") + ".dynamic.classifiers") + if "description" in data__dynamic_keys: + data__dynamic_keys.remove("description") + data__dynamic__description = data__dynamic["description"] + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__description, custom_formats, (name_prefix or "data") + ".dynamic.description") + if "entry-points" in data__dynamic_keys: + data__dynamic_keys.remove("entry-points") + data__dynamic__entrypoints = data__dynamic["entry-points"] + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__entrypoints, custom_formats, (name_prefix or "data") + ".dynamic.entry-points") + if "dependencies" in data__dynamic_keys: + data__dynamic_keys.remove("dependencies") + data__dynamic__dependencies = data__dynamic["dependencies"] + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_for_dependencies(data__dynamic__dependencies, custom_formats, (name_prefix or "data") + ".dynamic.dependencies") + if "optional-dependencies" in data__dynamic_keys: + data__dynamic_keys.remove("optional-dependencies") + data__dynamic__optionaldependencies = data__dynamic["optional-dependencies"] + if not isinstance(data__dynamic__optionaldependencies, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be object", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, rule='type') + data__dynamic__optionaldependencies_is_dict = isinstance(data__dynamic__optionaldependencies, dict) + if data__dynamic__optionaldependencies_is_dict: + data__dynamic__optionaldependencies_keys = set(data__dynamic__optionaldependencies.keys()) + for data__dynamic__optionaldependencies_key, data__dynamic__optionaldependencies_val in data__dynamic__optionaldependencies.items(): + if REGEX_PATTERNS['.+'].search(data__dynamic__optionaldependencies_key): + if data__dynamic__optionaldependencies_key in data__dynamic__optionaldependencies_keys: + data__dynamic__optionaldependencies_keys.remove(data__dynamic__optionaldependencies_key) + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_for_dependencies(data__dynamic__optionaldependencies_val, custom_formats, (name_prefix or "data") + ".dynamic.optional-dependencies.{data__dynamic__optionaldependencies_key}".format(**locals())) + if data__dynamic__optionaldependencies_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must not contain "+str(data__dynamic__optionaldependencies_keys)+" properties", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, rule='additionalProperties') + data__dynamic__optionaldependencies_len = len(data__dynamic__optionaldependencies) + if data__dynamic__optionaldependencies_len != 0: + data__dynamic__optionaldependencies_property_names = True + for data__dynamic__optionaldependencies_key in data__dynamic__optionaldependencies: + try: + if not isinstance(data__dynamic__optionaldependencies_key, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be string", value=data__dynamic__optionaldependencies_key, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='type') + if isinstance(data__dynamic__optionaldependencies_key, str): + if not custom_formats["pep508-identifier"](data__dynamic__optionaldependencies_key): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be pep508-identifier", value=data__dynamic__optionaldependencies_key, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'string', 'format': 'pep508-identifier'}, rule='format') + except JsonSchemaValueException: + data__dynamic__optionaldependencies_property_names = False + if not data__dynamic__optionaldependencies_property_names: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.optional-dependencies must be named by propertyName definition", value=data__dynamic__optionaldependencies, name="" + (name_prefix or "data") + ".dynamic.optional-dependencies", definition={'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, rule='propertyNames') + if "readme" in data__dynamic_keys: + data__dynamic_keys.remove("readme") + data__dynamic__readme = data__dynamic["readme"] + if not isinstance(data__dynamic__readme, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must be object", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}, rule='type') + data__dynamic__readme_any_of_count7 = 0 + if not data__dynamic__readme_any_of_count7: + try: + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data__dynamic__readme, custom_formats, (name_prefix or "data") + ".dynamic.readme") + data__dynamic__readme_any_of_count7 += 1 + except JsonSchemaValueException: pass + if not data__dynamic__readme_any_of_count7: + try: + if not isinstance(data__dynamic__readme, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must be object", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}, rule='type') + data__dynamic__readme_is_dict = isinstance(data__dynamic__readme, dict) + if data__dynamic__readme_is_dict: + data__dynamic__readme_keys = set(data__dynamic__readme.keys()) + if "content-type" in data__dynamic__readme_keys: + data__dynamic__readme_keys.remove("content-type") + data__dynamic__readme__contenttype = data__dynamic__readme["content-type"] + if not isinstance(data__dynamic__readme__contenttype, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme.content-type must be string", value=data__dynamic__readme__contenttype, name="" + (name_prefix or "data") + ".dynamic.readme.content-type", definition={'type': 'string'}, rule='type') + if "file" in data__dynamic__readme_keys: + data__dynamic__readme_keys.remove("file") + data__dynamic__readme__file = data__dynamic__readme["file"] + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_properties_file(data__dynamic__readme__file, custom_formats, (name_prefix or "data") + ".dynamic.readme.file") + if data__dynamic__readme_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must not contain "+str(data__dynamic__readme_keys)+" properties", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}, rule='additionalProperties') + data__dynamic__readme_any_of_count7 += 1 + except JsonSchemaValueException: pass + if not data__dynamic__readme_any_of_count7: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme cannot be validated by any definition", value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}, rule='anyOf') + data__dynamic__readme_is_dict = isinstance(data__dynamic__readme, dict) + if data__dynamic__readme_is_dict: + data__dynamic__readme__missing_keys = set(['file']) - data__dynamic__readme.keys() + if data__dynamic__readme__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic.readme must contain " + (str(sorted(data__dynamic__readme__missing_keys)) + " properties"), value=data__dynamic__readme, name="" + (name_prefix or "data") + ".dynamic.readme", definition={'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}, rule='required') + if data__dynamic_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must not contain "+str(data__dynamic_keys)+" properties", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, 'readme': {'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}}}, rule='additionalProperties') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html', 'title': '``tool.setuptools`` table', '$$description': ['``setuptools``-specific configurations that can be set by users that require', 'customization.', 'These configurations are completely optional and probably can be skipped when', 'creating simple packages. They are equivalent to some of the `Keywords', '`_', 'used by the ``setup.py`` file, and can be set via the ``tool.setuptools`` table.', 'It considers only ``setuptools`` `parameters', '`_', 'that are not covered by :pep:`621`; and intentionally excludes ``dependency_links``', 'and ``setup_requires`` (incompatible with modern workflows/standards).'], 'type': 'object', 'additionalProperties': False, 'properties': {'platforms': {'type': 'array', 'items': {'type': 'string'}}, 'provides': {'$$description': ['Package and virtual package names contained within this package', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'obsoletes': {'$$description': ['Packages which this package renders obsolete', '**(not supported by pip)**'], 'type': 'array', 'items': {'type': 'string', 'format': 'pep508-identifier'}}, 'zip-safe': {'$$description': ['Whether the project can be safely installed and run from a zip file.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'boolean'}, 'script-files': {'$$description': ['Legacy way of defining scripts (entry-points are preferred).', 'Equivalent to the ``script`` keyword in ``setup.py``', '(it was renamed to avoid confusion with entry-point based ``project.scripts``', 'defined in :pep:`621`).', '**DISCOURAGED**: generic script wrappers are tricky and may not work properly.', 'Whenever possible, please use ``project.scripts`` instead.'], 'type': 'array', 'items': {'type': 'string'}, '$comment': 'TODO: is this field deprecated/should be removed?'}, 'eager-resources': {'$$description': ['Resources that should be extracted together, if any of them is needed,', 'or if any C extensions included in the project are imported.', '**OBSOLETE**: only relevant for ``pkg_resources``, ``easy_install`` and', '``setup.py install`` in the context of ``eggs`` (**DEPRECATED**).'], 'type': 'array', 'items': {'type': 'string'}}, 'packages': {'$$description': ['Packages that should be included in the distribution.', 'It can be given either as a list of package identifiers', 'or as a ``dict``-like structure with a single key ``find``', 'which corresponds to a dynamic call to', '``setuptools.config.expand.find_packages`` function.', 'The ``find`` key is associated with a nested ``dict``-like structure that can', 'contain ``where``, ``include``, ``exclude`` and ``namespaces`` keys,', 'mimicking the keyword arguments of the associated function.'], 'oneOf': [{'title': 'Array of Python package identifiers', 'type': 'array', 'items': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}}, {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}]}, 'package-dir': {'$$description': [':class:`dict`-like structure mapping from package names to directories where their', 'code can be found.', 'The empty string (as key) means that all packages are contained inside', 'the given directory will be included in the distribution.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'const': ''}, {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}]}, 'patternProperties': {'^.*$': {'type': 'string'}}}, 'package-data': {'$$description': ['Mapping from package names to lists of glob patterns.', 'Usually this option is not needed when using ``include-package-data = true``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'include-package-data': {'$$description': ['Automatically include any data files inside the package directories', 'that are specified by ``MANIFEST.in``', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'boolean'}, 'exclude-package-data': {'$$description': ['Mapping from package names to lists of glob patterns that should be excluded', 'For more information on how to include data files, check ``setuptools`` `docs', '`_.'], 'type': 'object', 'additionalProperties': False, 'propertyNames': {'anyOf': [{'type': 'string', 'format': 'python-module-name'}, {'const': '*'}]}, 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'namespace-packages': {'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'https://setuptools.pypa.io/en/latest/userguide/package_discovery.html', 'description': '**DEPRECATED**: use implicit namespaces instead (:pep:`420`).'}, 'py-modules': {'description': 'Modules that setuptools will manipulate', 'type': 'array', 'items': {'type': 'string', 'format': 'python-module-name-relaxed'}, '$comment': 'TODO: clarify the relationship with ``packages``'}, 'ext-modules': {'description': 'Extension modules to be compiled by setuptools', 'type': 'array', 'items': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}}, 'data-files': {'$$description': ['``dict``-like structure where each key represents a directory and', 'the value is a list of glob patterns that should be installed in them.', '**DISCOURAGED**: please notice this might not work as expected with wheels.', 'Whenever possible, consider using data files inside the package directories', '(or create a new namespace package that only contains data files).', 'See `data files support', '`_.'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'array', 'items': {'type': 'string'}}}}, 'cmdclass': {'$$description': ['Mapping of distutils-style command names to ``setuptools.Command`` subclasses', 'which in turn should be represented by strings with a qualified class name', '(i.e., "dotted" form with module), e.g.::\n\n', ' cmdclass = {mycmd = "pkg.subpkg.module.CommandClass"}\n\n', 'The command class should be a directly defined at the top-level of the', 'containing module (no class nesting).'], 'type': 'object', 'patternProperties': {'^.*$': {'type': 'string', 'format': 'python-qualified-identifier'}}}, 'license-files': {'type': 'array', 'items': {'type': 'string'}, '$$description': ['**PROVISIONAL**: list of glob patterns for all license files being distributed.', '(likely to become standard with :pep:`639`).', "By default: ``['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']``"], '$comment': 'TODO: revise if PEP 639 is accepted. Probably ``project.license-files``?'}, 'dynamic': {'type': 'object', 'description': 'Instructions for loading :pep:`621`-related metadata dynamically', 'additionalProperties': False, 'properties': {'version': {'$$description': ['A version dynamically loaded via either the ``attr:`` or ``file:``', 'directives. Please make sure the given file or attribute respects :pep:`440`.', 'Also ensure to set ``project.dynamic`` accordingly.'], 'oneOf': [{'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'classifiers': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'description': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'entry-points': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}, 'optional-dependencies': {'type': 'object', 'propertyNames': {'type': 'string', 'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'.+': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$ref': '#/definitions/file-directive'}]}}}, 'readme': {'type': 'object', 'anyOf': [{'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, {'type': 'object', 'properties': {'content-type': {'type': 'string'}, 'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'additionalProperties': False}], 'required': ['file']}}}}, 'definitions': {'package-name': {'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, 'ext-module': {'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, 'file-directive': {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, 'file-directive-for-dependencies': {'title': "'file:' directive for dependencies", 'allOf': [{'$$description': ['**BETA**: subset of the ``requirements.txt`` format', 'without ``pip`` flags and options', '(one :pep:`508`-compliant string per line,', 'lines that are blank or start with ``#`` are excluded).', 'See `dynamic metadata', '`_.']}, {'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}]}, 'attr-directive': {'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, 'find-directive': {'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}}}, rule='additionalProperties') + return data + +def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_properties_file(data, custom_formats={}, name_prefix=None): + data_one_of_count8 = 0 + if data_one_of_count8 < 2: + try: + if not isinstance(data, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string'}, rule='type') + data_one_of_count8 += 1 + except JsonSchemaValueException: pass + if data_one_of_count8 < 2: + try: + if not isinstance(data, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be array", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data_is_list = isinstance(data, (list, tuple)) + if data_is_list: + data_len = len(data) + for data_x, data_item in enumerate(data): + if not isinstance(data_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + "[{data_x}]".format(**locals()) + " must be string", value=data_item, name="" + (name_prefix or "data") + "[{data_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + data_one_of_count8 += 1 + except JsonSchemaValueException: pass + if data_one_of_count8 != 1: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be valid exactly by one definition" + (" (" + str(data_one_of_count8) + " matches found)"), value=data, name="" + (name_prefix or "data") + "", definition={'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, rule='oneOf') + return data + +def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive_for_dependencies(data, custom_formats={}, name_prefix=None): + validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data, custom_formats, (name_prefix or "data") + "") + return data + +def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_file_directive(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data__missing_keys = set(['file']) - data.keys() + if data__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='required') + data_keys = set(data.keys()) + if "file" in data_keys: + data_keys.remove("file") + data__file = data["file"] + data__file_one_of_count9 = 0 + if data__file_one_of_count9 < 2: + try: + if not isinstance(data__file, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be string", value=data__file, name="" + (name_prefix or "data") + ".file", definition={'type': 'string'}, rule='type') + data__file_one_of_count9 += 1 + except JsonSchemaValueException: pass + if data__file_one_of_count9 < 2: + try: + if not isinstance(data__file, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be array", value=data__file, name="" + (name_prefix or "data") + ".file", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__file_is_list = isinstance(data__file, (list, tuple)) + if data__file_is_list: + data__file_len = len(data__file) + for data__file_x, data__file_item in enumerate(data__file): + if not isinstance(data__file_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".file[{data__file_x}]".format(**locals()) + " must be string", value=data__file_item, name="" + (name_prefix or "data") + ".file[{data__file_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + data__file_one_of_count9 += 1 + except JsonSchemaValueException: pass + if data__file_one_of_count9 != 1: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".file must be valid exactly by one definition" + (" (" + str(data__file_one_of_count9) + " matches found)"), value=data__file, name="" + (name_prefix or "data") + ".file", definition={'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}, rule='oneOf') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/file-directive', 'title': "'file:' directive", 'description': 'Value is read from a file (or list of files and then concatenated)', 'type': 'object', 'additionalProperties': False, 'properties': {'file': {'oneOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}, 'required': ['file']}, rule='additionalProperties') + return data + +def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_attr_directive(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data__missing_keys = set(['attr']) - data.keys() + if data__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, rule='required') + data_keys = set(data.keys()) + if "attr" in data_keys: + data_keys.remove("attr") + data__attr = data["attr"] + if not isinstance(data__attr, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".attr must be string", value=data__attr, name="" + (name_prefix or "data") + ".attr", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='type') + if isinstance(data__attr, str): + if not custom_formats["python-qualified-identifier"](data__attr): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".attr must be python-qualified-identifier", value=data__attr, name="" + (name_prefix or "data") + ".attr", definition={'type': 'string', 'format': 'python-qualified-identifier'}, rule='format') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'title': "'attr:' directive", '$id': '#/definitions/attr-directive', '$$description': ['Value is read from a module attribute. Supports callables and iterables;', 'unsupported types are cast via ``str()``'], 'type': 'object', 'additionalProperties': False, 'properties': {'attr': {'type': 'string', 'format': 'python-qualified-identifier'}}, 'required': ['attr']}, rule='additionalProperties') + return data + +def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_ext_module(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data__missing_keys = set(['name', 'sources']) - data.keys() + if data__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, rule='required') + data_keys = set(data.keys()) + if "name" in data_keys: + data_keys.remove("name") + data__name = data["name"] + if not isinstance(data__name, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='type') + if isinstance(data__name, str): + if not custom_formats["python-module-name-relaxed"](data__name): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be python-module-name-relaxed", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='format') + if "sources" in data_keys: + data_keys.remove("sources") + data__sources = data["sources"] + if not isinstance(data__sources, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".sources must be array", value=data__sources, name="" + (name_prefix or "data") + ".sources", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__sources_is_list = isinstance(data__sources, (list, tuple)) + if data__sources_is_list: + data__sources_len = len(data__sources) + for data__sources_x, data__sources_item in enumerate(data__sources): + if not isinstance(data__sources_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".sources[{data__sources_x}]".format(**locals()) + " must be string", value=data__sources_item, name="" + (name_prefix or "data") + ".sources[{data__sources_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "include-dirs" in data_keys: + data_keys.remove("include-dirs") + data__includedirs = data["include-dirs"] + if not isinstance(data__includedirs, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".include-dirs must be array", value=data__includedirs, name="" + (name_prefix or "data") + ".include-dirs", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__includedirs_is_list = isinstance(data__includedirs, (list, tuple)) + if data__includedirs_is_list: + data__includedirs_len = len(data__includedirs) + for data__includedirs_x, data__includedirs_item in enumerate(data__includedirs): + if not isinstance(data__includedirs_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".include-dirs[{data__includedirs_x}]".format(**locals()) + " must be string", value=data__includedirs_item, name="" + (name_prefix or "data") + ".include-dirs[{data__includedirs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "define-macros" in data_keys: + data_keys.remove("define-macros") + data__definemacros = data["define-macros"] + if not isinstance(data__definemacros, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros must be array", value=data__definemacros, name="" + (name_prefix or "data") + ".define-macros", definition={'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, rule='type') + data__definemacros_is_list = isinstance(data__definemacros, (list, tuple)) + if data__definemacros_is_list: + data__definemacros_len = len(data__definemacros) + for data__definemacros_x, data__definemacros_item in enumerate(data__definemacros): + if not isinstance(data__definemacros_item, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}]".format(**locals()) + " must be array", value=data__definemacros_item, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}]".format(**locals()) + "", definition={'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}, rule='type') + data__definemacros_item_is_list = isinstance(data__definemacros_item, (list, tuple)) + if data__definemacros_item_is_list: + data__definemacros_item_len = len(data__definemacros_item) + if data__definemacros_item_len > 0: + data__definemacros_item__0 = data__definemacros_item[0] + if not isinstance(data__definemacros_item__0, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][0]".format(**locals()) + " must be string", value=data__definemacros_item__0, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][0]".format(**locals()) + "", definition={'description': 'macro name', 'type': 'string'}, rule='type') + if data__definemacros_item_len > 1: + data__definemacros_item__1 = data__definemacros_item[1] + data__definemacros_item__1_one_of_count10 = 0 + if data__definemacros_item__1_one_of_count10 < 2: + try: + if not isinstance(data__definemacros_item__1, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + " must be string", value=data__definemacros_item__1, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + data__definemacros_item__1_one_of_count10 += 1 + except JsonSchemaValueException: pass + if data__definemacros_item__1_one_of_count10 < 2: + try: + if not isinstance(data__definemacros_item__1, (NoneType)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + " must be null", value=data__definemacros_item__1, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + "", definition={'type': 'null'}, rule='type') + data__definemacros_item__1_one_of_count10 += 1 + except JsonSchemaValueException: pass + if data__definemacros_item__1_one_of_count10 != 1: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + " must be valid exactly by one definition" + (" (" + str(data__definemacros_item__1_one_of_count10) + " matches found)"), value=data__definemacros_item__1, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}][1]".format(**locals()) + "", definition={'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}, rule='oneOf') + if data__definemacros_item_len > 2: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}]".format(**locals()) + " must contain only specified items", value=data__definemacros_item, name="" + (name_prefix or "data") + ".define-macros[{data__definemacros_x}]".format(**locals()) + "", definition={'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}, rule='items') + if "undef-macros" in data_keys: + data_keys.remove("undef-macros") + data__undefmacros = data["undef-macros"] + if not isinstance(data__undefmacros, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".undef-macros must be array", value=data__undefmacros, name="" + (name_prefix or "data") + ".undef-macros", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__undefmacros_is_list = isinstance(data__undefmacros, (list, tuple)) + if data__undefmacros_is_list: + data__undefmacros_len = len(data__undefmacros) + for data__undefmacros_x, data__undefmacros_item in enumerate(data__undefmacros): + if not isinstance(data__undefmacros_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".undef-macros[{data__undefmacros_x}]".format(**locals()) + " must be string", value=data__undefmacros_item, name="" + (name_prefix or "data") + ".undef-macros[{data__undefmacros_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "library-dirs" in data_keys: + data_keys.remove("library-dirs") + data__librarydirs = data["library-dirs"] + if not isinstance(data__librarydirs, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".library-dirs must be array", value=data__librarydirs, name="" + (name_prefix or "data") + ".library-dirs", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__librarydirs_is_list = isinstance(data__librarydirs, (list, tuple)) + if data__librarydirs_is_list: + data__librarydirs_len = len(data__librarydirs) + for data__librarydirs_x, data__librarydirs_item in enumerate(data__librarydirs): + if not isinstance(data__librarydirs_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".library-dirs[{data__librarydirs_x}]".format(**locals()) + " must be string", value=data__librarydirs_item, name="" + (name_prefix or "data") + ".library-dirs[{data__librarydirs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "libraries" in data_keys: + data_keys.remove("libraries") + data__libraries = data["libraries"] + if not isinstance(data__libraries, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".libraries must be array", value=data__libraries, name="" + (name_prefix or "data") + ".libraries", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__libraries_is_list = isinstance(data__libraries, (list, tuple)) + if data__libraries_is_list: + data__libraries_len = len(data__libraries) + for data__libraries_x, data__libraries_item in enumerate(data__libraries): + if not isinstance(data__libraries_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".libraries[{data__libraries_x}]".format(**locals()) + " must be string", value=data__libraries_item, name="" + (name_prefix or "data") + ".libraries[{data__libraries_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "runtime-library-dirs" in data_keys: + data_keys.remove("runtime-library-dirs") + data__runtimelibrarydirs = data["runtime-library-dirs"] + if not isinstance(data__runtimelibrarydirs, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".runtime-library-dirs must be array", value=data__runtimelibrarydirs, name="" + (name_prefix or "data") + ".runtime-library-dirs", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__runtimelibrarydirs_is_list = isinstance(data__runtimelibrarydirs, (list, tuple)) + if data__runtimelibrarydirs_is_list: + data__runtimelibrarydirs_len = len(data__runtimelibrarydirs) + for data__runtimelibrarydirs_x, data__runtimelibrarydirs_item in enumerate(data__runtimelibrarydirs): + if not isinstance(data__runtimelibrarydirs_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".runtime-library-dirs[{data__runtimelibrarydirs_x}]".format(**locals()) + " must be string", value=data__runtimelibrarydirs_item, name="" + (name_prefix or "data") + ".runtime-library-dirs[{data__runtimelibrarydirs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "extra-objects" in data_keys: + data_keys.remove("extra-objects") + data__extraobjects = data["extra-objects"] + if not isinstance(data__extraobjects, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-objects must be array", value=data__extraobjects, name="" + (name_prefix or "data") + ".extra-objects", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__extraobjects_is_list = isinstance(data__extraobjects, (list, tuple)) + if data__extraobjects_is_list: + data__extraobjects_len = len(data__extraobjects) + for data__extraobjects_x, data__extraobjects_item in enumerate(data__extraobjects): + if not isinstance(data__extraobjects_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-objects[{data__extraobjects_x}]".format(**locals()) + " must be string", value=data__extraobjects_item, name="" + (name_prefix or "data") + ".extra-objects[{data__extraobjects_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "extra-compile-args" in data_keys: + data_keys.remove("extra-compile-args") + data__extracompileargs = data["extra-compile-args"] + if not isinstance(data__extracompileargs, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-compile-args must be array", value=data__extracompileargs, name="" + (name_prefix or "data") + ".extra-compile-args", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__extracompileargs_is_list = isinstance(data__extracompileargs, (list, tuple)) + if data__extracompileargs_is_list: + data__extracompileargs_len = len(data__extracompileargs) + for data__extracompileargs_x, data__extracompileargs_item in enumerate(data__extracompileargs): + if not isinstance(data__extracompileargs_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-compile-args[{data__extracompileargs_x}]".format(**locals()) + " must be string", value=data__extracompileargs_item, name="" + (name_prefix or "data") + ".extra-compile-args[{data__extracompileargs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "extra-link-args" in data_keys: + data_keys.remove("extra-link-args") + data__extralinkargs = data["extra-link-args"] + if not isinstance(data__extralinkargs, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-link-args must be array", value=data__extralinkargs, name="" + (name_prefix or "data") + ".extra-link-args", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__extralinkargs_is_list = isinstance(data__extralinkargs, (list, tuple)) + if data__extralinkargs_is_list: + data__extralinkargs_len = len(data__extralinkargs) + for data__extralinkargs_x, data__extralinkargs_item in enumerate(data__extralinkargs): + if not isinstance(data__extralinkargs_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".extra-link-args[{data__extralinkargs_x}]".format(**locals()) + " must be string", value=data__extralinkargs_item, name="" + (name_prefix or "data") + ".extra-link-args[{data__extralinkargs_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "export-symbols" in data_keys: + data_keys.remove("export-symbols") + data__exportsymbols = data["export-symbols"] + if not isinstance(data__exportsymbols, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".export-symbols must be array", value=data__exportsymbols, name="" + (name_prefix or "data") + ".export-symbols", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__exportsymbols_is_list = isinstance(data__exportsymbols, (list, tuple)) + if data__exportsymbols_is_list: + data__exportsymbols_len = len(data__exportsymbols) + for data__exportsymbols_x, data__exportsymbols_item in enumerate(data__exportsymbols): + if not isinstance(data__exportsymbols_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".export-symbols[{data__exportsymbols_x}]".format(**locals()) + " must be string", value=data__exportsymbols_item, name="" + (name_prefix or "data") + ".export-symbols[{data__exportsymbols_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "swig-opts" in data_keys: + data_keys.remove("swig-opts") + data__swigopts = data["swig-opts"] + if not isinstance(data__swigopts, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".swig-opts must be array", value=data__swigopts, name="" + (name_prefix or "data") + ".swig-opts", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__swigopts_is_list = isinstance(data__swigopts, (list, tuple)) + if data__swigopts_is_list: + data__swigopts_len = len(data__swigopts) + for data__swigopts_x, data__swigopts_item in enumerate(data__swigopts): + if not isinstance(data__swigopts_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".swig-opts[{data__swigopts_x}]".format(**locals()) + " must be string", value=data__swigopts_item, name="" + (name_prefix or "data") + ".swig-opts[{data__swigopts_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "depends" in data_keys: + data_keys.remove("depends") + data__depends = data["depends"] + if not isinstance(data__depends, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".depends must be array", value=data__depends, name="" + (name_prefix or "data") + ".depends", definition={'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__depends_is_list = isinstance(data__depends, (list, tuple)) + if data__depends_is_list: + data__depends_len = len(data__depends) + for data__depends_x, data__depends_item in enumerate(data__depends): + if not isinstance(data__depends_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".depends[{data__depends_x}]".format(**locals()) + " must be string", value=data__depends_item, name="" + (name_prefix or "data") + ".depends[{data__depends_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "language" in data_keys: + data_keys.remove("language") + data__language = data["language"] + if not isinstance(data__language, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".language must be string", value=data__language, name="" + (name_prefix or "data") + ".language", definition={'type': 'string'}, rule='type') + if "optional" in data_keys: + data_keys.remove("optional") + data__optional = data["optional"] + if not isinstance(data__optional, (bool)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional must be boolean", value=data__optional, name="" + (name_prefix or "data") + ".optional", definition={'type': 'boolean'}, rule='type') + if "py-limited-api" in data_keys: + data_keys.remove("py-limited-api") + data__pylimitedapi = data["py-limited-api"] + if not isinstance(data__pylimitedapi, (bool)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".py-limited-api must be boolean", value=data__pylimitedapi, name="" + (name_prefix or "data") + ".py-limited-api", definition={'type': 'boolean'}, rule='type') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/ext-module', 'title': 'Extension module', 'description': 'Parameters to construct a :class:`setuptools.Extension` object', 'type': 'object', 'required': ['name', 'sources'], 'additionalProperties': False, 'properties': {'name': {'type': 'string', 'format': 'python-module-name-relaxed'}, 'sources': {'type': 'array', 'items': {'type': 'string'}}, 'include-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'define-macros': {'type': 'array', 'items': {'type': 'array', 'items': [{'description': 'macro name', 'type': 'string'}, {'description': 'macro value', 'oneOf': [{'type': 'string'}, {'type': 'null'}]}], 'additionalItems': False}}, 'undef-macros': {'type': 'array', 'items': {'type': 'string'}}, 'library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'libraries': {'type': 'array', 'items': {'type': 'string'}}, 'runtime-library-dirs': {'type': 'array', 'items': {'type': 'string'}}, 'extra-objects': {'type': 'array', 'items': {'type': 'string'}}, 'extra-compile-args': {'type': 'array', 'items': {'type': 'string'}}, 'extra-link-args': {'type': 'array', 'items': {'type': 'string'}}, 'export-symbols': {'type': 'array', 'items': {'type': 'string'}}, 'swig-opts': {'type': 'array', 'items': {'type': 'string'}}, 'depends': {'type': 'array', 'items': {'type': 'string'}}, 'language': {'type': 'string'}, 'optional': {'type': 'boolean'}, 'py-limited-api': {'type': 'boolean'}}}, rule='additionalProperties') + return data + +def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_find_directive(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data_keys = set(data.keys()) + if "find" in data_keys: + data_keys.remove("find") + data__find = data["find"] + if not isinstance(data__find, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find must be object", value=data__find, name="" + (name_prefix or "data") + ".find", definition={'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}, rule='type') + data__find_is_dict = isinstance(data__find, dict) + if data__find_is_dict: + data__find_keys = set(data__find.keys()) + if "where" in data__find_keys: + data__find_keys.remove("where") + data__find__where = data__find["where"] + if not isinstance(data__find__where, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.where must be array", value=data__find__where, name="" + (name_prefix or "data") + ".find.where", definition={'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__find__where_is_list = isinstance(data__find__where, (list, tuple)) + if data__find__where_is_list: + data__find__where_len = len(data__find__where) + for data__find__where_x, data__find__where_item in enumerate(data__find__where): + if not isinstance(data__find__where_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.where[{data__find__where_x}]".format(**locals()) + " must be string", value=data__find__where_item, name="" + (name_prefix or "data") + ".find.where[{data__find__where_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "exclude" in data__find_keys: + data__find_keys.remove("exclude") + data__find__exclude = data__find["exclude"] + if not isinstance(data__find__exclude, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.exclude must be array", value=data__find__exclude, name="" + (name_prefix or "data") + ".find.exclude", definition={'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, rule='type') + data__find__exclude_is_list = isinstance(data__find__exclude, (list, tuple)) + if data__find__exclude_is_list: + data__find__exclude_len = len(data__find__exclude) + for data__find__exclude_x, data__find__exclude_item in enumerate(data__find__exclude): + if not isinstance(data__find__exclude_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.exclude[{data__find__exclude_x}]".format(**locals()) + " must be string", value=data__find__exclude_item, name="" + (name_prefix or "data") + ".find.exclude[{data__find__exclude_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "include" in data__find_keys: + data__find_keys.remove("include") + data__find__include = data__find["include"] + if not isinstance(data__find__include, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.include must be array", value=data__find__include, name="" + (name_prefix or "data") + ".find.include", definition={'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, rule='type') + data__find__include_is_list = isinstance(data__find__include, (list, tuple)) + if data__find__include_is_list: + data__find__include_len = len(data__find__include) + for data__find__include_x, data__find__include_item in enumerate(data__find__include): + if not isinstance(data__find__include_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.include[{data__find__include_x}]".format(**locals()) + " must be string", value=data__find__include_item, name="" + (name_prefix or "data") + ".find.include[{data__find__include_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "namespaces" in data__find_keys: + data__find_keys.remove("namespaces") + data__find__namespaces = data__find["namespaces"] + if not isinstance(data__find__namespaces, (bool)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find.namespaces must be boolean", value=data__find__namespaces, name="" + (name_prefix or "data") + ".find.namespaces", definition={'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}, rule='type') + if data__find_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".find must not contain "+str(data__find_keys)+" properties", value=data__find, name="" + (name_prefix or "data") + ".find", definition={'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}, rule='additionalProperties') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/find-directive', 'title': "'find:' directive", 'type': 'object', 'additionalProperties': False, 'properties': {'find': {'type': 'object', '$$description': ['Dynamic `package discovery', '`_.'], 'additionalProperties': False, 'properties': {'where': {'description': 'Directories to be searched for packages (Unix-style relative path)', 'type': 'array', 'items': {'type': 'string'}}, 'exclude': {'type': 'array', '$$description': ['Exclude packages that match the values listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'include': {'type': 'array', '$$description': ['Restrict the found packages to just the ones listed in this field.', "Can container shell-style wildcards (e.g. ``'pkg.*'``)"], 'items': {'type': 'string'}}, 'namespaces': {'type': 'boolean', '$$description': ['When ``True``, directories without a ``__init__.py`` file will also', 'be scanned for :pep:`420`-style implicit namespaces']}}}}}, rule='additionalProperties') + return data + +def validate_https___setuptools_pypa_io_en_latest_userguide_pyproject_config_html__definitions_package_name(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, rule='type') + data_any_of_count11 = 0 + if not data_any_of_count11: + try: + if not isinstance(data, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='type') + if isinstance(data, str): + if not custom_formats["python-module-name-relaxed"](data): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be python-module-name-relaxed", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string', 'format': 'python-module-name-relaxed'}, rule='format') + data_any_of_count11 += 1 + except JsonSchemaValueException: pass + if not data_any_of_count11: + try: + if not isinstance(data, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string', 'format': 'pep561-stub-name'}, rule='type') + if isinstance(data, str): + if not custom_formats["pep561-stub-name"](data): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be pep561-stub-name", value=data, name="" + (name_prefix or "data") + "", definition={'type': 'string', 'format': 'pep561-stub-name'}, rule='format') + data_any_of_count11 += 1 + except JsonSchemaValueException: pass + if not data_any_of_count11: + raise JsonSchemaValueException("" + (name_prefix or "data") + " cannot be validated by any definition", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/package-name', 'title': 'Valid package name', 'description': 'Valid package name (importable or :pep:`561`).', 'type': 'string', 'anyOf': [{'type': 'string', 'format': 'python-module-name-relaxed'}, {'type': 'string', 'format': 'pep561-stub-name'}]}, rule='anyOf') + return data + +def validate_https___setuptools_pypa_io_en_latest_deprecated_distutils_configfile_html(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html', 'title': '``tool.distutils`` table', '$$description': ['**EXPERIMENTAL** (NOT OFFICIALLY SUPPORTED): Use ``tool.distutils``', 'subtables to configure arguments for ``distutils`` commands.', 'Originally, ``distutils`` allowed developers to configure arguments for', '``setup.py`` commands via `distutils configuration files', '`_.', 'See also `the old Python docs _`.'], 'type': 'object', 'properties': {'global': {'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}}, 'patternProperties': {'.+': {'type': 'object'}}, '$comment': 'TODO: Is there a practical way of making this schema more specific?'}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data_keys = set(data.keys()) + if "global" in data_keys: + data_keys.remove("global") + data__global = data["global"] + if not isinstance(data__global, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".global must be object", value=data__global, name="" + (name_prefix or "data") + ".global", definition={'type': 'object', 'description': 'Global options applied to all ``distutils`` commands'}, rule='type') + for data_key, data_val in data.items(): + if REGEX_PATTERNS['.+'].search(data_key): + if data_key in data_keys: + data_keys.remove(data_key) + if not isinstance(data_val, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be object", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'object'}, rule='type') + return data + +def validate_https___packaging_python_org_en_latest_specifications_pyproject_toml(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='type') + try: + try: + data_is_dict = isinstance(data, dict) + if data_is_dict: + data__missing_keys = set(['dynamic']) - data.keys() + if data__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, rule='required') + data_keys = set(data.keys()) + if "dynamic" in data_keys: + data_keys.remove("dynamic") + data__dynamic = data["dynamic"] + data__dynamic_is_list = isinstance(data__dynamic, (list, tuple)) + if data__dynamic_is_list: + data__dynamic_contains = False + for data__dynamic_key in data__dynamic: + try: + if data__dynamic_key != "version": + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be same as const definition: version", value=data__dynamic_key, name="" + (name_prefix or "data") + ".dynamic", definition={'const': 'version'}, rule='const') + data__dynamic_contains = True + break + except JsonSchemaValueException: pass + if not data__dynamic_contains: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must contain one of contains definition", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}, rule='contains') + except JsonSchemaValueException: pass + else: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must NOT match a disallowed definition", value=data, name="" + (name_prefix or "data") + "", definition={'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, rule='not') + except JsonSchemaValueException: + pass + else: + data_is_dict = isinstance(data, dict) + if data_is_dict: + data__missing_keys = set(['version']) - data.keys() + if data__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}, rule='required') + try: + data_is_dict = isinstance(data, dict) + if data_is_dict: + data__missing_keys = set(['license-files']) - data.keys() + if data__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'required': ['license-files']}, rule='required') + except JsonSchemaValueException: + pass + else: + data_is_dict = isinstance(data, dict) + if data_is_dict: + data_keys = set(data.keys()) + if "license" in data_keys: + data_keys.remove("license") + data__license = data["license"] + if not isinstance(data__license, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be string", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'string'}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data__missing_keys = set(['name']) - data.keys() + if data__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must contain " + (str(sorted(data__missing_keys)) + " properties"), value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='required') + data_keys = set(data.keys()) + if "name" in data_keys: + data_keys.remove("name") + data__name = data["name"] + if not isinstance(data__name, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, rule='type') + if isinstance(data__name, str): + if not custom_formats["pep508-identifier"](data__name): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be pep508-identifier", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, rule='format') + if "version" in data_keys: + data_keys.remove("version") + data__version = data["version"] + if not isinstance(data__version, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".version must be string", value=data__version, name="" + (name_prefix or "data") + ".version", definition={'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, rule='type') + if isinstance(data__version, str): + if not custom_formats["pep440"](data__version): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".version must be pep440", value=data__version, name="" + (name_prefix or "data") + ".version", definition={'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, rule='format') + if "description" in data_keys: + data_keys.remove("description") + data__description = data["description"] + if not isinstance(data__description, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".description must be string", value=data__description, name="" + (name_prefix or "data") + ".description", definition={'type': 'string', '$$description': ['The `summary description of the project', '`_']}, rule='type') + if "readme" in data_keys: + data_keys.remove("readme") + data__readme = data["readme"] + data__readme_one_of_count12 = 0 + if data__readme_one_of_count12 < 2: + try: + if not isinstance(data__readme, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be string", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, rule='type') + data__readme_one_of_count12 += 1 + except JsonSchemaValueException: pass + if data__readme_one_of_count12 < 2: + try: + if not isinstance(data__readme, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be object", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}, rule='type') + data__readme_any_of_count13 = 0 + if not data__readme_any_of_count13: + try: + data__readme_is_dict = isinstance(data__readme, dict) + if data__readme_is_dict: + data__readme__missing_keys = set(['file']) - data__readme.keys() + if data__readme__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain " + (str(sorted(data__readme__missing_keys)) + " properties"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, rule='required') + data__readme_keys = set(data__readme.keys()) + if "file" in data__readme_keys: + data__readme_keys.remove("file") + data__readme__file = data__readme["file"] + if not isinstance(data__readme__file, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.file must be string", value=data__readme__file, name="" + (name_prefix or "data") + ".readme.file", definition={'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}, rule='type') + data__readme_any_of_count13 += 1 + except JsonSchemaValueException: pass + if not data__readme_any_of_count13: + try: + data__readme_is_dict = isinstance(data__readme, dict) + if data__readme_is_dict: + data__readme__missing_keys = set(['text']) - data__readme.keys() + if data__readme__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain " + (str(sorted(data__readme__missing_keys)) + " properties"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}, rule='required') + data__readme_keys = set(data__readme.keys()) + if "text" in data__readme_keys: + data__readme_keys.remove("text") + data__readme__text = data__readme["text"] + if not isinstance(data__readme__text, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.text must be string", value=data__readme__text, name="" + (name_prefix or "data") + ".readme.text", definition={'type': 'string', 'description': 'Full text describing the project.'}, rule='type') + data__readme_any_of_count13 += 1 + except JsonSchemaValueException: pass + if not data__readme_any_of_count13: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme cannot be validated by any definition", value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, rule='anyOf') + data__readme_is_dict = isinstance(data__readme, dict) + if data__readme_is_dict: + data__readme__missing_keys = set(['content-type']) - data__readme.keys() + if data__readme__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must contain " + (str(sorted(data__readme__missing_keys)) + " properties"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}, rule='required') + data__readme_keys = set(data__readme.keys()) + if "content-type" in data__readme_keys: + data__readme_keys.remove("content-type") + data__readme__contenttype = data__readme["content-type"] + if not isinstance(data__readme__contenttype, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme.content-type must be string", value=data__readme__contenttype, name="" + (name_prefix or "data") + ".readme.content-type", definition={'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}, rule='type') + data__readme_one_of_count12 += 1 + except JsonSchemaValueException: pass + if data__readme_one_of_count12 != 1: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".readme must be valid exactly by one definition" + (" (" + str(data__readme_one_of_count12) + " matches found)"), value=data__readme, name="" + (name_prefix or "data") + ".readme", definition={'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, rule='oneOf') + if "requires-python" in data_keys: + data_keys.remove("requires-python") + data__requirespython = data["requires-python"] + if not isinstance(data__requirespython, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".requires-python must be string", value=data__requirespython, name="" + (name_prefix or "data") + ".requires-python", definition={'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, rule='type') + if isinstance(data__requirespython, str): + if not custom_formats["pep508-versionspec"](data__requirespython): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".requires-python must be pep508-versionspec", value=data__requirespython, name="" + (name_prefix or "data") + ".requires-python", definition={'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, rule='format') + if "license" in data_keys: + data_keys.remove("license") + data__license = data["license"] + data__license_one_of_count14 = 0 + if data__license_one_of_count14 < 2: + try: + if not isinstance(data__license, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be string", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, rule='type') + if isinstance(data__license, str): + if not custom_formats["SPDX"](data__license): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be SPDX", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, rule='format') + data__license_one_of_count14 += 1 + except JsonSchemaValueException: pass + if data__license_one_of_count14 < 2: + try: + if not isinstance(data__license, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be object", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, rule='type') + data__license_is_dict = isinstance(data__license, dict) + if data__license_is_dict: + data__license__missing_keys = set(['file']) - data__license.keys() + if data__license__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must contain " + (str(sorted(data__license__missing_keys)) + " properties"), value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, rule='required') + data__license_keys = set(data__license.keys()) + if "file" in data__license_keys: + data__license_keys.remove("file") + data__license__file = data__license["file"] + if not isinstance(data__license__file, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license.file must be string", value=data__license__file, name="" + (name_prefix or "data") + ".license.file", definition={'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}, rule='type') + data__license_one_of_count14 += 1 + except JsonSchemaValueException: pass + if data__license_one_of_count14 < 2: + try: + if not isinstance(data__license, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be object", value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}, rule='type') + data__license_is_dict = isinstance(data__license, dict) + if data__license_is_dict: + data__license__missing_keys = set(['text']) - data__license.keys() + if data__license__missing_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must contain " + (str(sorted(data__license__missing_keys)) + " properties"), value=data__license, name="" + (name_prefix or "data") + ".license", definition={'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}, rule='required') + data__license_keys = set(data__license.keys()) + if "text" in data__license_keys: + data__license_keys.remove("text") + data__license__text = data__license["text"] + if not isinstance(data__license__text, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license.text must be string", value=data__license__text, name="" + (name_prefix or "data") + ".license.text", definition={'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}, rule='type') + data__license_one_of_count14 += 1 + except JsonSchemaValueException: pass + if data__license_one_of_count14 != 1: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license must be valid exactly by one definition" + (" (" + str(data__license_one_of_count14) + " matches found)"), value=data__license, name="" + (name_prefix or "data") + ".license", definition={'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, rule='oneOf') + if "license-files" in data_keys: + data_keys.remove("license-files") + data__licensefiles = data["license-files"] + if not isinstance(data__licensefiles, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files must be array", value=data__licensefiles, name="" + (name_prefix or "data") + ".license-files", definition={'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, rule='type') + data__licensefiles_is_list = isinstance(data__licensefiles, (list, tuple)) + if data__licensefiles_is_list: + data__licensefiles_len = len(data__licensefiles) + for data__licensefiles_x, data__licensefiles_item in enumerate(data__licensefiles): + if not isinstance(data__licensefiles_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + " must be string", value=data__licensefiles_item, name="" + (name_prefix or "data") + ".license-files[{data__licensefiles_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "authors" in data_keys: + data_keys.remove("authors") + data__authors = data["authors"] + if not isinstance(data__authors, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".authors must be array", value=data__authors, name="" + (name_prefix or "data") + ".authors", definition={'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, rule='type') + data__authors_is_list = isinstance(data__authors, (list, tuple)) + if data__authors_is_list: + data__authors_len = len(data__authors) + for data__authors_x, data__authors_item in enumerate(data__authors): + validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_author(data__authors_item, custom_formats, (name_prefix or "data") + ".authors[{data__authors_x}]".format(**locals())) + if "maintainers" in data_keys: + data_keys.remove("maintainers") + data__maintainers = data["maintainers"] + if not isinstance(data__maintainers, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".maintainers must be array", value=data__maintainers, name="" + (name_prefix or "data") + ".maintainers", definition={'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, rule='type') + data__maintainers_is_list = isinstance(data__maintainers, (list, tuple)) + if data__maintainers_is_list: + data__maintainers_len = len(data__maintainers) + for data__maintainers_x, data__maintainers_item in enumerate(data__maintainers): + validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_author(data__maintainers_item, custom_formats, (name_prefix or "data") + ".maintainers[{data__maintainers_x}]".format(**locals())) + if "keywords" in data_keys: + data_keys.remove("keywords") + data__keywords = data["keywords"] + if not isinstance(data__keywords, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".keywords must be array", value=data__keywords, name="" + (name_prefix or "data") + ".keywords", definition={'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, rule='type') + data__keywords_is_list = isinstance(data__keywords, (list, tuple)) + if data__keywords_is_list: + data__keywords_len = len(data__keywords) + for data__keywords_x, data__keywords_item in enumerate(data__keywords): + if not isinstance(data__keywords_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".keywords[{data__keywords_x}]".format(**locals()) + " must be string", value=data__keywords_item, name="" + (name_prefix or "data") + ".keywords[{data__keywords_x}]".format(**locals()) + "", definition={'type': 'string'}, rule='type') + if "classifiers" in data_keys: + data_keys.remove("classifiers") + data__classifiers = data["classifiers"] + if not isinstance(data__classifiers, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers must be array", value=data__classifiers, name="" + (name_prefix or "data") + ".classifiers", definition={'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, rule='type') + data__classifiers_is_list = isinstance(data__classifiers, (list, tuple)) + if data__classifiers_is_list: + data__classifiers_len = len(data__classifiers) + for data__classifiers_x, data__classifiers_item in enumerate(data__classifiers): + if not isinstance(data__classifiers_item, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + " must be string", value=data__classifiers_item, name="" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, rule='type') + if isinstance(data__classifiers_item, str): + if not custom_formats["trove-classifier"](data__classifiers_item): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + " must be trove-classifier", value=data__classifiers_item, name="" + (name_prefix or "data") + ".classifiers[{data__classifiers_x}]".format(**locals()) + "", definition={'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, rule='format') + if "urls" in data_keys: + data_keys.remove("urls") + data__urls = data["urls"] + if not isinstance(data__urls, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls must be object", value=data__urls, name="" + (name_prefix or "data") + ".urls", definition={'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, rule='type') + data__urls_is_dict = isinstance(data__urls, dict) + if data__urls_is_dict: + data__urls_keys = set(data__urls.keys()) + for data__urls_key, data__urls_val in data__urls.items(): + if REGEX_PATTERNS['^.+$'].search(data__urls_key): + if data__urls_key in data__urls_keys: + data__urls_keys.remove(data__urls_key) + if not isinstance(data__urls_val, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + " must be string", value=data__urls_val, name="" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'url'}, rule='type') + if isinstance(data__urls_val, str): + if not custom_formats["url"](data__urls_val): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + " must be url", value=data__urls_val, name="" + (name_prefix or "data") + ".urls.{data__urls_key}".format(**locals()) + "", definition={'type': 'string', 'format': 'url'}, rule='format') + if data__urls_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".urls must not contain "+str(data__urls_keys)+" properties", value=data__urls, name="" + (name_prefix or "data") + ".urls", definition={'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, rule='additionalProperties') + if "scripts" in data_keys: + data_keys.remove("scripts") + data__scripts = data["scripts"] + validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_entry_point_group(data__scripts, custom_formats, (name_prefix or "data") + ".scripts") + if "gui-scripts" in data_keys: + data_keys.remove("gui-scripts") + data__guiscripts = data["gui-scripts"] + validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_entry_point_group(data__guiscripts, custom_formats, (name_prefix or "data") + ".gui-scripts") + if "entry-points" in data_keys: + data_keys.remove("entry-points") + data__entrypoints = data["entry-points"] + data__entrypoints_is_dict = isinstance(data__entrypoints, dict) + if data__entrypoints_is_dict: + data__entrypoints_keys = set(data__entrypoints.keys()) + for data__entrypoints_key, data__entrypoints_val in data__entrypoints.items(): + if REGEX_PATTERNS['^.+$'].search(data__entrypoints_key): + if data__entrypoints_key in data__entrypoints_keys: + data__entrypoints_keys.remove(data__entrypoints_key) + validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_entry_point_group(data__entrypoints_val, custom_formats, (name_prefix or "data") + ".entry-points.{data__entrypoints_key}".format(**locals())) + if data__entrypoints_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must not contain "+str(data__entrypoints_keys)+" properties", value=data__entrypoints, name="" + (name_prefix or "data") + ".entry-points", definition={'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, rule='additionalProperties') + data__entrypoints_len = len(data__entrypoints) + if data__entrypoints_len != 0: + data__entrypoints_property_names = True + for data__entrypoints_key in data__entrypoints: + try: + if isinstance(data__entrypoints_key, str): + if not custom_formats["python-entrypoint-group"](data__entrypoints_key): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must be python-entrypoint-group", value=data__entrypoints_key, name="" + (name_prefix or "data") + ".entry-points", definition={'format': 'python-entrypoint-group'}, rule='format') + except JsonSchemaValueException: + data__entrypoints_property_names = False + if not data__entrypoints_property_names: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".entry-points must be named by propertyName definition", value=data__entrypoints, name="" + (name_prefix or "data") + ".entry-points", definition={'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, rule='propertyNames') + if "dependencies" in data_keys: + data_keys.remove("dependencies") + data__dependencies = data["dependencies"] + if not isinstance(data__dependencies, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dependencies must be array", value=data__dependencies, name="" + (name_prefix or "data") + ".dependencies", definition={'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, rule='type') + data__dependencies_is_list = isinstance(data__dependencies, (list, tuple)) + if data__dependencies_is_list: + data__dependencies_len = len(data__dependencies) + for data__dependencies_x, data__dependencies_item in enumerate(data__dependencies): + validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_dependency(data__dependencies_item, custom_formats, (name_prefix or "data") + ".dependencies[{data__dependencies_x}]".format(**locals())) + if "optional-dependencies" in data_keys: + data_keys.remove("optional-dependencies") + data__optionaldependencies = data["optional-dependencies"] + if not isinstance(data__optionaldependencies, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be object", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='type') + data__optionaldependencies_is_dict = isinstance(data__optionaldependencies, dict) + if data__optionaldependencies_is_dict: + data__optionaldependencies_keys = set(data__optionaldependencies.keys()) + for data__optionaldependencies_key, data__optionaldependencies_val in data__optionaldependencies.items(): + if REGEX_PATTERNS['^.+$'].search(data__optionaldependencies_key): + if data__optionaldependencies_key in data__optionaldependencies_keys: + data__optionaldependencies_keys.remove(data__optionaldependencies_key) + if not isinstance(data__optionaldependencies_val, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}".format(**locals()) + " must be array", value=data__optionaldependencies_val, name="" + (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}".format(**locals()) + "", definition={'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, rule='type') + data__optionaldependencies_val_is_list = isinstance(data__optionaldependencies_val, (list, tuple)) + if data__optionaldependencies_val_is_list: + data__optionaldependencies_val_len = len(data__optionaldependencies_val) + for data__optionaldependencies_val_x, data__optionaldependencies_val_item in enumerate(data__optionaldependencies_val): + validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_dependency(data__optionaldependencies_val_item, custom_formats, (name_prefix or "data") + ".optional-dependencies.{data__optionaldependencies_key}[{data__optionaldependencies_val_x}]".format(**locals())) + if data__optionaldependencies_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must not contain "+str(data__optionaldependencies_keys)+" properties", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='additionalProperties') + data__optionaldependencies_len = len(data__optionaldependencies) + if data__optionaldependencies_len != 0: + data__optionaldependencies_property_names = True + for data__optionaldependencies_key in data__optionaldependencies: + try: + if isinstance(data__optionaldependencies_key, str): + if not custom_formats["pep508-identifier"](data__optionaldependencies_key): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be pep508-identifier", value=data__optionaldependencies_key, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'format': 'pep508-identifier'}, rule='format') + except JsonSchemaValueException: + data__optionaldependencies_property_names = False + if not data__optionaldependencies_property_names: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".optional-dependencies must be named by propertyName definition", value=data__optionaldependencies, name="" + (name_prefix or "data") + ".optional-dependencies", definition={'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, rule='propertyNames') + if "dynamic" in data_keys: + data_keys.remove("dynamic") + data__dynamic = data["dynamic"] + if not isinstance(data__dynamic, (list, tuple)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic must be array", value=data__dynamic, name="" + (name_prefix or "data") + ".dynamic", definition={'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}, rule='type') + data__dynamic_is_list = isinstance(data__dynamic, (list, tuple)) + if data__dynamic_is_list: + data__dynamic_len = len(data__dynamic) + for data__dynamic_x, data__dynamic_item in enumerate(data__dynamic): + if data__dynamic_item not in ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']: + raise JsonSchemaValueException("" + (name_prefix or "data") + ".dynamic[{data__dynamic_x}]".format(**locals()) + " must be one of ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']", value=data__dynamic_item, name="" + (name_prefix or "data") + ".dynamic[{data__dynamic_x}]".format(**locals()) + "", definition={'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}, rule='enum') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$schema': 'http://json-schema.org/draft-07/schema#', '$id': 'https://packaging.python.org/en/latest/specifications/pyproject-toml/', 'title': 'Package metadata stored in the ``project`` table', '$$description': ['Data structure for the **project** table inside ``pyproject.toml``', '(as initially defined in :pep:`621`)'], 'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name (primary identifier) of the project. MUST be statically defined.', 'format': 'pep508-identifier'}, 'version': {'type': 'string', 'description': 'The version of the project as supported by :pep:`440`.', 'format': 'pep440'}, 'description': {'type': 'string', '$$description': ['The `summary description of the project', '`_']}, 'readme': {'$$description': ['`Full/detailed description of the project in the form of a README', '`_', "with meaning similar to the one defined in `core metadata's Description", '`_'], 'oneOf': [{'type': 'string', '$$description': ['Relative path to a text file (UTF-8) containing the full description', 'of the project. If the file path ends in case-insensitive ``.md`` or', '``.rst`` suffixes, then the content-type is respectively', '``text/markdown`` or ``text/x-rst``']}, {'type': 'object', 'allOf': [{'anyOf': [{'properties': {'file': {'type': 'string', '$$description': ['Relative path to a text file containing the full description', 'of the project.']}}, 'required': ['file']}, {'properties': {'text': {'type': 'string', 'description': 'Full text describing the project.'}}, 'required': ['text']}]}, {'properties': {'content-type': {'type': 'string', '$$description': ['Content-type (:rfc:`1341`) of the full description', '(e.g. ``text/markdown``). The ``charset`` parameter is assumed', 'UTF-8 when not present.'], '$comment': 'TODO: add regex pattern or format?'}}, 'required': ['content-type']}]}]}, 'requires-python': {'type': 'string', 'format': 'pep508-versionspec', '$$description': ['`The Python version requirements of the project', '`_.']}, 'license': {'description': '`Project license `_.', 'oneOf': [{'type': 'string', 'description': 'An SPDX license identifier', 'format': 'SPDX'}, {'type': 'object', 'properties': {'file': {'type': 'string', '$$description': ['Relative path to the file (UTF-8) which contains the license for the', 'project.']}}, 'required': ['file']}, {'type': 'object', 'properties': {'text': {'type': 'string', '$$description': ['The license of the project whose meaning is that of the', '`License field from the core metadata', '`_.']}}, 'required': ['text']}]}, 'license-files': {'description': 'Paths or globs to paths of license files', 'type': 'array', 'items': {'type': 'string'}}, 'authors': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'authors' of the project.", 'The exact meaning is open to interpretation (e.g. original or primary authors,', 'current maintainers, or owners of the package).']}, 'maintainers': {'type': 'array', 'items': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, '$$description': ["The people or organizations considered to be the 'maintainers' of the project.", 'Similarly to ``authors``, the exact meaning is open to interpretation.']}, 'keywords': {'type': 'array', 'items': {'type': 'string'}, 'description': 'List of keywords to assist searching for the distribution in a larger catalog.'}, 'classifiers': {'type': 'array', 'items': {'type': 'string', 'format': 'trove-classifier', 'description': '`PyPI classifier `_.'}, '$$description': ['`Trove classifiers `_', 'which apply to the project.']}, 'urls': {'type': 'object', 'description': 'URLs associated with the project in the form ``label => value``.', 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', 'format': 'url'}}}, 'scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'gui-scripts': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'entry-points': {'$$description': ['Instruct the installer to expose the given modules/functions via', '``entry-point`` discovery mechanism (useful for plugins).', 'More information available in the `Python packaging guide', '`_.'], 'propertyNames': {'format': 'python-entrypoint-group'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}}}, 'dependencies': {'type': 'array', 'description': 'Project (mandatory) dependencies.', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}, 'optional-dependencies': {'type': 'object', 'description': 'Optional dependency for the project', 'propertyNames': {'format': 'pep508-identifier'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'array', 'items': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}}, 'dynamic': {'type': 'array', '$$description': ['Specifies which fields are intentionally unspecified and expected to be', 'dynamically provided by build tools'], 'items': {'enum': ['version', 'description', 'readme', 'requires-python', 'license', 'license-files', 'authors', 'maintainers', 'keywords', 'classifiers', 'urls', 'scripts', 'gui-scripts', 'entry-points', 'dependencies', 'optional-dependencies']}}}, 'required': ['name'], 'additionalProperties': False, 'allOf': [{'if': {'not': {'required': ['dynamic'], 'properties': {'dynamic': {'contains': {'const': 'version'}, '$$description': ['version is listed in ``dynamic``']}}}, '$$comment': ['According to :pep:`621`:', ' If the core metadata specification lists a field as "Required", then', ' the metadata MUST specify the field statically or list it in dynamic', 'In turn, `core metadata`_ defines:', ' The required fields are: Metadata-Version, Name, Version.', ' All the other fields are optional.', 'Since ``Metadata-Version`` is defined by the build back-end, ``name`` and', '``version`` are the only mandatory information in ``pyproject.toml``.', '.. _core metadata: https://packaging.python.org/specifications/core-metadata/']}, 'then': {'required': ['version'], '$$description': ['version should be statically defined in the ``version`` field']}}, {'if': {'required': ['license-files']}, 'then': {'properties': {'license': {'type': 'string'}}}}], 'definitions': {'author': {'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, 'entry-point-group': {'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, 'dependency': {'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}}}, rule='additionalProperties') + return data + +def validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_dependency(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be string", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}, rule='type') + if isinstance(data, str): + if not custom_formats["pep508"](data): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be pep508", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/dependency', 'title': 'Dependency', 'type': 'string', 'description': 'Project dependency specification according to PEP 508', 'format': 'pep508'}, rule='format') + return data + +def validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_entry_point_group(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data_keys = set(data.keys()) + for data_key, data_val in data.items(): + if REGEX_PATTERNS['^.+$'].search(data_key): + if data_key in data_keys: + data_keys.remove(data_key) + if not isinstance(data_val, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be string", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}, rule='type') + if isinstance(data_val, str): + if not custom_formats["python-entrypoint-reference"](data_val): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".{data_key}".format(**locals()) + " must be python-entrypoint-reference", value=data_val, name="" + (name_prefix or "data") + ".{data_key}".format(**locals()) + "", definition={'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}, rule='format') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='additionalProperties') + data_len = len(data) + if data_len != 0: + data_property_names = True + for data_key in data: + try: + if isinstance(data_key, str): + if not custom_formats["python-entrypoint-name"](data_key): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be python-entrypoint-name", value=data_key, name="" + (name_prefix or "data") + "", definition={'format': 'python-entrypoint-name'}, rule='format') + except JsonSchemaValueException: + data_property_names = False + if not data_property_names: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be named by propertyName definition", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/entry-point-group', 'title': 'Entry-points', 'type': 'object', '$$description': ['Entry-points are grouped together to indicate what sort of capabilities they', 'provide.', 'See the `packaging guides', '`_', 'and `setuptools docs', '`_', 'for more information.'], 'propertyNames': {'format': 'python-entrypoint-name'}, 'additionalProperties': False, 'patternProperties': {'^.+$': {'type': 'string', '$$description': ['Reference to a Python object. It is either in the form', '``importable.module``, or ``importable.module:object.attr``.'], 'format': 'python-entrypoint-reference', '$comment': 'https://packaging.python.org/specifications/entry-points/'}}}, rule='propertyNames') + return data + +def validate_https___packaging_python_org_en_latest_specifications_pyproject_toml___definitions_author(data, custom_formats={}, name_prefix=None): + if not isinstance(data, (dict)): + raise JsonSchemaValueException("" + (name_prefix or "data") + " must be object", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, rule='type') + data_is_dict = isinstance(data, dict) + if data_is_dict: + data_keys = set(data.keys()) + if "name" in data_keys: + data_keys.remove("name") + data__name = data["name"] + if not isinstance(data__name, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".name must be string", value=data__name, name="" + (name_prefix or "data") + ".name", definition={'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, rule='type') + if "email" in data_keys: + data_keys.remove("email") + data__email = data["email"] + if not isinstance(data__email, (str)): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".email must be string", value=data__email, name="" + (name_prefix or "data") + ".email", definition={'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}, rule='type') + if isinstance(data__email, str): + if not REGEX_PATTERNS["idn-email_re_pattern"].match(data__email): + raise JsonSchemaValueException("" + (name_prefix or "data") + ".email must be idn-email", value=data__email, name="" + (name_prefix or "data") + ".email", definition={'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}, rule='format') + if data_keys: + raise JsonSchemaValueException("" + (name_prefix or "data") + " must not contain "+str(data_keys)+" properties", value=data, name="" + (name_prefix or "data") + "", definition={'$id': '#/definitions/author', 'title': 'Author or Maintainer', '$comment': 'https://peps.python.org/pep-0621/#authors-maintainers', 'type': 'object', 'additionalProperties': False, 'properties': {'name': {'type': 'string', '$$description': ['MUST be a valid email name, i.e. whatever can be put as a name, before an', 'email, in :rfc:`822`.']}, 'email': {'type': 'string', 'format': 'idn-email', 'description': 'MUST be a valid email address'}}}, rule='additionalProperties') + return data diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/formats.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/formats.py new file mode 100644 index 0000000000000000000000000000000000000000..1cf4a465ef0156deef5bd4d1fc02350e40ff2fe5 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/config/_validate_pyproject/formats.py @@ -0,0 +1,402 @@ +""" +The functions in this module are used to validate schemas with the +`format JSON Schema keyword +`_. + +The correspondence is given by replacing the ``_`` character in the name of the +function with a ``-`` to obtain the format name and vice versa. +""" + +import builtins +import logging +import os +import re +import string +import typing +from itertools import chain as _chain + +if typing.TYPE_CHECKING: + from typing_extensions import Literal + +_logger = logging.getLogger(__name__) + +# ------------------------------------------------------------------------------------- +# PEP 440 + +VERSION_PATTERN = r""" + v? + (?: + (?:(?P[0-9]+)!)? # epoch + (?P[0-9]+(?:\.[0-9]+)*) # release segment + (?P
                                          # pre-release
+            [-_\.]?
+            (?Palpha|a|beta|b|preview|pre|c|rc)
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+        (?P                                         # post release
+            (?:-(?P[0-9]+))
+            |
+            (?:
+                [-_\.]?
+                (?Ppost|rev|r)
+                [-_\.]?
+                (?P[0-9]+)?
+            )
+        )?
+        (?P                                          # dev release
+            [-_\.]?
+            (?Pdev)
+            [-_\.]?
+            (?P[0-9]+)?
+        )?
+    )
+    (?:\+(?P[a-z0-9]+(?:[-_\.][a-z0-9]+)*))?       # local version
+"""
+
+VERSION_REGEX = re.compile(r"^\s*" + VERSION_PATTERN + r"\s*$", re.X | re.I)
+
+
+def pep440(version: str) -> bool:
+    """See :ref:`PyPA's version specification `
+    (initially introduced in :pep:`440`).
+    """
+    return VERSION_REGEX.match(version) is not None
+
+
+# -------------------------------------------------------------------------------------
+# PEP 508
+
+PEP508_IDENTIFIER_PATTERN = r"([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])"
+PEP508_IDENTIFIER_REGEX = re.compile(f"^{PEP508_IDENTIFIER_PATTERN}$", re.I)
+
+
+def pep508_identifier(name: str) -> bool:
+    """See :ref:`PyPA's name specification `
+    (initially introduced in :pep:`508#names`).
+    """
+    return PEP508_IDENTIFIER_REGEX.match(name) is not None
+
+
+try:
+    try:
+        from packaging import requirements as _req
+    except ImportError:  # pragma: no cover
+        # let's try setuptools vendored version
+        from setuptools._vendor.packaging import (  # type: ignore[no-redef]
+            requirements as _req,
+        )
+
+    def pep508(value: str) -> bool:
+        """See :ref:`PyPA's dependency specifiers `
+        (initially introduced in :pep:`508`).
+        """
+        try:
+            _req.Requirement(value)
+            return True
+        except _req.InvalidRequirement:
+            return False
+
+except ImportError:  # pragma: no cover
+    _logger.warning(
+        "Could not find an installation of `packaging`. Requirements, dependencies and "
+        "versions might not be validated. "
+        "To enforce validation, please install `packaging`."
+    )
+
+    def pep508(value: str) -> bool:
+        return True
+
+
+def pep508_versionspec(value: str) -> bool:
+    """Expression that can be used to specify/lock versions (including ranges)
+    See ``versionspec`` in :ref:`PyPA's dependency specifiers
+    ` (initially introduced in :pep:`508`).
+    """
+    if any(c in value for c in (";", "]", "@")):
+        # In PEP 508:
+        # conditional markers, extras and URL specs are not included in the
+        # versionspec
+        return False
+    # Let's pretend we have a dependency called `requirement` with the given
+    # version spec, then we can reuse the pep508 function for validation:
+    return pep508(f"requirement{value}")
+
+
+# -------------------------------------------------------------------------------------
+# PEP 517
+
+
+def pep517_backend_reference(value: str) -> bool:
+    """See PyPA's specification for defining build-backend references
+    introduced in :pep:`517#source-trees`.
+
+    This is similar to an entry-point reference (e.g., ``package.module:object``).
+    """
+    module, _, obj = value.partition(":")
+    identifiers = (i.strip() for i in _chain(module.split("."), obj.split(".")))
+    return all(python_identifier(i) for i in identifiers if i)
+
+
+# -------------------------------------------------------------------------------------
+# Classifiers - PEP 301
+
+
+def _download_classifiers() -> str:
+    import ssl
+    from email.message import Message
+    from urllib.request import urlopen
+
+    url = "https://pypi.org/pypi?:action=list_classifiers"
+    context = ssl.create_default_context()
+    with urlopen(url, context=context) as response:  # noqa: S310 (audit URLs)
+        headers = Message()
+        headers["content_type"] = response.getheader("content-type", "text/plain")
+        return response.read().decode(headers.get_param("charset", "utf-8"))  # type: ignore[no-any-return]
+
+
+class _TroveClassifier:
+    """The ``trove_classifiers`` package is the official way of validating classifiers,
+    however this package might not be always available.
+    As a workaround we can still download a list from PyPI.
+    We also don't want to be over strict about it, so simply skipping silently is an
+    option (classifiers will be validated anyway during the upload to PyPI).
+    """
+
+    downloaded: typing.Union[None, "Literal[False]", typing.Set[str]]
+    """
+    None => not cached yet
+    False => unavailable
+    set => cached values
+    """
+
+    def __init__(self) -> None:
+        self.downloaded = None
+        self._skip_download = False
+        self.__name__ = "trove_classifier"  # Emulate a public function
+
+    def _disable_download(self) -> None:
+        # This is a private API. Only setuptools has the consent of using it.
+        self._skip_download = True
+
+    def __call__(self, value: str) -> bool:
+        if self.downloaded is False or self._skip_download is True:
+            return True
+
+        if os.getenv("NO_NETWORK") or os.getenv("VALIDATE_PYPROJECT_NO_NETWORK"):
+            self.downloaded = False
+            msg = (
+                "Install ``trove-classifiers`` to ensure proper validation. "
+                "Skipping download of classifiers list from PyPI (NO_NETWORK)."
+            )
+            _logger.debug(msg)
+            return True
+
+        if self.downloaded is None:
+            msg = (
+                "Install ``trove-classifiers`` to ensure proper validation. "
+                "Meanwhile a list of classifiers will be downloaded from PyPI."
+            )
+            _logger.debug(msg)
+            try:
+                self.downloaded = set(_download_classifiers().splitlines())
+            except Exception:
+                self.downloaded = False
+                _logger.debug("Problem with download, skipping validation")
+                return True
+
+        return value in self.downloaded or value.lower().startswith("private ::")
+
+
+try:
+    from trove_classifiers import classifiers as _trove_classifiers
+
+    def trove_classifier(value: str) -> bool:
+        """See https://pypi.org/classifiers/"""
+        return value in _trove_classifiers or value.lower().startswith("private ::")
+
+except ImportError:  # pragma: no cover
+    trove_classifier = _TroveClassifier()
+
+
+# -------------------------------------------------------------------------------------
+# Stub packages - PEP 561
+
+
+def pep561_stub_name(value: str) -> bool:
+    """Name of a directory containing type stubs.
+    It must follow the name scheme ``-stubs`` as defined in
+    :pep:`561#stub-only-packages`.
+    """
+    top, *children = value.split(".")
+    if not top.endswith("-stubs"):
+        return False
+    return python_module_name(".".join([top[: -len("-stubs")], *children]))
+
+
+# -------------------------------------------------------------------------------------
+# Non-PEP related
+
+
+def url(value: str) -> bool:
+    """Valid URL (validation uses :obj:`urllib.parse`).
+    For maximum compatibility please make sure to include a ``scheme`` prefix
+    in your URL (e.g. ``http://``).
+    """
+    from urllib.parse import urlparse
+
+    try:
+        parts = urlparse(value)
+        if not parts.scheme:
+            _logger.warning(
+                "For maximum compatibility please make sure to include a "
+                "`scheme` prefix in your URL (e.g. 'http://'). "
+                f"Given value: {value}"
+            )
+            if not (value.startswith("/") or value.startswith("\\") or "@" in value):
+                parts = urlparse(f"http://{value}")
+
+        return bool(parts.scheme and parts.netloc)
+    except Exception:
+        return False
+
+
+# https://packaging.python.org/specifications/entry-points/
+ENTRYPOINT_PATTERN = r"[^\[\s=]([^=]*[^\s=])?"
+ENTRYPOINT_REGEX = re.compile(f"^{ENTRYPOINT_PATTERN}$", re.I)
+RECOMMEDED_ENTRYPOINT_PATTERN = r"[\w.-]+"
+RECOMMEDED_ENTRYPOINT_REGEX = re.compile(f"^{RECOMMEDED_ENTRYPOINT_PATTERN}$", re.I)
+ENTRYPOINT_GROUP_PATTERN = r"\w+(\.\w+)*"
+ENTRYPOINT_GROUP_REGEX = re.compile(f"^{ENTRYPOINT_GROUP_PATTERN}$", re.I)
+
+
+def python_identifier(value: str) -> bool:
+    """Can be used as identifier in Python.
+    (Validation uses :obj:`str.isidentifier`).
+    """
+    return value.isidentifier()
+
+
+def python_qualified_identifier(value: str) -> bool:
+    """
+    Python "dotted identifier", i.e. a sequence of :obj:`python_identifier`
+    concatenated with ``"."`` (e.g.: ``package.module.submodule``).
+    """
+    if value.startswith(".") or value.endswith("."):
+        return False
+    return all(python_identifier(m) for m in value.split("."))
+
+
+def python_module_name(value: str) -> bool:
+    """Module name that can be used in an ``import``-statement in Python.
+    See :obj:`python_qualified_identifier`.
+    """
+    return python_qualified_identifier(value)
+
+
+def python_module_name_relaxed(value: str) -> bool:
+    """Similar to :obj:`python_module_name`, but relaxed to also accept
+    dash characters (``-``) and cover special cases like ``pip-run``.
+
+    It is recommended, however, that beginners avoid dash characters,
+    as they require advanced knowledge about Python internals.
+
+    The following are disallowed:
+
+    * names starting/ending in dashes,
+    * names ending in ``-stubs`` (potentially collide with :obj:`pep561_stub_name`).
+    """
+    if value.startswith("-") or value.endswith("-"):
+        return False
+    if value.endswith("-stubs"):
+        return False  # Avoid collision with PEP 561
+    return python_module_name(value.replace("-", "_"))
+
+
+def python_entrypoint_group(value: str) -> bool:
+    """See ``Data model > group`` in the :ref:`PyPA's entry-points specification
+    `.
+    """
+    return ENTRYPOINT_GROUP_REGEX.match(value) is not None
+
+
+def python_entrypoint_name(value: str) -> bool:
+    """See ``Data model > name`` in the :ref:`PyPA's entry-points specification
+    `.
+    """
+    if not ENTRYPOINT_REGEX.match(value):
+        return False
+    if not RECOMMEDED_ENTRYPOINT_REGEX.match(value):
+        msg = f"Entry point `{value}` does not follow recommended pattern: "
+        msg += RECOMMEDED_ENTRYPOINT_PATTERN
+        _logger.warning(msg)
+    return True
+
+
+def python_entrypoint_reference(value: str) -> bool:
+    """Reference to a Python object using in the format::
+
+        importable.module:object.attr
+
+    See ``Data model >object reference`` in the :ref:`PyPA's entry-points specification
+    `.
+    """
+    module, _, rest = value.partition(":")
+    if "[" in rest:
+        obj, _, extras_ = rest.partition("[")
+        if extras_.strip()[-1] != "]":
+            return False
+        extras = (x.strip() for x in extras_.strip(string.whitespace + "[]").split(","))
+        if not all(pep508_identifier(e) for e in extras):
+            return False
+        _logger.warning(f"`{value}` - using extras for entry points is not recommended")
+    else:
+        obj = rest
+
+    module_parts = module.split(".")
+    identifiers = _chain(module_parts, obj.split(".")) if rest else iter(module_parts)
+    return all(python_identifier(i.strip()) for i in identifiers)
+
+
+def uint8(value: builtins.int) -> bool:
+    r"""Unsigned 8-bit integer (:math:`0 \leq x < 2^8`)"""
+    return 0 <= value < 2**8
+
+
+def uint16(value: builtins.int) -> bool:
+    r"""Unsigned 16-bit integer (:math:`0 \leq x < 2^{16}`)"""
+    return 0 <= value < 2**16
+
+
+def uint(value: builtins.int) -> bool:
+    r"""Unsigned 64-bit integer (:math:`0 \leq x < 2^{64}`)"""
+    return 0 <= value < 2**64
+
+
+def int(value: builtins.int) -> bool:
+    r"""Signed 64-bit integer (:math:`-2^{63} \leq x < 2^{63}`)"""
+    return -(2**63) <= value < 2**63
+
+
+try:
+    from packaging import licenses as _licenses
+
+    def SPDX(value: str) -> bool:
+        """See :ref:`PyPA's License-Expression specification
+        ` (added in :pep:`639`).
+        """
+        try:
+            _licenses.canonicalize_license_expression(value)
+            return True
+        except _licenses.InvalidLicenseExpression:
+            return False
+
+except ImportError:  # pragma: no cover
+    _logger.warning(
+        "Could not find an up-to-date installation of `packaging`. "
+        "License expressions might not be validated. "
+        "To enforce validation, please install `packaging>=24.2`."
+    )
+
+    def SPDX(value: str) -> bool:
+        return True
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..87f277741ccc4d27695a7da656b5f574097a02ed
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/__init__.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/contexts.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/contexts.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b768049761c7b682f8a314c98c5180d3be5c978b
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/contexts.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/environment.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/environment.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a46edf049ff51537140e60d5519322d1d4006d40
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/environment.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/fixtures.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/fixtures.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e1e6f90f8b5dde63e1c785cf929e82d946926750
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/fixtures.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/mod_with_constant.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/mod_with_constant.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..dade20a0f236915499e845f30643ae3f832a0a19
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/mod_with_constant.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/namespaces.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/namespaces.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cf72d26b03d8f1dbab25eb5dd603c5b6bb10dfc7
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/namespaces.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/script-with-bom.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/script-with-bom.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b20615795c65bca3855cd29f77b8aad6b95bc969
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/script-with-bom.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_archive_util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_archive_util.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..08fbbe611eecf14b70585724f3d86b38b6ec61bf
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_archive_util.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_deprecations.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_deprecations.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..517c5bab6da47548be0b11604aa20ee928a5b01d
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_deprecations.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_egg.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_egg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..449174471c2cc56b88b8f3b9812f1c20b1bd7fd9
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_egg.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_wheel.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_wheel.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..1c2ee1797e6cb982adb84016ed86d034a8ad96be
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_bdist_wheel.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a1cdf4da80979c1022099791bf017e36c7cef2ca
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_clib.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_clib.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..91a2de12126f1bb822f1ba7fdf159949b79e0a89
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_clib.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_ext.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_ext.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..578085cc7bca031ba47333dcd4ab80e7261a88d6
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_ext.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_meta.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_meta.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ccd32c7f810c545a8ba8c500548b508c3a0b6445
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_meta.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_py.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_py.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a2cde664f99c4b861b34cb3815734e145528c365
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_build_py.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_config_discovery.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_config_discovery.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c06d447c59648b523316eec6dd53e6b27bc64a89
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_config_discovery.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_core_metadata.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_core_metadata.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2f355e0983fed7410076e4f9e591241ffa301a6a
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_core_metadata.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_depends.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_depends.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a84140264dffc1668f871c34904cdc5a6e238f73
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_depends.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_develop.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_develop.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c8da7d8d3be79ffc8513b3ad55ec1164aaa00afc
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_develop.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_dist.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_dist.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2301e2bff1a3b4ede933a773d36d5429cfa5f413
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_dist.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_dist_info.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_dist_info.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b131264629f4c54b8c768eb84e52a20aad42ea96
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_dist_info.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_distutils_adoption.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_distutils_adoption.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..888f536c1ee67b607f3144c7ab919d42c0ecc8c3
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_distutils_adoption.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_editable_install.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_editable_install.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5a599b02532255968a4bd2a53312189a143df283
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_editable_install.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_egg_info.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_egg_info.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cc2a6da7777fb02b0572ab3bea2ece17344459fa
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_egg_info.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_extern.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_extern.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4ef041f3405cb70934e60b6829229976ac8191eb
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_extern.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_find_packages.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_find_packages.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..57e339d10ff3b48be0762828339e0b8e17dfdc4f
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_find_packages.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_find_py_modules.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_find_py_modules.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..cfbad1bc14762281980fd3b64b99247cda76bf5a
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_find_py_modules.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_glob.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_glob.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d2e2f3b3a3fa66e47a91b57075ad064d0ef0be03
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_glob.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_install_scripts.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_install_scripts.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..850a55774b3722f7cfebdefc2c69d2d7013f9db9
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_install_scripts.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_logging.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_logging.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c3eec7bc8d3fb08cf6024b70d11f3386a02b4908
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_logging.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_manifest.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_manifest.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..d51e764ebf9f341e26bbf63bd7517e1beea52940
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_manifest.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_namespaces.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_namespaces.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..ffe3a55e76ba1aa4e4e2c67076968b569f1a4e29
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_namespaces.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_scripts.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_scripts.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f48b38123c7eaaa63b771de1d7ad82f167d7aad1
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_scripts.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_sdist.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_sdist.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..2944236bb6f843d4e7eec96b3b86a1a8a3a459db
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_sdist.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_setopt.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_setopt.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..6f74f1fdbf97dee5aa237e0e3b3a0a307e033131
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_setopt.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_setuptools.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_setuptools.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e5765ee71e2283d15f671dec66b7eca1146ff6a4
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_setuptools.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_shutil_wrapper.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_shutil_wrapper.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0afb2f4e8b829e30c500d4d062dd74d78c5099a6
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_shutil_wrapper.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_unicode_utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_unicode_utils.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9f68dc72949a839f53ee5ad360c22c904b3e2603
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_unicode_utils.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_virtualenv.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_virtualenv.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c54316237ca18bd7e37d005909d0d2c22dddf7fd
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_virtualenv.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_warnings.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_warnings.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..4b028495085c7c88d17a493503230e73aec565d9
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_warnings.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_wheel.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_wheel.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..810a5e760b599ca9e4abb92cc44fe315f50ba4a1
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_wheel.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_windows_wrappers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_windows_wrappers.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5981d540b686a034c815170f4eb2ff6f5b5c6280
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/test_windows_wrappers.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/text.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/text.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5dace75a9ca9cac233098f8d3ac744af665fddb6
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/text.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/textwrap.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/textwrap.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..5ca5620b597e356c9028ff5103db00e435576e67
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/__pycache__/textwrap.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..c2f7e22488d70e2a6192c2410c525a356770012a
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/__pycache__/__init__.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/__pycache__/py39.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/__pycache__/py39.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..33cc8dcaa5bbec9f77b4df585b1b23463ad1e6bd
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/__pycache__/py39.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/py39.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/py39.py
new file mode 100644
index 0000000000000000000000000000000000000000..1fdb9dac1fa3f121a634082515d1a305fc09793c
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/compat/py39.py
@@ -0,0 +1,3 @@
+from jaraco.test.cpython import from_test_support, try_import
+
+os_helper = try_import('os_helper') or from_test_support('can_symlink')
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..b7152b43d907eb07738a96c51c69f6cb635609fd
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/__init__.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_apply_pyprojecttoml.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_apply_pyprojecttoml.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9cb93f226863113fcb37d78ba4e8aaa9d1f94c23
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_apply_pyprojecttoml.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_expand.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_expand.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..a25fc74c874ff5049a2276582787266b701aeb27
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_expand.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_pyprojecttoml.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_pyprojecttoml.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..16d3e3bde73899678b73f8c534948dcfcc071b83
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_pyprojecttoml.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_pyprojecttoml_dynamic_deps.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_pyprojecttoml_dynamic_deps.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..9964a45c14860f41546d507eff3adbba9dcbbd55
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_pyprojecttoml_dynamic_deps.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_setupcfg.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_setupcfg.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..f8ce13d651e7d5178e1b678fa0967c6e3b063683
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/__pycache__/test_setupcfg.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..00a16423f448e7773f5e6dc9b365efe80f40a778
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__init__.py
@@ -0,0 +1,59 @@
+from __future__ import annotations
+
+import re
+import time
+from pathlib import Path
+from urllib.error import HTTPError
+from urllib.request import urlopen
+
+__all__ = ["DOWNLOAD_DIR", "retrieve_file", "output_file", "urls_from_file"]
+
+
+NAME_REMOVE = ("http://", "https://", "github.com/", "/raw/")
+DOWNLOAD_DIR = Path(__file__).parent
+
+
+# ----------------------------------------------------------------------
+# Please update ./preload.py accordingly when modifying this file
+# ----------------------------------------------------------------------
+
+
+def output_file(url: str, download_dir: Path = DOWNLOAD_DIR) -> Path:
+    file_name = url.strip()
+    for part in NAME_REMOVE:
+        file_name = file_name.replace(part, '').strip().strip('/:').strip()
+    return Path(download_dir, re.sub(r"[^\-_\.\w\d]+", "_", file_name))
+
+
+def retrieve_file(url: str, download_dir: Path = DOWNLOAD_DIR, wait: float = 5) -> Path:
+    path = output_file(url, download_dir)
+    if path.exists():
+        print(f"Skipping {url} (already exists: {path})")
+    else:
+        download_dir.mkdir(exist_ok=True, parents=True)
+        print(f"Downloading {url} to {path}")
+        try:
+            download(url, path)
+        except HTTPError:
+            time.sleep(wait)  # wait a few seconds and try again.
+            download(url, path)
+    return path
+
+
+def urls_from_file(list_file: Path) -> list[str]:
+    """``list_file`` should be a text file where each line corresponds to a URL to
+    download.
+    """
+    print(f"file: {list_file}")
+    content = list_file.read_text(encoding="utf-8")
+    return [url for url in content.splitlines() if not url.startswith("#")]
+
+
+def download(url: str, dest: Path):
+    with urlopen(url) as f:
+        data = f.read()
+
+    with open(dest, "wb") as f:
+        f.write(data)
+
+    assert Path(dest).exists()
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__pycache__/__init__.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..0ec502d39552cbd88302cdf3e8c33fc5cc54d4a1
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__pycache__/__init__.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__pycache__/preload.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__pycache__/preload.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..25b08ef5ae366bd5dc0635c41f473d7f0a1c0424
Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/__pycache__/preload.cpython-312.pyc differ
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/preload.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/preload.py
new file mode 100644
index 0000000000000000000000000000000000000000..8eeb5dd75d3dcb375cee5acaf11ad385084bff5a
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/downloads/preload.py
@@ -0,0 +1,18 @@
+"""This file can be used to preload files needed for testing.
+
+For example you can use::
+
+    cd setuptools/tests/config
+    python -m downloads.preload setupcfg_examples.txt
+
+to make sure the `setup.cfg` examples are downloaded before starting the tests.
+"""
+
+import sys
+from pathlib import Path
+
+from . import retrieve_file, urls_from_file
+
+if __name__ == "__main__":
+    urls = urls_from_file(Path(sys.argv[1]))
+    list(map(retrieve_file, urls))
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/setupcfg_examples.txt b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/setupcfg_examples.txt
new file mode 100644
index 0000000000000000000000000000000000000000..6aab887ff1fe631d97f1abea90a8448040746a12
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/setupcfg_examples.txt
@@ -0,0 +1,22 @@
+# ====================================================================
+# Some popular packages that use setup.cfg (and others not so popular)
+# Reference: https://hugovk.github.io/top-pypi-packages/
+# ====================================================================
+https://github.com/pypa/setuptools/raw/52c990172fec37766b3566679724aa8bf70ae06d/setup.cfg
+https://github.com/pypa/wheel/raw/0acd203cd896afec7f715aa2ff5980a403459a3b/setup.cfg
+https://github.com/python/importlib_metadata/raw/2f05392ca980952a6960d82b2f2d2ea10aa53239/setup.cfg
+https://github.com/jaraco/skeleton/raw/d9008b5c510cd6969127a6a2ab6f832edddef296/setup.cfg
+https://github.com/jaraco/zipp/raw/700d3a96390e970b6b962823bfea78b4f7e1c537/setup.cfg
+https://github.com/pallets/jinja/raw/7d72eb7fefb7dce065193967f31f805180508448/setup.cfg
+https://github.com/tkem/cachetools/raw/2fd87a94b8d3861d80e9e4236cd480bfdd21c90d/setup.cfg
+https://github.com/aio-libs/aiohttp/raw/5e0e6b7080f2408d5f1dd544c0e1cf88378b7b10/setup.cfg
+https://github.com/pallets/flask/raw/9486b6cf57bd6a8a261f67091aca8ca78eeec1e3/setup.cfg
+https://github.com/pallets/click/raw/6411f425fae545f42795665af4162006b36c5e4a/setup.cfg
+https://github.com/sqlalchemy/sqlalchemy/raw/533f5718904b620be8d63f2474229945d6f8ba5d/setup.cfg
+https://github.com/pytest-dev/pluggy/raw/461ef63291d13589c4e21aa182cd1529257e9a0a/setup.cfg
+https://github.com/pytest-dev/pytest/raw/c7be96dae487edbd2f55b561b31b68afac1dabe6/setup.cfg
+https://github.com/platformdirs/platformdirs/raw/7b7852128dd6f07511b618d6edea35046bd0c6ff/setup.cfg
+https://github.com/pandas-dev/pandas/raw/bc17343f934a33dc231c8c74be95d8365537c376/setup.cfg
+https://github.com/django/django/raw/4e249d11a6e56ca8feb4b055b681cec457ef3a3d/setup.cfg
+https://github.com/pyscaffold/pyscaffold/raw/de7aa5dc059fbd04307419c667cc4961bc9df4b8/setup.cfg
+https://github.com/pypa/virtualenv/raw/f92eda6e3da26a4d28c2663ffb85c4960bdb990c/setup.cfg
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_apply_pyprojecttoml.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_apply_pyprojecttoml.py
new file mode 100644
index 0000000000000000000000000000000000000000..8f48c4316d9e9c3d09fe2abda9bd4aab63d90355
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_apply_pyprojecttoml.py
@@ -0,0 +1,774 @@
+"""Make sure that applying the configuration from pyproject.toml is equivalent to
+applying a similar configuration from setup.cfg
+
+To run these tests offline, please have a look on ``./downloads/preload.py``
+"""
+
+from __future__ import annotations
+
+import io
+import re
+import tarfile
+from inspect import cleandoc
+from pathlib import Path
+from unittest.mock import Mock
+
+import pytest
+from ini2toml.api import LiteTranslator
+from packaging.metadata import Metadata
+
+import setuptools  # noqa: F401 # ensure monkey patch to metadata
+from setuptools._static import is_static
+from setuptools.command.egg_info import write_requirements
+from setuptools.config import expand, pyprojecttoml, setupcfg
+from setuptools.config._apply_pyprojecttoml import _MissingDynamic, _some_attrgetter
+from setuptools.dist import Distribution
+from setuptools.errors import InvalidConfigError, RemovedConfigError
+from setuptools.warnings import InformationOnly, SetuptoolsDeprecationWarning
+
+from .downloads import retrieve_file, urls_from_file
+
+HERE = Path(__file__).parent
+EXAMPLES_FILE = "setupcfg_examples.txt"
+
+
+def makedist(path, **attrs):
+    return Distribution({"src_root": path, **attrs})
+
+
+def _mock_expand_patterns(patterns, *_, **__):
+    """
+    Allow comparing the given patterns for 2 dist objects.
+    We need to strip special chars to avoid errors when validating.
+    """
+    return [
+        re.sub("[^a-z0-9]+", "", p, flags=re.IGNORECASE) or "empty" for p in patterns
+    ]
+
+
+@pytest.mark.parametrize("url", urls_from_file(HERE / EXAMPLES_FILE))
+@pytest.mark.filterwarnings("ignore")
+@pytest.mark.uses_network
+def test_apply_pyproject_equivalent_to_setupcfg(url, monkeypatch, tmp_path):
+    monkeypatch.setattr(expand, "read_attr", Mock(return_value="0.0.1"))
+    monkeypatch.setattr(
+        Distribution, "_expand_patterns", Mock(side_effect=_mock_expand_patterns)
+    )
+    setupcfg_example = retrieve_file(url)
+    pyproject_example = Path(tmp_path, "pyproject.toml")
+    setupcfg_text = setupcfg_example.read_text(encoding="utf-8")
+    toml_config = LiteTranslator().translate(setupcfg_text, "setup.cfg")
+    pyproject_example.write_text(toml_config, encoding="utf-8")
+
+    dist_toml = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject_example)
+    dist_cfg = setupcfg.apply_configuration(makedist(tmp_path), setupcfg_example)
+
+    pkg_info_toml = core_metadata(dist_toml)
+    pkg_info_cfg = core_metadata(dist_cfg)
+    assert pkg_info_toml == pkg_info_cfg
+
+    if any(getattr(d, "license_files", None) for d in (dist_toml, dist_cfg)):
+        assert set(dist_toml.license_files) == set(dist_cfg.license_files)
+
+    if any(getattr(d, "entry_points", None) for d in (dist_toml, dist_cfg)):
+        print(dist_cfg.entry_points)
+        ep_toml = {
+            (k, *sorted(i.replace(" ", "") for i in v))
+            for k, v in dist_toml.entry_points.items()
+        }
+        ep_cfg = {
+            (k, *sorted(i.replace(" ", "") for i in v))
+            for k, v in dist_cfg.entry_points.items()
+        }
+        assert ep_toml == ep_cfg
+
+    if any(getattr(d, "package_data", None) for d in (dist_toml, dist_cfg)):
+        pkg_data_toml = {(k, *sorted(v)) for k, v in dist_toml.package_data.items()}
+        pkg_data_cfg = {(k, *sorted(v)) for k, v in dist_cfg.package_data.items()}
+        assert pkg_data_toml == pkg_data_cfg
+
+    if any(getattr(d, "data_files", None) for d in (dist_toml, dist_cfg)):
+        data_files_toml = {(k, *sorted(v)) for k, v in dist_toml.data_files}
+        data_files_cfg = {(k, *sorted(v)) for k, v in dist_cfg.data_files}
+        assert data_files_toml == data_files_cfg
+
+    assert set(dist_toml.install_requires) == set(dist_cfg.install_requires)
+    if any(getattr(d, "extras_require", None) for d in (dist_toml, dist_cfg)):
+        extra_req_toml = {(k, *sorted(v)) for k, v in dist_toml.extras_require.items()}
+        extra_req_cfg = {(k, *sorted(v)) for k, v in dist_cfg.extras_require.items()}
+        assert extra_req_toml == extra_req_cfg
+
+
+PEP621_EXAMPLE = """\
+[project]
+name = "spam"
+version = "2020.0.0"
+description = "Lovely Spam! Wonderful Spam!"
+readme = "README.rst"
+requires-python = ">=3.8"
+license-files = ["LICENSE.txt"]  # Updated to be PEP 639 compliant
+keywords = ["egg", "bacon", "sausage", "tomatoes", "Lobster Thermidor"]
+authors = [
+  {email = "hi@pradyunsg.me"},
+  {name = "Tzu-Ping Chung"}
+]
+maintainers = [
+  {name = "Brett Cannon", email = "brett@python.org"},
+  {name = "John X. Ãørçeč", email = "john@utf8.org"},
+  {name = "Γαμα קּ 東", email = "gama@utf8.org"},
+]
+classifiers = [
+  "Development Status :: 4 - Beta",
+  "Programming Language :: Python"
+]
+
+dependencies = [
+  "httpx",
+  "gidgethub[httpx]>4.0.0",
+  "django>2.1; os_name != 'nt'",
+  "django>2.0; os_name == 'nt'"
+]
+
+[project.optional-dependencies]
+test = [
+  "pytest < 5.0.0",
+  "pytest-cov[all]"
+]
+
+[project.urls]
+homepage = "http://example.com"
+documentation = "http://readthedocs.org"
+repository = "http://github.com"
+changelog = "http://github.com/me/spam/blob/master/CHANGELOG.md"
+
+[project.scripts]
+spam-cli = "spam:main_cli"
+
+[project.gui-scripts]
+spam-gui = "spam:main_gui"
+
+[project.entry-points."spam.magical"]
+tomatoes = "spam:main_tomatoes"
+"""
+
+PEP621_INTERNATIONAL_EMAIL_EXAMPLE = """\
+[project]
+name = "spam"
+version = "2020.0.0"
+authors = [
+  {email = "hi@pradyunsg.me"},
+  {name = "Tzu-Ping Chung"}
+]
+maintainers = [
+  {name = "अंकित अहलावत", email = "ankit@example.com"},
+]
+"""
+
+PEP621_EXAMPLE_SCRIPT = """
+def main_cli(): pass
+def main_gui(): pass
+def main_tomatoes(): pass
+"""
+
+PEP639_LICENSE_TEXT = """\
+[project]
+name = "spam"
+version = "2020.0.0"
+authors = [
+  {email = "hi@pradyunsg.me"},
+  {name = "Tzu-Ping Chung"}
+]
+license = {text = "MIT"}
+"""
+
+PEP639_LICENSE_EXPRESSION = """\
+[project]
+name = "spam"
+version = "2020.0.0"
+authors = [
+  {email = "hi@pradyunsg.me"},
+  {name = "Tzu-Ping Chung"}
+]
+license = "mit or apache-2.0"  # should be normalized in metadata
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Programming Language :: Python",
+]
+"""
+
+
+def _pep621_example_project(
+    tmp_path,
+    readme="README.rst",
+    pyproject_text=PEP621_EXAMPLE,
+):
+    pyproject = tmp_path / "pyproject.toml"
+    text = pyproject_text
+    replacements = {'readme = "README.rst"': f'readme = "{readme}"'}
+    for orig, subst in replacements.items():
+        text = text.replace(orig, subst)
+    pyproject.write_text(text, encoding="utf-8")
+
+    (tmp_path / readme).write_text("hello world", encoding="utf-8")
+    (tmp_path / "LICENSE.txt").write_text("--- LICENSE stub ---", encoding="utf-8")
+    (tmp_path / "spam.py").write_text(PEP621_EXAMPLE_SCRIPT, encoding="utf-8")
+    return pyproject
+
+
+def test_pep621_example(tmp_path):
+    """Make sure the example in PEP 621 works"""
+    pyproject = _pep621_example_project(tmp_path)
+    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+    assert set(dist.metadata.license_files) == {"LICENSE.txt"}
+
+
+@pytest.mark.parametrize(
+    ("readme", "ctype"),
+    [
+        ("Readme.txt", "text/plain"),
+        ("readme.md", "text/markdown"),
+        ("text.rst", "text/x-rst"),
+    ],
+)
+def test_readme_content_type(tmp_path, readme, ctype):
+    pyproject = _pep621_example_project(tmp_path, readme)
+    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+    assert dist.metadata.long_description_content_type == ctype
+
+
+def test_undefined_content_type(tmp_path):
+    pyproject = _pep621_example_project(tmp_path, "README.tex")
+    with pytest.raises(ValueError, match="Undefined content type for README.tex"):
+        pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+
+def test_no_explicit_content_type_for_missing_extension(tmp_path):
+    pyproject = _pep621_example_project(tmp_path, "README")
+    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+    assert dist.metadata.long_description_content_type is None
+
+
+@pytest.mark.parametrize(
+    ("pyproject_text", "expected_maintainers_meta_value"),
+    (
+        pytest.param(
+            PEP621_EXAMPLE,
+            (
+                'Brett Cannon , "John X. Ãørçeč" , '
+                'Γαμα קּ 東 '
+            ),
+            id='non-international-emails',
+        ),
+        pytest.param(
+            PEP621_INTERNATIONAL_EMAIL_EXAMPLE,
+            'Ankit Ahlawat <अंकित@उदाहरण.भारत>',
+            marks=pytest.mark.xfail(
+                reason="CPython's `email.headerregistry.Address` only supports "
+                'RFC 5322, as of Oct 20, 2025 and latest Python 3.13.0',
+                strict=True,
+            ),
+            id='international-email',
+        ),
+    ),
+)
+def test_utf8_maintainer_in_metadata(  # issue-3663
+    expected_maintainers_meta_value,
+    pyproject_text,
+    tmp_path,
+):
+    pyproject = _pep621_example_project(
+        tmp_path,
+        "README",
+        pyproject_text=pyproject_text,
+    )
+    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+    assert dist.metadata.maintainer_email == expected_maintainers_meta_value
+    pkg_file = tmp_path / "PKG-FILE"
+    with open(pkg_file, "w", encoding="utf-8") as fh:
+        dist.metadata.write_pkg_file(fh)
+    content = pkg_file.read_text(encoding="utf-8")
+    assert f"Maintainer-email: {expected_maintainers_meta_value}" in content
+
+
+@pytest.mark.parametrize(
+    (
+        'pyproject_text',
+        'license',
+        'license_expression',
+        'content_str',
+        'not_content_str',
+    ),
+    (
+        pytest.param(
+            PEP639_LICENSE_TEXT,
+            'MIT',
+            None,
+            'License: MIT',
+            'License-Expression: ',
+            id='license-text',
+            marks=[
+                pytest.mark.filterwarnings(
+                    "ignore:.project.license. as a TOML table is deprecated",
+                )
+            ],
+        ),
+        pytest.param(
+            PEP639_LICENSE_EXPRESSION,
+            None,
+            'MIT OR Apache-2.0',
+            'License-Expression: MIT OR Apache-2.0',
+            'License: ',
+            id='license-expression',
+        ),
+    ),
+)
+def test_license_in_metadata(
+    license,
+    license_expression,
+    content_str,
+    not_content_str,
+    pyproject_text,
+    tmp_path,
+):
+    pyproject = _pep621_example_project(
+        tmp_path,
+        "README",
+        pyproject_text=pyproject_text,
+    )
+    dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+    assert dist.metadata.license == license
+    assert dist.metadata.license_expression == license_expression
+    pkg_file = tmp_path / "PKG-FILE"
+    with open(pkg_file, "w", encoding="utf-8") as fh:
+        dist.metadata.write_pkg_file(fh)
+    content = pkg_file.read_text(encoding="utf-8")
+    assert "Metadata-Version: 2.4" in content
+    assert content_str in content
+    assert not_content_str not in content
+
+
+def test_license_classifier_with_license_expression(tmp_path):
+    text = PEP639_LICENSE_EXPRESSION.rsplit("\n", 2)[0]
+    pyproject = _pep621_example_project(
+        tmp_path,
+        "README",
+        f"{text}\n    \"License :: OSI Approved :: MIT License\"\n]",
+    )
+    msg = "License classifiers have been superseded by license expressions"
+    with pytest.raises(InvalidConfigError, match=msg) as exc:
+        pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+    assert "License :: OSI Approved :: MIT License" in str(exc.value)
+
+
+def test_license_classifier_without_license_expression(tmp_path):
+    text = """\
+    [project]
+    name = "spam"
+    version = "2020.0.0"
+    license = {text = "mit or apache-2.0"}
+    classifiers = ["License :: OSI Approved :: MIT License"]
+    """
+    pyproject = _pep621_example_project(tmp_path, "README", text)
+
+    msg1 = "License classifiers are deprecated(?:.|\n)*MIT License"
+    msg2 = ".project.license. as a TOML table is deprecated"
+    with (
+        pytest.warns(SetuptoolsDeprecationWarning, match=msg1),
+        pytest.warns(SetuptoolsDeprecationWarning, match=msg2),
+    ):
+        dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+    # Check license classifier is still included
+    assert dist.metadata.get_classifiers() == ["License :: OSI Approved :: MIT License"]
+
+
+class TestLicenseFiles:
+    def base_pyproject(
+        self,
+        tmp_path,
+        additional_text="",
+        license_toml='license = {file = "LICENSE.txt"}\n',
+    ):
+        text = PEP639_LICENSE_EXPRESSION
+
+        # Sanity-check
+        assert 'license = "mit or apache-2.0"' in text
+        assert 'license-files' not in text
+        assert "[tool.setuptools]" not in text
+
+        text = re.sub(
+            r"(license = .*)\n",
+            license_toml,
+            text,
+            count=1,
+        )
+        assert license_toml in text  # sanity check
+        text = f"{text}\n{additional_text}\n"
+        pyproject = _pep621_example_project(tmp_path, "README", pyproject_text=text)
+        return pyproject
+
+    def base_pyproject_license_pep639(self, tmp_path, additional_text=""):
+        return self.base_pyproject(
+            tmp_path,
+            additional_text=additional_text,
+            license_toml='license = "licenseref-Proprietary"'
+            '\nlicense-files = ["_FILE*"]\n',
+        )
+
+    def test_both_license_and_license_files_defined(self, tmp_path):
+        setuptools_config = '[tool.setuptools]\nlicense-files = ["_FILE*"]'
+        pyproject = self.base_pyproject(tmp_path, setuptools_config)
+
+        (tmp_path / "_FILE.txt").touch()
+        (tmp_path / "_FILE.rst").touch()
+
+        # Would normally match the `license_files` patterns, but we want to exclude it
+        # by being explicit. On the other hand, contents should be added to `license`
+        license = tmp_path / "LICENSE.txt"
+        license.write_text("LicenseRef-Proprietary\n", encoding="utf-8")
+
+        msg1 = "'tool.setuptools.license-files' is deprecated in favor of 'project.license-files'"
+        msg2 = ".project.license. as a TOML table is deprecated"
+        with (
+            pytest.warns(SetuptoolsDeprecationWarning, match=msg1),
+            pytest.warns(SetuptoolsDeprecationWarning, match=msg2),
+        ):
+            dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+        assert set(dist.metadata.license_files) == {"_FILE.rst", "_FILE.txt"}
+        assert dist.metadata.license == "LicenseRef-Proprietary\n"
+
+    def test_both_license_and_license_files_defined_pep639(self, tmp_path):
+        # Set license and license-files
+        pyproject = self.base_pyproject_license_pep639(tmp_path)
+
+        (tmp_path / "_FILE.txt").touch()
+        (tmp_path / "_FILE.rst").touch()
+
+        msg = "Normalizing.*LicenseRef"
+        with pytest.warns(InformationOnly, match=msg):
+            dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+        assert set(dist.metadata.license_files) == {"_FILE.rst", "_FILE.txt"}
+        assert dist.metadata.license is None
+        assert dist.metadata.license_expression == "LicenseRef-Proprietary"
+
+    def test_license_files_defined_twice(self, tmp_path):
+        # Set project.license-files and tools.setuptools.license-files
+        setuptools_config = '[tool.setuptools]\nlicense-files = ["_FILE*"]'
+        pyproject = self.base_pyproject_license_pep639(tmp_path, setuptools_config)
+
+        msg = "'project.license-files' is defined already. Remove 'tool.setuptools.license-files'"
+        with pytest.raises(InvalidConfigError, match=msg):
+            pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+    def test_default_patterns(self, tmp_path):
+        setuptools_config = '[tool.setuptools]\nzip-safe = false'
+        # ^ used just to trigger section validation
+        pyproject = self.base_pyproject(tmp_path, setuptools_config, license_toml="")
+
+        license_files = "LICENCE-a.html COPYING-abc.txt AUTHORS-xyz NOTICE,def".split()
+
+        for fname in license_files:
+            (tmp_path / fname).write_text(f"{fname}\n", encoding="utf-8")
+
+        dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+        assert (tmp_path / "LICENSE.txt").exists()  # from base example
+        assert set(dist.metadata.license_files) == {*license_files, "LICENSE.txt"}
+
+    def test_missing_patterns(self, tmp_path):
+        pyproject = self.base_pyproject_license_pep639(tmp_path)
+        assert list(tmp_path.glob("_FILE*")) == []  # sanity check
+
+        msg1 = "Cannot find any files for the given pattern.*"
+        msg2 = "Normalizing 'licenseref-Proprietary' to 'LicenseRef-Proprietary'"
+        with (
+            pytest.warns(SetuptoolsDeprecationWarning, match=msg1),
+            pytest.warns(InformationOnly, match=msg2),
+        ):
+            pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+    def test_deprecated_file_expands_to_text(self, tmp_path):
+        """Make sure the old example with ``license = {text = ...}`` works"""
+
+        assert 'license-files = ["LICENSE.txt"]' in PEP621_EXAMPLE  # sanity check
+        text = PEP621_EXAMPLE.replace(
+            'license-files = ["LICENSE.txt"]',
+            'license = {file = "LICENSE.txt"}',
+        )
+        pyproject = _pep621_example_project(tmp_path, pyproject_text=text)
+
+        msg = ".project.license. as a TOML table is deprecated"
+        with pytest.warns(SetuptoolsDeprecationWarning, match=msg):
+            dist = pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+        assert dist.metadata.license == "--- LICENSE stub ---"
+        assert set(dist.metadata.license_files) == {"LICENSE.txt"}  # auto-filled
+
+
+class TestPyModules:
+    # https://github.com/pypa/setuptools/issues/4316
+
+    def dist(self, name):
+        toml_config = f"""
+        [project]
+        name = "test"
+        version = "42.0"
+        [tool.setuptools]
+        py-modules = [{name!r}]
+        """
+        pyproject = Path("pyproject.toml")
+        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
+        return pyprojecttoml.apply_configuration(Distribution({}), pyproject)
+
+    @pytest.mark.parametrize("module", ["pip-run", "abc-d.λ-xyz-e"])
+    def test_valid_module_name(self, tmp_path, monkeypatch, module):
+        monkeypatch.chdir(tmp_path)
+        assert module in self.dist(module).py_modules
+
+    @pytest.mark.parametrize("module", ["pip run", "-pip-run", "pip-run-stubs"])
+    def test_invalid_module_name(self, tmp_path, monkeypatch, module):
+        monkeypatch.chdir(tmp_path)
+        with pytest.raises(ValueError, match="py-modules"):
+            self.dist(module).py_modules
+
+
+class TestExtModules:
+    def test_pyproject_sets_attribute(self, tmp_path, monkeypatch):
+        monkeypatch.chdir(tmp_path)
+        pyproject = Path("pyproject.toml")
+        toml_config = """
+        [project]
+        name = "test"
+        version = "42.0"
+        [tool.setuptools]
+        ext-modules = [
+          {name = "my.ext", sources = ["hello.c", "world.c"]}
+        ]
+        """
+        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
+        with pytest.warns(pyprojecttoml._ExperimentalConfiguration):
+            dist = pyprojecttoml.apply_configuration(Distribution({}), pyproject)
+        assert len(dist.ext_modules) == 1
+        assert dist.ext_modules[0].name == "my.ext"
+        assert set(dist.ext_modules[0].sources) == {"hello.c", "world.c"}
+
+
+class TestDeprecatedFields:
+    def test_namespace_packages(self, tmp_path):
+        pyproject = tmp_path / "pyproject.toml"
+        config = """
+        [project]
+        name = "myproj"
+        version = "42"
+        [tool.setuptools]
+        namespace-packages = ["myproj.pkg"]
+        """
+        pyproject.write_text(cleandoc(config), encoding="utf-8")
+        with pytest.raises(RemovedConfigError, match="namespace-packages"):
+            pyprojecttoml.apply_configuration(makedist(tmp_path), pyproject)
+
+
+class TestPresetField:
+    def pyproject(self, tmp_path, dynamic, extra_content=""):
+        content = f"[project]\nname = 'proj'\ndynamic = {dynamic!r}\n"
+        if "version" not in dynamic:
+            content += "version = '42'\n"
+        file = tmp_path / "pyproject.toml"
+        file.write_text(content + extra_content, encoding="utf-8")
+        return file
+
+    @pytest.mark.parametrize(
+        ("attr", "field", "value"),
+        [
+            ("license_expression", "license", "MIT"),
+            pytest.param(
+                *("license", "license", "Not SPDX"),
+                marks=[pytest.mark.filterwarnings("ignore:.*license. overwritten")],
+            ),
+            ("classifiers", "classifiers", ["Private :: Classifier"]),
+            ("entry_points", "scripts", {"console_scripts": ["foobar=foobar:main"]}),
+            ("entry_points", "gui-scripts", {"gui_scripts": ["bazquux=bazquux:main"]}),
+            pytest.param(
+                *("install_requires", "dependencies", ["six"]),
+                marks=[
+                    pytest.mark.filterwarnings("ignore:.*install_requires. overwritten")
+                ],
+            ),
+        ],
+    )
+    def test_not_listed_in_dynamic(self, tmp_path, attr, field, value):
+        """Setuptools cannot set a field if not listed in ``dynamic``"""
+        pyproject = self.pyproject(tmp_path, [])
+        dist = makedist(tmp_path, **{attr: value})
+        msg = re.compile(f"defined outside of `pyproject.toml`:.*{field}", re.DOTALL)
+        with pytest.warns(_MissingDynamic, match=msg):
+            dist = pyprojecttoml.apply_configuration(dist, pyproject)
+
+        dist_value = _some_attrgetter(f"metadata.{attr}", attr)(dist)
+        assert not dist_value
+
+    @pytest.mark.parametrize(
+        ("attr", "field", "value"),
+        [
+            ("license_expression", "license", "MIT"),
+            ("install_requires", "dependencies", []),
+            ("extras_require", "optional-dependencies", {}),
+            ("install_requires", "dependencies", ["six"]),
+            ("classifiers", "classifiers", ["Private :: Classifier"]),
+        ],
+    )
+    def test_listed_in_dynamic(self, tmp_path, attr, field, value):
+        pyproject = self.pyproject(tmp_path, [field])
+        dist = makedist(tmp_path, **{attr: value})
+        dist = pyprojecttoml.apply_configuration(dist, pyproject)
+        dist_value = _some_attrgetter(f"metadata.{attr}", attr)(dist)
+        assert dist_value == value
+
+    def test_license_files_exempt_from_dynamic(self, monkeypatch, tmp_path):
+        """
+        license-file is currently not considered in the context of dynamic.
+        As per 2025-02-19, https://packaging.python.org/en/latest/specifications/pyproject-toml/#license-files
+        allows setuptools to fill-in `license-files` the way it sees fit:
+
+        > If the license-files key is not defined, tools can decide how to handle license files.
+        > For example they can choose not to include any files or use their own
+        > logic to discover the appropriate files in the distribution.
+
+        Using license_files from setup.py to fill-in the value is in accordance
+        with this rule.
+        """
+        monkeypatch.chdir(tmp_path)
+        pyproject = self.pyproject(tmp_path, [])
+        dist = makedist(tmp_path, license_files=["LIC*"])
+        (tmp_path / "LIC1").write_text("42", encoding="utf-8")
+        dist = pyprojecttoml.apply_configuration(dist, pyproject)
+        assert dist.metadata.license_files == ["LIC1"]
+
+    def test_warning_overwritten_dependencies(self, tmp_path):
+        src = "[project]\nname='pkg'\nversion='0.1'\ndependencies=['click']\n"
+        pyproject = tmp_path / "pyproject.toml"
+        pyproject.write_text(src, encoding="utf-8")
+        dist = makedist(tmp_path, install_requires=["wheel"])
+        with pytest.warns(match="`install_requires` overwritten"):
+            dist = pyprojecttoml.apply_configuration(dist, pyproject)
+        assert "wheel" not in dist.install_requires
+
+    def test_optional_dependencies_dont_remove_env_markers(self, tmp_path):
+        """
+        Internally setuptools converts dependencies with markers to "extras".
+        If ``install_requires`` is given by ``setup.py``, we have to ensure that
+        applying ``optional-dependencies`` does not overwrite the mandatory
+        dependencies with markers (see #3204).
+        """
+        # If setuptools replace its internal mechanism that uses `requires.txt`
+        # this test has to be rewritten to adapt accordingly
+        extra = "\n[project.optional-dependencies]\nfoo = ['bar>1']\n"
+        pyproject = self.pyproject(tmp_path, ["dependencies"], extra)
+        install_req = ['importlib-resources (>=3.0.0) ; python_version < "3.7"']
+        dist = makedist(tmp_path, install_requires=install_req)
+        dist = pyprojecttoml.apply_configuration(dist, pyproject)
+        assert "foo" in dist.extras_require
+        egg_info = dist.get_command_obj("egg_info")
+        write_requirements(egg_info, tmp_path, tmp_path / "requires.txt")
+        reqs = (tmp_path / "requires.txt").read_text(encoding="utf-8")
+        assert "importlib-resources" in reqs
+        assert "bar" in reqs
+        assert ':python_version < "3.7"' in reqs
+
+    @pytest.mark.parametrize(
+        ("field", "group"),
+        [("scripts", "console_scripts"), ("gui-scripts", "gui_scripts")],
+    )
+    @pytest.mark.filterwarnings("error")
+    def test_scripts_dont_require_dynamic_entry_points(self, tmp_path, field, group):
+        # Issue 3862
+        pyproject = self.pyproject(tmp_path, [field])
+        dist = makedist(tmp_path, entry_points={group: ["foobar=foobar:main"]})
+        dist = pyprojecttoml.apply_configuration(dist, pyproject)
+        assert group in dist.entry_points
+
+
+class TestMeta:
+    def test_example_file_in_sdist(self, setuptools_sdist):
+        """Meta test to ensure tests can run from sdist"""
+        with tarfile.open(setuptools_sdist) as tar:
+            assert any(name.endswith(EXAMPLES_FILE) for name in tar.getnames())
+
+
+class TestInteropCommandLineParsing:
+    def test_version(self, tmp_path, monkeypatch, capsys):
+        # See pypa/setuptools#4047
+        # This test can be removed once the CLI interface of setup.py is removed
+        monkeypatch.chdir(tmp_path)
+        toml_config = """
+        [project]
+        name = "test"
+        version = "42.0"
+        """
+        pyproject = Path(tmp_path, "pyproject.toml")
+        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
+        opts = {"script_args": ["--version"]}
+        dist = pyprojecttoml.apply_configuration(Distribution(opts), pyproject)
+        dist.parse_command_line()  # <-- there should be no exception here.
+        captured = capsys.readouterr()
+        assert "42.0" in captured.out
+
+
+class TestStaticConfig:
+    def test_mark_static_fields(self, tmp_path, monkeypatch):
+        monkeypatch.chdir(tmp_path)
+        toml_config = """
+        [project]
+        name = "test"
+        version = "42.0"
+        dependencies = ["hello"]
+        keywords = ["world"]
+        classifiers = ["private :: hello world"]
+        [tool.setuptools]
+        obsoletes = ["abcd"]
+        provides = ["abcd"]
+        platforms = ["abcd"]
+        """
+        pyproject = Path(tmp_path, "pyproject.toml")
+        pyproject.write_text(cleandoc(toml_config), encoding="utf-8")
+        dist = pyprojecttoml.apply_configuration(Distribution({}), pyproject)
+        assert is_static(dist.install_requires)
+        assert is_static(dist.metadata.keywords)
+        assert is_static(dist.metadata.classifiers)
+        assert is_static(dist.metadata.obsoletes)
+        assert is_static(dist.metadata.provides)
+        assert is_static(dist.metadata.platforms)
+
+
+# --- Auxiliary Functions ---
+
+
+def core_metadata(dist) -> str:
+    with io.StringIO() as buffer:
+        dist.metadata.write_pkg_file(buffer)
+        pkg_file_txt = buffer.getvalue()
+
+    # Make sure core metadata is valid
+    Metadata.from_email(pkg_file_txt, validate=True)  # can raise exceptions
+
+    skip_prefixes: tuple[str, ...] = ()
+    skip_lines = set()
+    # ---- DIFF NORMALISATION ----
+    # PEP 621 is very particular about author/maintainer metadata conversion, so skip
+    skip_prefixes += ("Author:", "Author-email:", "Maintainer:", "Maintainer-email:")
+    # May be redundant with Home-page
+    skip_prefixes += ("Project-URL: Homepage,", "Home-page:")
+    # May be missing in original (relying on default) but backfilled in the TOML
+    skip_prefixes += ("Description-Content-Type:",)
+    # Remove empty lines
+    skip_lines.add("")
+
+    result = []
+    for line in pkg_file_txt.splitlines():
+        if line.startswith(skip_prefixes) or line in skip_lines:
+            continue
+        result.append(line + "\n")
+
+    return "".join(result)
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_expand.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_expand.py
new file mode 100644
index 0000000000000000000000000000000000000000..c5710ec63d7d9d4ed7b709203bb2fc4b512f2093
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_expand.py
@@ -0,0 +1,247 @@
+import os
+import sys
+from pathlib import Path
+
+import pytest
+
+from setuptools._static import is_static
+from setuptools.config import expand
+from setuptools.discovery import find_package_path
+
+from distutils.errors import DistutilsOptionError
+
+
+def write_files(files, root_dir):
+    for file, content in files.items():
+        path = root_dir / file
+        path.parent.mkdir(exist_ok=True, parents=True)
+        path.write_text(content, encoding="utf-8")
+
+
+def test_glob_relative(tmp_path, monkeypatch):
+    files = {
+        "dir1/dir2/dir3/file1.txt",
+        "dir1/dir2/file2.txt",
+        "dir1/file3.txt",
+        "a.ini",
+        "b.ini",
+        "dir1/c.ini",
+        "dir1/dir2/a.ini",
+    }
+
+    write_files({k: "" for k in files}, tmp_path)
+    patterns = ["**/*.txt", "[ab].*", "**/[ac].ini"]
+    monkeypatch.chdir(tmp_path)
+    assert set(expand.glob_relative(patterns)) == files
+    # Make sure the same APIs work outside cwd
+    assert set(expand.glob_relative(patterns, tmp_path)) == files
+
+
+def test_read_files(tmp_path, monkeypatch):
+    dir_ = tmp_path / "dir_"
+    (tmp_path / "_dir").mkdir(exist_ok=True)
+    (tmp_path / "a.txt").touch()
+    files = {"a.txt": "a", "dir1/b.txt": "b", "dir1/dir2/c.txt": "c"}
+    write_files(files, dir_)
+
+    secrets = Path(str(dir_) + "secrets")
+    secrets.mkdir(exist_ok=True)
+    write_files({"secrets.txt": "secret keys"}, secrets)
+
+    with monkeypatch.context() as m:
+        m.chdir(dir_)
+        assert expand.read_files(list(files)) == "a\nb\nc"
+
+        cannot_access_msg = r"Cannot access '.*\.\..a\.txt'"
+        with pytest.raises(DistutilsOptionError, match=cannot_access_msg):
+            expand.read_files(["../a.txt"])
+
+        cannot_access_secrets_msg = r"Cannot access '.*secrets\.txt'"
+        with pytest.raises(DistutilsOptionError, match=cannot_access_secrets_msg):
+            expand.read_files(["../dir_secrets/secrets.txt"])
+
+    # Make sure the same APIs work outside cwd
+    assert expand.read_files(list(files), dir_) == "a\nb\nc"
+    with pytest.raises(DistutilsOptionError, match=cannot_access_msg):
+        expand.read_files(["../a.txt"], dir_)
+
+
+class TestReadAttr:
+    @pytest.mark.parametrize(
+        "example",
+        [
+            # No cookie means UTF-8:
+            b"__version__ = '\xc3\xa9'\nraise SystemExit(1)\n",
+            # If a cookie is present, honor it:
+            b"# -*- coding: utf-8 -*-\n__version__ = '\xc3\xa9'\nraise SystemExit(1)\n",
+            b"# -*- coding: latin1 -*-\n__version__ = '\xe9'\nraise SystemExit(1)\n",
+        ],
+    )
+    def test_read_attr_encoding_cookie(self, example, tmp_path):
+        (tmp_path / "mod.py").write_bytes(example)
+        assert expand.read_attr('mod.__version__', root_dir=tmp_path) == 'é'
+
+    def test_read_attr(self, tmp_path, monkeypatch):
+        files = {
+            "pkg/__init__.py": "",
+            "pkg/sub/__init__.py": "VERSION = '0.1.1'",
+            "pkg/sub/mod.py": (
+                "VALUES = {'a': 0, 'b': {42}, 'c': (0, 1, 1)}\nraise SystemExit(1)"
+            ),
+        }
+        write_files(files, tmp_path)
+
+        with monkeypatch.context() as m:
+            m.chdir(tmp_path)
+            # Make sure it can read the attr statically without evaluating the module
+            version = expand.read_attr('pkg.sub.VERSION')
+            values = expand.read_attr('lib.mod.VALUES', {'lib': 'pkg/sub'})
+
+        assert version == '0.1.1'
+        assert is_static(values)
+
+        assert values['a'] == 0
+        assert values['b'] == {42}
+        assert is_static(values)
+
+        # Make sure the same APIs work outside cwd
+        assert expand.read_attr('pkg.sub.VERSION', root_dir=tmp_path) == '0.1.1'
+        values = expand.read_attr('lib.mod.VALUES', {'lib': 'pkg/sub'}, tmp_path)
+        assert values['c'] == (0, 1, 1)
+
+    @pytest.mark.parametrize(
+        "example",
+        [
+            "VERSION: str\nVERSION = '0.1.1'\nraise SystemExit(1)\n",
+            "VERSION: str = '0.1.1'\nraise SystemExit(1)\n",
+        ],
+    )
+    def test_read_annotated_attr(self, tmp_path, example):
+        files = {
+            "pkg/__init__.py": "",
+            "pkg/sub/__init__.py": example,
+        }
+        write_files(files, tmp_path)
+        # Make sure this attribute can be read statically
+        version = expand.read_attr('pkg.sub.VERSION', root_dir=tmp_path)
+        assert version == '0.1.1'
+        assert is_static(version)
+
+    @pytest.mark.parametrize(
+        "example",
+        [
+            "VERSION = (lambda: '0.1.1')()\n",
+            "def fn(): return '0.1.1'\nVERSION = fn()\n",
+            "VERSION: str = (lambda: '0.1.1')()\n",
+        ],
+    )
+    def test_read_dynamic_attr(self, tmp_path, monkeypatch, example):
+        files = {
+            "pkg/__init__.py": "",
+            "pkg/sub/__init__.py": example,
+        }
+        write_files(files, tmp_path)
+        monkeypatch.chdir(tmp_path)
+        version = expand.read_attr('pkg.sub.VERSION')
+        assert version == '0.1.1'
+        assert not is_static(version)
+
+    def test_import_order(self, tmp_path):
+        """
+        Sometimes the import machinery will import the parent package of a nested
+        module, which triggers side-effects and might create problems (see issue #3176)
+
+        ``read_attr`` should bypass these limitations by resolving modules statically
+        (via ast.literal_eval).
+        """
+        files = {
+            "src/pkg/__init__.py": "from .main import func\nfrom .about import version",
+            "src/pkg/main.py": "import super_complicated_dep\ndef func(): return 42",
+            "src/pkg/about.py": "version = '42'",
+        }
+        write_files(files, tmp_path)
+        attr_desc = "pkg.about.version"
+        package_dir = {"": "src"}
+        # `import super_complicated_dep` should not run, otherwise the build fails
+        assert expand.read_attr(attr_desc, package_dir, tmp_path) == "42"
+
+
+@pytest.mark.parametrize(
+    ("package_dir", "file", "module", "return_value"),
+    [
+        ({"": "src"}, "src/pkg/main.py", "pkg.main", 42),
+        ({"pkg": "lib"}, "lib/main.py", "pkg.main", 13),
+        ({}, "single_module.py", "single_module", 70),
+        ({}, "flat_layout/pkg.py", "flat_layout.pkg", 836),
+    ],
+)
+def test_resolve_class(monkeypatch, tmp_path, package_dir, file, module, return_value):
+    monkeypatch.setattr(sys, "modules", {})  # reproducibility
+    files = {file: f"class Custom:\n    def testing(self): return {return_value}"}
+    write_files(files, tmp_path)
+    cls = expand.resolve_class(f"{module}.Custom", package_dir, tmp_path)
+    assert cls().testing() == return_value
+
+
+@pytest.mark.parametrize(
+    ("args", "pkgs"),
+    [
+        ({"where": ["."], "namespaces": False}, {"pkg", "other"}),
+        ({"where": [".", "dir1"], "namespaces": False}, {"pkg", "other", "dir2"}),
+        ({"namespaces": True}, {"pkg", "other", "dir1", "dir1.dir2"}),
+        ({}, {"pkg", "other", "dir1", "dir1.dir2"}),  # default value for `namespaces`
+    ],
+)
+def test_find_packages(tmp_path, args, pkgs):
+    files = {
+        "pkg/__init__.py",
+        "other/__init__.py",
+        "dir1/dir2/__init__.py",
+    }
+    write_files({k: "" for k in files}, tmp_path)
+
+    package_dir = {}
+    kwargs = {"root_dir": tmp_path, "fill_package_dir": package_dir, **args}
+    where = kwargs.get("where", ["."])
+    assert set(expand.find_packages(**kwargs)) == pkgs
+    for pkg in pkgs:
+        pkg_path = find_package_path(pkg, package_dir, tmp_path)
+        assert os.path.exists(pkg_path)
+
+    # Make sure the same APIs work outside cwd
+    where = [
+        str((tmp_path / p).resolve()).replace(os.sep, "/")  # ensure posix-style paths
+        for p in args.pop("where", ["."])
+    ]
+
+    assert set(expand.find_packages(where=where, **args)) == pkgs
+
+
+@pytest.mark.parametrize(
+    ("files", "where", "expected_package_dir"),
+    [
+        (["pkg1/__init__.py", "pkg1/other.py"], ["."], {}),
+        (["pkg1/__init__.py", "pkg2/__init__.py"], ["."], {}),
+        (["src/pkg1/__init__.py", "src/pkg1/other.py"], ["src"], {"": "src"}),
+        (["src/pkg1/__init__.py", "src/pkg2/__init__.py"], ["src"], {"": "src"}),
+        (
+            ["src1/pkg1/__init__.py", "src2/pkg2/__init__.py"],
+            ["src1", "src2"],
+            {"pkg1": "src1/pkg1", "pkg2": "src2/pkg2"},
+        ),
+        (
+            ["src/pkg1/__init__.py", "pkg2/__init__.py"],
+            ["src", "."],
+            {"pkg1": "src/pkg1"},
+        ),
+    ],
+)
+def test_fill_package_dir(tmp_path, files, where, expected_package_dir):
+    write_files({k: "" for k in files}, tmp_path)
+    pkg_dir = {}
+    kwargs = {"root_dir": tmp_path, "fill_package_dir": pkg_dir, "namespaces": False}
+    pkgs = expand.find_packages(where=where, **kwargs)
+    assert set(pkg_dir.items()) == set(expected_package_dir.items())
+    for pkg in pkgs:
+        pkg_path = find_package_path(pkg, pkg_dir, tmp_path)
+        assert os.path.exists(pkg_path)
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml.py
new file mode 100644
index 0000000000000000000000000000000000000000..6d995d23af12b4f103dbb310635d14687ab1a0be
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml.py
@@ -0,0 +1,398 @@
+import re
+from configparser import ConfigParser
+from inspect import cleandoc
+
+import jaraco.path
+import pytest
+import tomli_w
+from path import Path
+
+import setuptools  # noqa: F401 # force distutils.core to be patched
+from setuptools.config.pyprojecttoml import (
+    _ToolsTypoInMetadata,
+    apply_configuration,
+    expand_configuration,
+    read_configuration,
+    validate,
+)
+from setuptools.dist import Distribution
+from setuptools.errors import OptionError
+
+import distutils.core
+
+EXAMPLE = """
+[project]
+name = "myproj"
+keywords = ["some", "key", "words"]
+dynamic = ["version", "readme"]
+requires-python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
+dependencies = [
+    'importlib-metadata>=0.12;python_version<"3.8"',
+    'importlib-resources>=1.0;python_version<"3.7"',
+    'pathlib2>=2.3.3,<3;python_version < "3.4" and sys.platform != "win32"',
+]
+
+[project.optional-dependencies]
+docs = [
+    "sphinx>=3",
+    "sphinx-argparse>=0.2.5",
+    "sphinx-rtd-theme>=0.4.3",
+]
+testing = [
+    "pytest>=1",
+    "coverage>=3,<5",
+]
+
+[project.scripts]
+exec = "pkg.__main__:exec"
+
+[build-system]
+requires = ["setuptools", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[tool.setuptools]
+package-dir = {"" = "src"}
+zip-safe = true
+platforms = ["any"]
+
+[tool.setuptools.packages.find]
+where = ["src"]
+
+[tool.setuptools.cmdclass]
+sdist = "pkg.mod.CustomSdist"
+
+[tool.setuptools.dynamic.version]
+attr = "pkg.__version__.VERSION"
+
+[tool.setuptools.dynamic.readme]
+file = ["README.md"]
+content-type = "text/markdown"
+
+[tool.setuptools.package-data]
+"*" = ["*.txt"]
+
+[tool.setuptools.data-files]
+"data" = ["_files/*.txt"]
+
+[tool.distutils.sdist]
+formats = "gztar"
+
+[tool.distutils.bdist_wheel]
+universal = true
+"""
+
+
+def create_example(path, pkg_root):
+    files = {
+        "pyproject.toml": EXAMPLE,
+        "README.md": "hello world",
+        "_files": {
+            "file.txt": "",
+        },
+    }
+    packages = {
+        "pkg": {
+            "__init__.py": "",
+            "mod.py": "class CustomSdist: pass",
+            "__version__.py": "VERSION = (3, 10)",
+            "__main__.py": "def exec(): print('hello')",
+        },
+    }
+
+    assert pkg_root  # Meta-test: cannot be empty string.
+
+    if pkg_root == ".":
+        files = {**files, **packages}
+        # skip other files: flat-layout will raise error for multi-package dist
+    else:
+        # Use this opportunity to ensure namespaces are discovered
+        files[pkg_root] = {**packages, "other": {"nested": {"__init__.py": ""}}}
+
+    jaraco.path.build(files, prefix=path)
+
+
+def verify_example(config, path, pkg_root):
+    pyproject = path / "pyproject.toml"
+    pyproject.write_text(tomli_w.dumps(config), encoding="utf-8")
+    expanded = expand_configuration(config, path)
+    expanded_project = expanded["project"]
+    assert read_configuration(pyproject, expand=True) == expanded
+    assert expanded_project["version"] == "3.10"
+    assert expanded_project["readme"]["text"] == "hello world"
+    assert "packages" in expanded["tool"]["setuptools"]
+    if pkg_root == ".":
+        # Auto-discovery will raise error for multi-package dist
+        assert set(expanded["tool"]["setuptools"]["packages"]) == {"pkg"}
+    else:
+        assert set(expanded["tool"]["setuptools"]["packages"]) == {
+            "pkg",
+            "other",
+            "other.nested",
+        }
+    assert expanded["tool"]["setuptools"]["include-package-data"] is True
+    assert "" in expanded["tool"]["setuptools"]["package-data"]
+    assert "*" not in expanded["tool"]["setuptools"]["package-data"]
+    assert expanded["tool"]["setuptools"]["data-files"] == [
+        ("data", ["_files/file.txt"])
+    ]
+
+
+def test_read_configuration(tmp_path):
+    create_example(tmp_path, "src")
+    pyproject = tmp_path / "pyproject.toml"
+
+    config = read_configuration(pyproject, expand=False)
+    assert config["project"].get("version") is None
+    assert config["project"].get("readme") is None
+
+    verify_example(config, tmp_path, "src")
+
+
+@pytest.mark.parametrize(
+    ("pkg_root", "opts"),
+    [
+        (".", {}),
+        ("src", {}),
+        ("lib", {"packages": {"find": {"where": ["lib"]}}}),
+    ],
+)
+def test_discovered_package_dir_with_attr_directive_in_config(tmp_path, pkg_root, opts):
+    create_example(tmp_path, pkg_root)
+
+    pyproject = tmp_path / "pyproject.toml"
+
+    config = read_configuration(pyproject, expand=False)
+    assert config["project"].get("version") is None
+    assert config["project"].get("readme") is None
+    config["tool"]["setuptools"].pop("packages", None)
+    config["tool"]["setuptools"].pop("package-dir", None)
+
+    config["tool"]["setuptools"].update(opts)
+    verify_example(config, tmp_path, pkg_root)
+
+
+ENTRY_POINTS = {
+    "console_scripts": {"a": "mod.a:func"},
+    "gui_scripts": {"b": "mod.b:func"},
+    "other": {"c": "mod.c:func [extra]"},
+}
+
+
+class TestEntryPoints:
+    def write_entry_points(self, tmp_path):
+        entry_points = ConfigParser()
+        entry_points.read_dict(ENTRY_POINTS)
+        with open(tmp_path / "entry-points.txt", "w", encoding="utf-8") as f:
+            entry_points.write(f)
+
+    def pyproject(self, dynamic=None):
+        project = {"dynamic": dynamic or ["scripts", "gui-scripts", "entry-points"]}
+        tool = {"dynamic": {"entry-points": {"file": "entry-points.txt"}}}
+        return {"project": project, "tool": {"setuptools": tool}}
+
+    def test_all_listed_in_dynamic(self, tmp_path):
+        self.write_entry_points(tmp_path)
+        expanded = expand_configuration(self.pyproject(), tmp_path)
+        expanded_project = expanded["project"]
+        assert len(expanded_project["scripts"]) == 1
+        assert expanded_project["scripts"]["a"] == "mod.a:func"
+        assert len(expanded_project["gui-scripts"]) == 1
+        assert expanded_project["gui-scripts"]["b"] == "mod.b:func"
+        assert len(expanded_project["entry-points"]) == 1
+        assert expanded_project["entry-points"]["other"]["c"] == "mod.c:func [extra]"
+
+    @pytest.mark.parametrize("missing_dynamic", ("scripts", "gui-scripts"))
+    def test_scripts_not_listed_in_dynamic(self, tmp_path, missing_dynamic):
+        self.write_entry_points(tmp_path)
+        dynamic = {"scripts", "gui-scripts", "entry-points"} - {missing_dynamic}
+
+        msg = f"defined outside of `pyproject.toml`:.*{missing_dynamic}"
+        with pytest.raises(OptionError, match=re.compile(msg, re.DOTALL)):
+            expand_configuration(self.pyproject(dynamic), tmp_path)
+
+
+class TestClassifiers:
+    def test_dynamic(self, tmp_path):
+        # Let's create a project example that has dynamic classifiers
+        # coming from a txt file.
+        create_example(tmp_path, "src")
+        classifiers = cleandoc(
+            """
+            Framework :: Flask
+            Programming Language :: Haskell
+            """
+        )
+        (tmp_path / "classifiers.txt").write_text(classifiers, encoding="utf-8")
+
+        pyproject = tmp_path / "pyproject.toml"
+        config = read_configuration(pyproject, expand=False)
+        dynamic = config["project"]["dynamic"]
+        config["project"]["dynamic"] = list({*dynamic, "classifiers"})
+        dynamic_config = config["tool"]["setuptools"]["dynamic"]
+        dynamic_config["classifiers"] = {"file": "classifiers.txt"}
+
+        # When the configuration is expanded,
+        # each line of the file should be an different classifier.
+        validate(config, pyproject)
+        expanded = expand_configuration(config, tmp_path)
+
+        assert set(expanded["project"]["classifiers"]) == {
+            "Framework :: Flask",
+            "Programming Language :: Haskell",
+        }
+
+    def test_dynamic_without_config(self, tmp_path):
+        config = """
+        [project]
+        name = "myproj"
+        version = '42'
+        dynamic = ["classifiers"]
+        """
+
+        pyproject = tmp_path / "pyproject.toml"
+        pyproject.write_text(cleandoc(config), encoding="utf-8")
+        with pytest.raises(OptionError, match="No configuration .* .classifiers."):
+            read_configuration(pyproject)
+
+    def test_dynamic_readme_from_setup_script_args(self, tmp_path):
+        config = """
+        [project]
+        name = "myproj"
+        version = '42'
+        dynamic = ["readme"]
+        """
+        pyproject = tmp_path / "pyproject.toml"
+        pyproject.write_text(cleandoc(config), encoding="utf-8")
+        dist = Distribution(attrs={"long_description": "42"})
+        # No error should occur because of missing `readme`
+        dist = apply_configuration(dist, pyproject)
+        assert dist.metadata.long_description == "42"
+
+    def test_dynamic_without_file(self, tmp_path):
+        config = """
+        [project]
+        name = "myproj"
+        version = '42'
+        dynamic = ["classifiers"]
+
+        [tool.setuptools.dynamic]
+        classifiers = {file = ["classifiers.txt"]}
+        """
+
+        pyproject = tmp_path / "pyproject.toml"
+        pyproject.write_text(cleandoc(config), encoding="utf-8")
+        with pytest.warns(UserWarning, match="File .*classifiers.txt. cannot be found"):
+            expanded = read_configuration(pyproject)
+        assert "classifiers" not in expanded["project"]
+
+
+@pytest.mark.parametrize(
+    "example",
+    (
+        """
+        [project]
+        name = "myproj"
+        version = "1.2"
+
+        [my-tool.that-disrespect.pep518]
+        value = 42
+        """,
+    ),
+)
+def test_ignore_unrelated_config(tmp_path, example):
+    pyproject = tmp_path / "pyproject.toml"
+    pyproject.write_text(cleandoc(example), encoding="utf-8")
+
+    # Make sure no error is raised due to 3rd party configs in pyproject.toml
+    assert read_configuration(pyproject) is not None
+
+
+@pytest.mark.parametrize(
+    ("example", "error_msg"),
+    [
+        (
+            """
+            [project]
+            name = "myproj"
+            version = "1.2"
+            requires = ['pywin32; platform_system=="Windows"' ]
+            """,
+            "configuration error: .project. must not contain ..requires.. properties",
+        ),
+    ],
+)
+def test_invalid_example(tmp_path, example, error_msg):
+    pyproject = tmp_path / "pyproject.toml"
+    pyproject.write_text(cleandoc(example), encoding="utf-8")
+
+    pattern = re.compile(
+        f"invalid pyproject.toml.*{error_msg}.*", re.MULTILINE | re.DOTALL
+    )
+    with pytest.raises(ValueError, match=pattern):
+        read_configuration(pyproject)
+
+
+@pytest.mark.parametrize("config", ("", "[tool.something]\nvalue = 42"))
+def test_empty(tmp_path, config):
+    pyproject = tmp_path / "pyproject.toml"
+    pyproject.write_text(config, encoding="utf-8")
+
+    # Make sure no error is raised
+    assert read_configuration(pyproject) == {}
+
+
+@pytest.mark.parametrize("config", ("[project]\nname = 'myproj'\nversion='42'\n",))
+def test_include_package_data_by_default(tmp_path, config):
+    """Builds with ``pyproject.toml`` should consider ``include-package-data=True`` as
+    default.
+    """
+    pyproject = tmp_path / "pyproject.toml"
+    pyproject.write_text(config, encoding="utf-8")
+
+    config = read_configuration(pyproject)
+    assert config["tool"]["setuptools"]["include-package-data"] is True
+
+
+def test_include_package_data_in_setuppy(tmp_path):
+    """Builds with ``pyproject.toml`` should consider ``include_package_data`` set in
+    ``setup.py``.
+
+    See https://github.com/pypa/setuptools/issues/3197#issuecomment-1079023889
+    """
+    files = {
+        "pyproject.toml": "[project]\nname = 'myproj'\nversion='42'\n",
+        "setup.py": "__import__('setuptools').setup(include_package_data=False)",
+    }
+    jaraco.path.build(files, prefix=tmp_path)
+
+    with Path(tmp_path):
+        dist = distutils.core.run_setup("setup.py", {}, stop_after="config")
+
+    assert dist.get_name() == "myproj"
+    assert dist.get_version() == "42"
+    assert dist.include_package_data is False
+
+
+def test_warn_tools_typo(tmp_path):
+    """Test that the common ``tools.setuptools`` typo in ``pyproject.toml`` issues a warning
+
+    See https://github.com/pypa/setuptools/issues/4150
+    """
+    config = """
+    [build-system]
+    requires = ["setuptools"]
+    build-backend = "setuptools.build_meta"
+
+    [project]
+    name = "myproj"
+    version = '42'
+
+    [tools.setuptools]
+    packages = ["package"]
+    """
+
+    pyproject = tmp_path / "pyproject.toml"
+    pyproject.write_text(cleandoc(config), encoding="utf-8")
+
+    with pytest.warns(_ToolsTypoInMetadata):
+        read_configuration(pyproject)
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py
new file mode 100644
index 0000000000000000000000000000000000000000..9fc8050743c4b1a8497d5ea20c571b565d074e59
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_pyprojecttoml_dynamic_deps.py
@@ -0,0 +1,111 @@
+from inspect import cleandoc
+
+import pytest
+from jaraco import path
+
+from setuptools.config.pyprojecttoml import apply_configuration
+from setuptools.dist import Distribution
+from setuptools.warnings import SetuptoolsWarning
+
+
+def test_dynamic_dependencies(tmp_path):
+    files = {
+        "requirements.txt": "six\n  # comment\n",
+        "pyproject.toml": cleandoc(
+            """
+            [project]
+            name = "myproj"
+            version = "1.0"
+            dynamic = ["dependencies"]
+
+            [build-system]
+            requires = ["setuptools", "wheel"]
+            build-backend = "setuptools.build_meta"
+
+            [tool.setuptools.dynamic.dependencies]
+            file = ["requirements.txt"]
+            """
+        ),
+    }
+    path.build(files, prefix=tmp_path)
+    dist = Distribution()
+    dist = apply_configuration(dist, tmp_path / "pyproject.toml")
+    assert dist.install_requires == ["six"]
+
+
+def test_dynamic_optional_dependencies(tmp_path):
+    files = {
+        "requirements-docs.txt": "sphinx\n  # comment\n",
+        "pyproject.toml": cleandoc(
+            """
+            [project]
+            name = "myproj"
+            version = "1.0"
+            dynamic = ["optional-dependencies"]
+
+            [tool.setuptools.dynamic.optional-dependencies.docs]
+            file = ["requirements-docs.txt"]
+
+            [build-system]
+            requires = ["setuptools", "wheel"]
+            build-backend = "setuptools.build_meta"
+            """
+        ),
+    }
+    path.build(files, prefix=tmp_path)
+    dist = Distribution()
+    dist = apply_configuration(dist, tmp_path / "pyproject.toml")
+    assert dist.extras_require == {"docs": ["sphinx"]}
+
+
+def test_mixed_dynamic_optional_dependencies(tmp_path):
+    """
+    Test that if PEP 621 was loosened to allow mixing of dynamic and static
+    configurations in the case of fields containing sub-fields (groups),
+    things would work out.
+    """
+    files = {
+        "requirements-images.txt": "pillow~=42.0\n  # comment\n",
+        "pyproject.toml": cleandoc(
+            """
+            [project]
+            name = "myproj"
+            version = "1.0"
+            dynamic = ["optional-dependencies"]
+
+            [project.optional-dependencies]
+            docs = ["sphinx"]
+
+            [tool.setuptools.dynamic.optional-dependencies.images]
+            file = ["requirements-images.txt"]
+            """
+        ),
+    }
+
+    path.build(files, prefix=tmp_path)
+    pyproject = tmp_path / "pyproject.toml"
+    with pytest.raises(ValueError, match="project.optional-dependencies"):
+        apply_configuration(Distribution(), pyproject)
+
+
+def test_mixed_extras_require_optional_dependencies(tmp_path):
+    files = {
+        "pyproject.toml": cleandoc(
+            """
+            [project]
+            name = "myproj"
+            version = "1.0"
+            optional-dependencies.docs = ["sphinx"]
+            """
+        ),
+    }
+
+    path.build(files, prefix=tmp_path)
+    pyproject = tmp_path / "pyproject.toml"
+
+    dist = Distribution({"extras_require": {"hello": ["world"]}})
+
+    with pytest.warns(SetuptoolsWarning, match=".extras_require. overwritten"):
+        dist = apply_configuration(dist, pyproject)
+
+    assert dist.extras_require == {"docs": ["sphinx"]}
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_setupcfg.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_setupcfg.py
new file mode 100644
index 0000000000000000000000000000000000000000..495337a9a5815e3d2a0aefa584b8ee81f5136d95
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/config/test_setupcfg.py
@@ -0,0 +1,987 @@
+import configparser
+import contextlib
+import inspect
+import re
+import sys
+from pathlib import Path
+from unittest.mock import Mock, patch
+
+import pytest
+from packaging.requirements import InvalidRequirement
+
+from setuptools.config.setupcfg import ConfigHandler, Target, read_configuration
+from setuptools.dist import Distribution, _Distribution
+from setuptools.warnings import SetuptoolsDeprecationWarning
+
+from ..textwrap import DALS
+
+from distutils.errors import DistutilsFileError, DistutilsOptionError
+
+IS_PYPY = '__pypy__' in sys.builtin_module_names
+
+
+class ErrConfigHandler(ConfigHandler[Target]):
+    """Erroneous handler. Fails to implement required methods."""
+
+    section_prefix = "**err**"
+
+
+def make_package_dir(name, base_dir, ns=False):
+    dir_package = base_dir
+    for dir_name in name.split('/'):
+        dir_package = dir_package.mkdir(dir_name)
+    init_file = None
+    if not ns:
+        init_file = dir_package.join('__init__.py')
+        init_file.write('')
+    return dir_package, init_file
+
+
+def fake_env(
+    tmpdir, setup_cfg, setup_py=None, encoding='ascii', package_path='fake_package'
+):
+    if setup_py is None:
+        setup_py = 'from setuptools import setup\nsetup()\n'
+
+    tmpdir.join('setup.py').write(setup_py)
+    config = tmpdir.join('setup.cfg')
+    config.write(setup_cfg.encode(encoding), mode='wb')
+
+    package_dir, init_file = make_package_dir(package_path, tmpdir)
+
+    init_file.write(
+        'VERSION = (1, 2, 3)\n'
+        '\n'
+        'VERSION_MAJOR = 1'
+        '\n'
+        'def get_version():\n'
+        '    return [3, 4, 5, "dev"]\n'
+        '\n'
+    )
+
+    return package_dir, config
+
+
+@contextlib.contextmanager
+def get_dist(tmpdir, kwargs_initial=None, parse=True):
+    kwargs_initial = kwargs_initial or {}
+
+    with tmpdir.as_cwd():
+        dist = Distribution(kwargs_initial)
+        dist.script_name = 'setup.py'
+        parse and dist.parse_config_files()
+
+        yield dist
+
+
+def test_parsers_implemented():
+    with pytest.raises(NotImplementedError):
+        handler = ErrConfigHandler(None, {}, False, Mock())
+        handler.parsers
+
+
+class TestConfigurationReader:
+    def test_basic(self, tmpdir):
+        _, config = fake_env(
+            tmpdir,
+            '[metadata]\n'
+            'version = 10.1.1\n'
+            'keywords = one, two\n'
+            '\n'
+            '[options]\n'
+            'scripts = bin/a.py, bin/b.py\n',
+        )
+        config_dict = read_configuration(str(config))
+        assert config_dict['metadata']['version'] == '10.1.1'
+        assert config_dict['metadata']['keywords'] == ['one', 'two']
+        assert config_dict['options']['scripts'] == ['bin/a.py', 'bin/b.py']
+
+    def test_no_config(self, tmpdir):
+        with pytest.raises(DistutilsFileError):
+            read_configuration(str(tmpdir.join('setup.cfg')))
+
+    def test_ignore_errors(self, tmpdir):
+        _, config = fake_env(
+            tmpdir,
+            '[metadata]\nversion = attr: none.VERSION\nkeywords = one, two\n',
+        )
+        with pytest.raises(ImportError):
+            read_configuration(str(config))
+
+        config_dict = read_configuration(str(config), ignore_option_errors=True)
+
+        assert config_dict['metadata']['keywords'] == ['one', 'two']
+        assert 'version' not in config_dict['metadata']
+
+        config.remove()
+
+
+class TestMetadata:
+    def test_basic(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[metadata]\n'
+            'version = 10.1.1\n'
+            'description = Some description\n'
+            'long_description_content_type = text/something\n'
+            'long_description = file: README\n'
+            'name = fake_name\n'
+            'keywords = one, two\n'
+            'provides = package, package.sub\n'
+            'license = otherlic\n'
+            'download_url = http://test.test.com/test/\n'
+            'maintainer_email = test@test.com\n',
+        )
+
+        tmpdir.join('README').write('readme contents\nline2')
+
+        meta_initial = {
+            # This will be used so `otherlic` won't replace it.
+            'license': 'BSD 3-Clause License',
+        }
+
+        with get_dist(tmpdir, meta_initial) as dist:
+            metadata = dist.metadata
+
+            assert metadata.version == '10.1.1'
+            assert metadata.description == 'Some description'
+            assert metadata.long_description_content_type == 'text/something'
+            assert metadata.long_description == 'readme contents\nline2'
+            assert metadata.provides == ['package', 'package.sub']
+            assert metadata.license == 'BSD 3-Clause License'
+            assert metadata.name == 'fake_name'
+            assert metadata.keywords == ['one', 'two']
+            assert metadata.download_url == 'http://test.test.com/test/'
+            assert metadata.maintainer_email == 'test@test.com'
+
+    def test_license_cfg(self, tmpdir):
+        fake_env(
+            tmpdir,
+            DALS(
+                """
+            [metadata]
+            name=foo
+            version=0.0.1
+            license=Apache 2.0
+            """
+            ),
+        )
+
+        with get_dist(tmpdir) as dist:
+            metadata = dist.metadata
+
+            assert metadata.name == "foo"
+            assert metadata.version == "0.0.1"
+            assert metadata.license == "Apache 2.0"
+
+    def test_file_mixed(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[metadata]\nlong_description = file: README.rst, CHANGES.rst\n\n',
+        )
+
+        tmpdir.join('README.rst').write('readme contents\nline2')
+        tmpdir.join('CHANGES.rst').write('changelog contents\nand stuff')
+
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.long_description == (
+                'readme contents\nline2\nchangelog contents\nand stuff'
+            )
+
+    def test_file_sandboxed(self, tmpdir):
+        tmpdir.ensure("README")
+        project = tmpdir.join('depth1', 'depth2')
+        project.ensure(dir=True)
+        fake_env(project, '[metadata]\nlong_description = file: ../../README\n')
+
+        with get_dist(project, parse=False) as dist:
+            with pytest.raises(DistutilsOptionError):
+                dist.parse_config_files()  # file: out of sandbox
+
+    def test_aliases(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[metadata]\n'
+            'author_email = test@test.com\n'
+            'home_page = http://test.test.com/test/\n'
+            'summary = Short summary\n'
+            'platform = a, b\n'
+            'classifier =\n'
+            '  Framework :: Django\n'
+            '  Programming Language :: Python :: 3.5\n',
+        )
+
+        with get_dist(tmpdir) as dist:
+            metadata = dist.metadata
+            assert metadata.author_email == 'test@test.com'
+            assert metadata.url == 'http://test.test.com/test/'
+            assert metadata.description == 'Short summary'
+            assert metadata.platforms == ['a', 'b']
+            assert metadata.classifiers == [
+                'Framework :: Django',
+                'Programming Language :: Python :: 3.5',
+            ]
+
+    def test_multiline(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[metadata]\n'
+            'name = fake_name\n'
+            'keywords =\n'
+            '  one\n'
+            '  two\n'
+            'classifiers =\n'
+            '  Framework :: Django\n'
+            '  Programming Language :: Python :: 3.5\n',
+        )
+        with get_dist(tmpdir) as dist:
+            metadata = dist.metadata
+            assert metadata.keywords == ['one', 'two']
+            assert metadata.classifiers == [
+                'Framework :: Django',
+                'Programming Language :: Python :: 3.5',
+            ]
+
+    def test_dict(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[metadata]\n'
+            'project_urls =\n'
+            '  Link One = https://example.com/one/\n'
+            '  Link Two = https://example.com/two/\n',
+        )
+        with get_dist(tmpdir) as dist:
+            metadata = dist.metadata
+            assert metadata.project_urls == {
+                'Link One': 'https://example.com/one/',
+                'Link Two': 'https://example.com/two/',
+            }
+
+    def test_version(self, tmpdir):
+        package_dir, config = fake_env(
+            tmpdir, '[metadata]\nversion = attr: fake_package.VERSION\n'
+        )
+
+        sub_a = package_dir.mkdir('subpkg_a')
+        sub_a.join('__init__.py').write('')
+        sub_a.join('mod.py').write('VERSION = (2016, 11, 26)')
+
+        sub_b = package_dir.mkdir('subpkg_b')
+        sub_b.join('__init__.py').write('')
+        sub_b.join('mod.py').write(
+            'import third_party_module\nVERSION = (2016, 11, 26)'
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '1.2.3'
+
+        config.write('[metadata]\nversion = attr: fake_package.get_version\n')
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '3.4.5.dev'
+
+        config.write('[metadata]\nversion = attr: fake_package.VERSION_MAJOR\n')
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '1'
+
+        config.write('[metadata]\nversion = attr: fake_package.subpkg_a.mod.VERSION\n')
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '2016.11.26'
+
+        config.write('[metadata]\nversion = attr: fake_package.subpkg_b.mod.VERSION\n')
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '2016.11.26'
+
+    def test_version_file(self, tmpdir):
+        fake_env(tmpdir, '[metadata]\nversion = file: fake_package/version.txt\n')
+        tmpdir.join('fake_package', 'version.txt').write('1.2.3\n')
+
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '1.2.3'
+
+        tmpdir.join('fake_package', 'version.txt').write('1.2.3\n4.5.6\n')
+        with pytest.raises(DistutilsOptionError):
+            with get_dist(tmpdir) as dist:
+                dist.metadata.version
+
+    def test_version_with_package_dir_simple(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[metadata]\n'
+            'version = attr: fake_package_simple.VERSION\n'
+            '[options]\n'
+            'package_dir =\n'
+            '    = src\n',
+            package_path='src/fake_package_simple',
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '1.2.3'
+
+    def test_version_with_package_dir_rename(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[metadata]\n'
+            'version = attr: fake_package_rename.VERSION\n'
+            '[options]\n'
+            'package_dir =\n'
+            '    fake_package_rename = fake_dir\n',
+            package_path='fake_dir',
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '1.2.3'
+
+    def test_version_with_package_dir_complex(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[metadata]\n'
+            'version = attr: fake_package_complex.VERSION\n'
+            '[options]\n'
+            'package_dir =\n'
+            '    fake_package_complex = src/fake_dir\n',
+            package_path='src/fake_dir',
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.version == '1.2.3'
+
+    def test_unknown_meta_item(self, tmpdir):
+        fake_env(tmpdir, '[metadata]\nname = fake_name\nunknown = some\n')
+        with get_dist(tmpdir, parse=False) as dist:
+            dist.parse_config_files()  # Skip unknown.
+
+    def test_usupported_section(self, tmpdir):
+        fake_env(tmpdir, '[metadata.some]\nkey = val\n')
+        with get_dist(tmpdir, parse=False) as dist:
+            with pytest.raises(DistutilsOptionError):
+                dist.parse_config_files()
+
+    def test_classifiers(self, tmpdir):
+        expected = set([
+            'Framework :: Django',
+            'Programming Language :: Python :: 3',
+            'Programming Language :: Python :: 3.5',
+        ])
+
+        # From file.
+        _, config = fake_env(tmpdir, '[metadata]\nclassifiers = file: classifiers\n')
+
+        tmpdir.join('classifiers').write(
+            'Framework :: Django\n'
+            'Programming Language :: Python :: 3\n'
+            'Programming Language :: Python :: 3.5\n'
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert set(dist.metadata.classifiers) == expected
+
+        # From list notation
+        config.write(
+            '[metadata]\n'
+            'classifiers =\n'
+            '    Framework :: Django\n'
+            '    Programming Language :: Python :: 3\n'
+            '    Programming Language :: Python :: 3.5\n'
+        )
+        with get_dist(tmpdir) as dist:
+            assert set(dist.metadata.classifiers) == expected
+
+    def test_interpolation(self, tmpdir):
+        fake_env(tmpdir, '[metadata]\ndescription = %(message)s\n')
+        with pytest.raises(configparser.InterpolationMissingOptionError):
+            with get_dist(tmpdir):
+                pass
+
+    def test_non_ascii_1(self, tmpdir):
+        fake_env(tmpdir, '[metadata]\ndescription = éàïôñ\n', encoding='utf-8')
+        with get_dist(tmpdir):
+            pass
+
+    def test_non_ascii_3(self, tmpdir):
+        fake_env(tmpdir, '\n# -*- coding: invalid\n')
+        with get_dist(tmpdir):
+            pass
+
+    def test_non_ascii_4(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '# -*- coding: utf-8\n[metadata]\ndescription = éàïôñ\n',
+            encoding='utf-8',
+        )
+        with get_dist(tmpdir) as dist:
+            assert dist.metadata.description == 'éàïôñ'
+
+    def test_not_utf8(self, tmpdir):
+        """
+        Config files encoded not in UTF-8 will fail
+        """
+        fake_env(
+            tmpdir,
+            '# vim: set fileencoding=iso-8859-15 :\n[metadata]\ndescription = éàïôñ\n',
+            encoding='iso-8859-15',
+        )
+        with pytest.raises(UnicodeDecodeError):
+            with get_dist(tmpdir):
+                pass
+
+    @pytest.mark.parametrize(
+        ("error_msg", "config", "invalid"),
+        [
+            (
+                "Invalid dash-separated key 'author-email' in 'metadata' (setup.cfg)",
+                DALS(
+                    """
+                    [metadata]
+                    author-email = test@test.com
+                    maintainer_email = foo@foo.com
+                    """
+                ),
+                {"author-email": "test@test.com"},
+            ),
+            (
+                "Invalid uppercase key 'Name' in 'metadata' (setup.cfg)",
+                DALS(
+                    """
+                    [metadata]
+                    Name = foo
+                    description = Some description
+                    """
+                ),
+                {"Name": "foo"},
+            ),
+        ],
+    )
+    def test_invalid_options_previously_deprecated(
+        self, tmpdir, error_msg, config, invalid
+    ):
+        # This test and related methods can be removed when no longer needed.
+        # Deprecation postponed due to push-back from the community in
+        # https://github.com/pypa/setuptools/issues/4910
+        fake_env(tmpdir, config)
+        with pytest.warns(SetuptoolsDeprecationWarning, match=re.escape(error_msg)):
+            dist = get_dist(tmpdir).__enter__()
+
+        tmpdir.join('setup.cfg').remove()
+
+        for field, value in invalid.items():
+            attr = field.replace("-", "_").lower()
+            assert getattr(dist.metadata, attr) == value
+
+
+class TestOptions:
+    def test_basic(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[options]\n'
+            'zip_safe = True\n'
+            'include_package_data = yes\n'
+            'package_dir = b=c, =src\n'
+            'packages = pack_a, pack_b.subpack\n'
+            'namespace_packages = pack1, pack2\n'
+            'scripts = bin/one.py, bin/two.py\n'
+            'eager_resources = bin/one.py, bin/two.py\n'
+            'install_requires = docutils>=0.3; pack ==1.1, ==1.3; hey\n'
+            'setup_requires = docutils>=0.3; spack ==1.1, ==1.3; there\n'
+            'dependency_links = http://some.com/here/1, '
+            'http://some.com/there/2\n'
+            'python_requires = >=1.0, !=2.8\n'
+            'py_modules = module1, module2\n',
+        )
+        deprec = pytest.warns(SetuptoolsDeprecationWarning, match="namespace_packages")
+        with deprec, get_dist(tmpdir) as dist:
+            assert dist.zip_safe
+            assert dist.include_package_data
+            assert dist.package_dir == {'': 'src', 'b': 'c'}
+            assert dist.packages == ['pack_a', 'pack_b.subpack']
+            assert dist.namespace_packages == ['pack1', 'pack2']
+            assert dist.scripts == ['bin/one.py', 'bin/two.py']
+            assert dist.dependency_links == ([
+                'http://some.com/here/1',
+                'http://some.com/there/2',
+            ])
+            assert dist.install_requires == ([
+                'docutils>=0.3',
+                'pack==1.1,==1.3',
+                'hey',
+            ])
+            assert dist.setup_requires == ([
+                'docutils>=0.3',
+                'spack ==1.1, ==1.3',
+                'there',
+            ])
+            assert dist.python_requires == '>=1.0, !=2.8'
+            assert dist.py_modules == ['module1', 'module2']
+
+    def test_multiline(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[options]\n'
+            'package_dir = \n'
+            '  b=c\n'
+            '  =src\n'
+            'packages = \n'
+            '  pack_a\n'
+            '  pack_b.subpack\n'
+            'namespace_packages = \n'
+            '  pack1\n'
+            '  pack2\n'
+            'scripts = \n'
+            '  bin/one.py\n'
+            '  bin/two.py\n'
+            'eager_resources = \n'
+            '  bin/one.py\n'
+            '  bin/two.py\n'
+            'install_requires = \n'
+            '  docutils>=0.3\n'
+            '  pack ==1.1, ==1.3\n'
+            '  hey\n'
+            'setup_requires = \n'
+            '  docutils>=0.3\n'
+            '  spack ==1.1, ==1.3\n'
+            '  there\n'
+            'dependency_links = \n'
+            '  http://some.com/here/1\n'
+            '  http://some.com/there/2\n',
+        )
+        deprec = pytest.warns(SetuptoolsDeprecationWarning, match="namespace_packages")
+        with deprec, get_dist(tmpdir) as dist:
+            assert dist.package_dir == {'': 'src', 'b': 'c'}
+            assert dist.packages == ['pack_a', 'pack_b.subpack']
+            assert dist.namespace_packages == ['pack1', 'pack2']
+            assert dist.scripts == ['bin/one.py', 'bin/two.py']
+            assert dist.dependency_links == ([
+                'http://some.com/here/1',
+                'http://some.com/there/2',
+            ])
+            assert dist.install_requires == ([
+                'docutils>=0.3',
+                'pack==1.1,==1.3',
+                'hey',
+            ])
+            assert dist.setup_requires == ([
+                'docutils>=0.3',
+                'spack ==1.1, ==1.3',
+                'there',
+            ])
+
+    def test_package_dir_fail(self, tmpdir):
+        fake_env(tmpdir, '[options]\npackage_dir = a b\n')
+        with get_dist(tmpdir, parse=False) as dist:
+            with pytest.raises(DistutilsOptionError):
+                dist.parse_config_files()
+
+    def test_package_data(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[options.package_data]\n'
+            '* = *.txt, *.rst\n'
+            'hello = *.msg\n'
+            '\n'
+            '[options.exclude_package_data]\n'
+            '* = fake1.txt, fake2.txt\n'
+            'hello = *.dat\n',
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert dist.package_data == {
+                '': ['*.txt', '*.rst'],
+                'hello': ['*.msg'],
+            }
+            assert dist.exclude_package_data == {
+                '': ['fake1.txt', 'fake2.txt'],
+                'hello': ['*.dat'],
+            }
+
+    def test_packages(self, tmpdir):
+        fake_env(tmpdir, '[options]\npackages = find:\n')
+
+        with get_dist(tmpdir) as dist:
+            assert dist.packages == ['fake_package']
+
+    def test_find_directive(self, tmpdir):
+        dir_package, config = fake_env(tmpdir, '[options]\npackages = find:\n')
+
+        make_package_dir('sub_one', dir_package)
+        make_package_dir('sub_two', dir_package)
+
+        with get_dist(tmpdir) as dist:
+            assert set(dist.packages) == set([
+                'fake_package',
+                'fake_package.sub_two',
+                'fake_package.sub_one',
+            ])
+
+        config.write(
+            '[options]\n'
+            'packages = find:\n'
+            '\n'
+            '[options.packages.find]\n'
+            'where = .\n'
+            'include =\n'
+            '    fake_package.sub_one\n'
+            '    two\n'
+        )
+        with get_dist(tmpdir) as dist:
+            assert dist.packages == ['fake_package.sub_one']
+
+        config.write(
+            '[options]\n'
+            'packages = find:\n'
+            '\n'
+            '[options.packages.find]\n'
+            'exclude =\n'
+            '    fake_package.sub_one\n'
+        )
+        with get_dist(tmpdir) as dist:
+            assert set(dist.packages) == set(['fake_package', 'fake_package.sub_two'])
+
+    def test_find_namespace_directive(self, tmpdir):
+        dir_package, config = fake_env(
+            tmpdir, '[options]\npackages = find_namespace:\n'
+        )
+
+        make_package_dir('sub_one', dir_package)
+        make_package_dir('sub_two', dir_package, ns=True)
+
+        with get_dist(tmpdir) as dist:
+            assert set(dist.packages) == {
+                'fake_package',
+                'fake_package.sub_two',
+                'fake_package.sub_one',
+            }
+
+        config.write(
+            '[options]\n'
+            'packages = find_namespace:\n'
+            '\n'
+            '[options.packages.find]\n'
+            'where = .\n'
+            'include =\n'
+            '    fake_package.sub_one\n'
+            '    two\n'
+        )
+        with get_dist(tmpdir) as dist:
+            assert dist.packages == ['fake_package.sub_one']
+
+        config.write(
+            '[options]\n'
+            'packages = find_namespace:\n'
+            '\n'
+            '[options.packages.find]\n'
+            'exclude =\n'
+            '    fake_package.sub_one\n'
+        )
+        with get_dist(tmpdir) as dist:
+            assert set(dist.packages) == {'fake_package', 'fake_package.sub_two'}
+
+    def test_extras_require(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[options.extras_require]\n'
+            'pdf = ReportLab>=1.2; RXP\n'
+            'rest = \n'
+            '  docutils>=0.3\n'
+            '  pack ==1.1, ==1.3\n',
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert dist.extras_require == {
+                'pdf': ['ReportLab>=1.2', 'RXP'],
+                'rest': ['docutils>=0.3', 'pack==1.1,==1.3'],
+            }
+            assert set(dist.metadata.provides_extras) == {'pdf', 'rest'}
+
+    @pytest.mark.parametrize(
+        "config",
+        [
+            "[options.extras_require]\nfoo = bar;python_version<'3'",
+            "[options.extras_require]\nfoo = bar;os_name=='linux'",
+            "[options.extras_require]\nfoo = bar;python_version<'3'\n",
+            "[options.extras_require]\nfoo = bar;os_name=='linux'\n",
+            "[options]\ninstall_requires = bar;python_version<'3'",
+            "[options]\ninstall_requires = bar;os_name=='linux'",
+            "[options]\ninstall_requires = bar;python_version<'3'\n",
+            "[options]\ninstall_requires = bar;os_name=='linux'\n",
+        ],
+    )
+    @pytest.mark.xfail(IS_PYPY, reason="Exceptions missing on PyPy")
+    # TODO: investigate PyPy problem
+    def test_raises_accidental_env_marker_misconfig(self, config, tmpdir):
+        fake_env(tmpdir, config)
+        match = (
+            r"One of the parsed requirements in `(install_requires|extras_require.+)` "
+            "looks like a valid environment marker.*"
+        )
+        with pytest.raises(InvalidRequirement, match=match):
+            with get_dist(tmpdir) as _:
+                pass
+
+    @pytest.mark.parametrize(
+        "config",
+        [
+            "[options.extras_require]\nfoo = bar;python_version<3",
+            "[options.extras_require]\nfoo = bar;python_version<3\n",
+            "[options]\ninstall_requires = bar;python_version<3",
+            "[options]\ninstall_requires = bar;python_version<3\n",
+        ],
+    )
+    @pytest.mark.xfail(IS_PYPY, reason="Warnings missing on PyPy (minor issue)")
+    # TODO: investigate PyPy problem
+    def test_warn_accidental_env_marker_misconfig(self, config, tmpdir):
+        fake_env(tmpdir, config)
+        match = (
+            r"One of the parsed requirements in `(install_requires|extras_require.+)` "
+            "looks like a valid environment marker.*"
+        )
+        with pytest.warns(SetuptoolsDeprecationWarning, match=match):
+            with get_dist(tmpdir) as _:
+                pass
+
+    @pytest.mark.parametrize(
+        "config",
+        [
+            "[options.extras_require]\nfoo =\n    bar;python_version<'3'",
+            "[options.extras_require]\nfoo = bar;baz\nboo = xxx;yyy",
+            "[options.extras_require]\nfoo =\n    bar;python_version<'3'\n",
+            "[options.extras_require]\nfoo = bar;baz\nboo = xxx;yyy\n",
+            "[options.extras_require]\nfoo =\n    bar\n    python_version<3\n",
+            "[options]\ninstall_requires =\n    bar;python_version<'3'",
+            "[options]\ninstall_requires = bar;baz\nboo = xxx;yyy",
+            "[options]\ninstall_requires =\n    bar;python_version<'3'\n",
+            "[options]\ninstall_requires = bar;baz\nboo = xxx;yyy\n",
+            "[options]\ninstall_requires =\n    bar\n    python_version<3\n",
+        ],
+    )
+    @pytest.mark.filterwarnings("error::setuptools.SetuptoolsDeprecationWarning")
+    def test_nowarn_accidental_env_marker_misconfig(self, config, tmpdir, recwarn):
+        fake_env(tmpdir, config)
+        num_warnings = len(recwarn)
+        with get_dist(tmpdir) as _:
+            pass
+        # The examples are valid, no warnings shown
+        assert len(recwarn) == num_warnings
+
+    def test_dash_preserved_extras_require(self, tmpdir):
+        fake_env(tmpdir, '[options.extras_require]\nfoo-a = foo\nfoo_b = test\n')
+
+        with get_dist(tmpdir) as dist:
+            assert dist.extras_require == {'foo-a': ['foo'], 'foo_b': ['test']}
+
+    def test_entry_points(self, tmpdir):
+        _, config = fake_env(
+            tmpdir,
+            '[options.entry_points]\n'
+            'group1 = point1 = pack.module:func, '
+            '.point2 = pack.module2:func_rest [rest]\n'
+            'group2 = point3 = pack.module:func2\n',
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert dist.entry_points == {
+                'group1': [
+                    'point1 = pack.module:func',
+                    '.point2 = pack.module2:func_rest [rest]',
+                ],
+                'group2': ['point3 = pack.module:func2'],
+            }
+
+        expected = (
+            '[blogtool.parsers]\n'
+            '.rst = some.nested.module:SomeClass.some_classmethod[reST]\n'
+        )
+
+        tmpdir.join('entry_points').write(expected)
+
+        # From file.
+        config.write('[options]\nentry_points = file: entry_points\n')
+
+        with get_dist(tmpdir) as dist:
+            assert dist.entry_points == expected
+
+    def test_case_sensitive_entry_points(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[options.entry_points]\n'
+            'GROUP1 = point1 = pack.module:func, '
+            '.point2 = pack.module2:func_rest [rest]\n'
+            'group2 = point3 = pack.module:func2\n',
+        )
+
+        with get_dist(tmpdir) as dist:
+            assert dist.entry_points == {
+                'GROUP1': [
+                    'point1 = pack.module:func',
+                    '.point2 = pack.module2:func_rest [rest]',
+                ],
+                'group2': ['point3 = pack.module:func2'],
+            }
+
+    def test_data_files(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[options.data_files]\n'
+            'cfg =\n'
+            '      a/b.conf\n'
+            '      c/d.conf\n'
+            'data = e/f.dat, g/h.dat\n',
+        )
+
+        with get_dist(tmpdir) as dist:
+            expected = [
+                ('cfg', ['a/b.conf', 'c/d.conf']),
+                ('data', ['e/f.dat', 'g/h.dat']),
+            ]
+            assert sorted(dist.data_files) == sorted(expected)
+
+    def test_data_files_globby(self, tmpdir):
+        fake_env(
+            tmpdir,
+            '[options.data_files]\n'
+            'cfg =\n'
+            '      a/b.conf\n'
+            '      c/d.conf\n'
+            'data = *.dat\n'
+            'icons = \n'
+            '      *.ico\n'
+            'audio = \n'
+            '      *.wav\n'
+            '      sounds.db\n',
+        )
+
+        # Create dummy files for glob()'s sake:
+        tmpdir.join('a.dat').write('')
+        tmpdir.join('b.dat').write('')
+        tmpdir.join('c.dat').write('')
+        tmpdir.join('a.ico').write('')
+        tmpdir.join('b.ico').write('')
+        tmpdir.join('c.ico').write('')
+        tmpdir.join('beep.wav').write('')
+        tmpdir.join('boop.wav').write('')
+        tmpdir.join('sounds.db').write('')
+
+        with get_dist(tmpdir) as dist:
+            expected = [
+                ('cfg', ['a/b.conf', 'c/d.conf']),
+                ('data', ['a.dat', 'b.dat', 'c.dat']),
+                ('icons', ['a.ico', 'b.ico', 'c.ico']),
+                ('audio', ['beep.wav', 'boop.wav', 'sounds.db']),
+            ]
+            assert sorted(dist.data_files) == sorted(expected)
+
+    def test_python_requires_simple(self, tmpdir):
+        fake_env(
+            tmpdir,
+            DALS(
+                """
+            [options]
+            python_requires=>=2.7
+            """
+            ),
+        )
+        with get_dist(tmpdir) as dist:
+            dist.parse_config_files()
+
+    def test_python_requires_compound(self, tmpdir):
+        fake_env(
+            tmpdir,
+            DALS(
+                """
+            [options]
+            python_requires=>=2.7,!=3.0.*
+            """
+            ),
+        )
+        with get_dist(tmpdir) as dist:
+            dist.parse_config_files()
+
+    def test_python_requires_invalid(self, tmpdir):
+        fake_env(
+            tmpdir,
+            DALS(
+                """
+            [options]
+            python_requires=invalid
+            """
+            ),
+        )
+        with pytest.raises(Exception):
+            with get_dist(tmpdir) as dist:
+                dist.parse_config_files()
+
+    def test_cmdclass(self, tmpdir):
+        module_path = Path(tmpdir, "src/custom_build.py")  # auto discovery for src
+        module_path.parent.mkdir(parents=True, exist_ok=True)
+        module_path.write_text(
+            "from distutils.core import Command\nclass CustomCmd(Command): pass\n",
+            encoding="utf-8",
+        )
+
+        setup_cfg = """
+            [options]
+            cmdclass =
+                customcmd = custom_build.CustomCmd
+        """
+        fake_env(tmpdir, inspect.cleandoc(setup_cfg))
+
+        with get_dist(tmpdir) as dist:
+            cmdclass = dist.cmdclass['customcmd']
+            assert cmdclass.__name__ == "CustomCmd"
+            assert cmdclass.__module__ == "custom_build"
+            assert module_path.samefile(inspect.getfile(cmdclass))
+
+    def test_requirements_file(self, tmpdir):
+        fake_env(
+            tmpdir,
+            DALS(
+                """
+            [options]
+            install_requires = file:requirements.txt
+            [options.extras_require]
+            colors = file:requirements-extra.txt
+            """
+            ),
+        )
+
+        tmpdir.join('requirements.txt').write('\ndocutils>=0.3\n\n')
+        tmpdir.join('requirements-extra.txt').write('colorama')
+
+        with get_dist(tmpdir) as dist:
+            assert dist.install_requires == ['docutils>=0.3']
+            assert dist.extras_require == {'colors': ['colorama']}
+
+
+saved_dist_init = _Distribution.__init__
+
+
+class TestExternalSetters:
+    # During creation of the setuptools Distribution() object, we call
+    # the init of the parent distutils Distribution object via
+    # _Distribution.__init__ ().
+    #
+    # It's possible distutils calls out to various keyword
+    # implementations (i.e. distutils.setup_keywords entry points)
+    # that may set a range of variables.
+    #
+    # This wraps distutil's Distribution.__init__ and simulates
+    # pbr or something else setting these values.
+    def _fake_distribution_init(self, dist, attrs):
+        saved_dist_init(dist, attrs)
+        # see self._DISTUTILS_UNSUPPORTED_METADATA
+        dist.metadata.long_description_content_type = 'text/something'
+        # Test overwrite setup() args
+        dist.metadata.project_urls = {
+            'Link One': 'https://example.com/one/',
+            'Link Two': 'https://example.com/two/',
+        }
+
+    @patch.object(_Distribution, '__init__', autospec=True)
+    def test_external_setters(self, mock_parent_init, tmpdir):
+        mock_parent_init.side_effect = self._fake_distribution_init
+
+        dist = Distribution(attrs={'project_urls': {'will_be': 'ignored'}})
+
+        assert dist.metadata.long_description_content_type == 'text/something'
+        assert dist.metadata.project_urls == {
+            'Link One': 'https://example.com/one/',
+            'Link Two': 'https://example.com/two/',
+        }
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/indexes/test_links_priority/external.html b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/indexes/test_links_priority/external.html
new file mode 100644
index 0000000000000000000000000000000000000000..92e4702f634dfb37a404bec3103b76f6afcaa917
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/indexes/test_links_priority/external.html
@@ -0,0 +1,3 @@
+
+bad old link
+
diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..fefb028bd3ee7d45a414d6e96a7b2a21ffd7eda7
--- /dev/null
+++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html
@@ -0,0 +1,4 @@
+
+foobar-0.1.tar.gz
+external homepage
+ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8f3c4c3244ce9f894e6cdc99f8fab8825254dca7 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/helpers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/helpers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..71ecc129a95fc3681ee8d72f8cc9230b828e8565 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/helpers.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/test_pbr.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/test_pbr.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b3e0ec1e78771665c98652102e0adf145483481 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/test_pbr.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/test_pip_install_sdist.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/test_pip_install_sdist.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3fef6b57f2a80e29eed6170e36d9fe088b57f605 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/__pycache__/test_pip_install_sdist.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/helpers.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/helpers.py new file mode 100644 index 0000000000000000000000000000000000000000..16b13022913f62ba86df6b2480d22e3119cdb8cc --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/helpers.py @@ -0,0 +1,80 @@ +"""Reusable functions and classes for different types of integration tests. + +For example ``Archive`` can be used to check the contents of distribution built +with setuptools, and ``run`` will always try to be as verbose as possible to +facilitate debugging. +""" + +from __future__ import annotations + +import os +import subprocess +import tarfile +from collections.abc import Iterator +from pathlib import Path +from zipfile import ZipFile, ZipInfo + + +def run(cmd, env=None): + r = subprocess.run( + cmd, + capture_output=True, + text=True, + encoding="utf-8", + env={**os.environ, **(env or {})}, + # ^-- allow overwriting instead of discarding the current env + ) + + out = r.stdout + "\n" + r.stderr + # pytest omits stdout/err by default, if the test fails they help debugging + print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") + print(f"Command: {cmd}\nreturn code: {r.returncode}\n\n{out}") + + if r.returncode == 0: + return out + raise subprocess.CalledProcessError(r.returncode, cmd, r.stdout, r.stderr) + + +class Archive: + """Compatibility layer for ZipFile/Info and TarFile/Info""" + + def __init__(self, filename) -> None: + self._filename = filename + if filename.endswith("tar.gz"): + self._obj: tarfile.TarFile | ZipFile = tarfile.open(filename, "r:gz") + elif filename.endswith("zip"): + self._obj = ZipFile(filename) + else: + raise ValueError(f"{filename} doesn't seem to be a zip or tar.gz") + + def __iter__(self) -> Iterator[ZipInfo] | Iterator[tarfile.TarInfo]: + if hasattr(self._obj, "infolist"): + return iter(self._obj.infolist()) + return iter(self._obj) + + def get_name(self, zip_or_tar_info): + if hasattr(zip_or_tar_info, "filename"): + return zip_or_tar_info.filename + return zip_or_tar_info.name + + def get_content(self, zip_or_tar_info): + if hasattr(self._obj, "extractfile"): + content = self._obj.extractfile(zip_or_tar_info) + if content is None: + msg = f"Invalid {zip_or_tar_info.name} in {self._filename}" + raise ValueError(msg) + return str(content.read(), "utf-8") + return str(self._obj.read(zip_or_tar_info), "utf-8") + + +def get_sdist_members(sdist_path): + with tarfile.open(sdist_path, "r:gz") as tar: + files = [Path(f) for f in tar.getnames()] + # remove root folder + relative_files = ("/".join(f.parts[1:]) for f in files) + return {f for f in relative_files if f} + + +def get_wheel_members(wheel_path): + with ZipFile(wheel_path) as zipfile: + return set(zipfile.namelist()) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/test_pbr.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/test_pbr.py new file mode 100644 index 0000000000000000000000000000000000000000..f89e5b8b2151430d0994836dd609f1b75490a336 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/test_pbr.py @@ -0,0 +1,20 @@ +import subprocess + +import pytest + + +@pytest.mark.uses_network +def test_pbr_integration(pbr_package, venv): + """Ensure pbr packages install.""" + cmd = [ + 'python', + '-m', + 'pip', + '-v', + 'install', + '--no-build-isolation', + pbr_package, + ] + venv.run(cmd, stderr=subprocess.STDOUT) + out = venv.run(["python", "-c", "import mypkg.hello"]) + assert "Hello world!" in out diff --git a/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/test_pip_install_sdist.py b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/test_pip_install_sdist.py new file mode 100644 index 0000000000000000000000000000000000000000..4e84f218323e6ad67adfbce07cea5a16e91a311c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/setuptools/tests/integration/test_pip_install_sdist.py @@ -0,0 +1,223 @@ +# https://github.com/python/mypy/issues/16936 +# mypy: disable-error-code="has-type" +"""Integration tests for setuptools that focus on building packages via pip. + +The idea behind these tests is not to exhaustively check all the possible +combinations of packages, operating systems, supporting libraries, etc, but +rather check a limited number of popular packages and how they interact with +the exposed public API. This way if any change in API is introduced, we hope to +identify backward compatibility problems before publishing a release. + +The number of tested packages is purposefully kept small, to minimise duration +and the associated maintenance cost (changes in the way these packages define +their build process may require changes in the tests). +""" + +import json +import os +import shutil +import sys +from enum import Enum +from glob import glob +from hashlib import md5 +from urllib.request import urlopen + +import pytest +from packaging.requirements import Requirement + +from .helpers import Archive, run + +pytestmark = pytest.mark.integration + + +(LATEST,) = Enum("v", "LATEST") # type: ignore[misc] # https://github.com/python/mypy/issues/16936 +"""Default version to be checked""" +# There are positive and negative aspects of checking the latest version of the +# packages. +# The main positive aspect is that the latest version might have already +# removed the use of APIs deprecated in previous releases of setuptools. + + +# Packages to be tested: +# (Please notice the test environment cannot support EVERY library required for +# compiling binary extensions. In Ubuntu/Debian nomenclature, we only assume +# that `build-essential`, `gfortran` and `libopenblas-dev` are installed, +# due to their relevance to the numerical/scientific programming ecosystem) +EXAMPLES = [ + ("pip", LATEST), # just in case... + ("pytest", LATEST), # uses setuptools_scm + ("mypy", LATEST), # custom build_py + ext_modules + # --- Popular packages: https://hugovk.github.io/top-pypi-packages/ --- + ("botocore", LATEST), + ("kiwisolver", LATEST), # build_ext + ("brotli", LATEST), # not in the list but used by urllib3 + ("pyyaml", LATEST), # cython + custom build_ext + custom distclass + ("charset-normalizer", LATEST), # uses mypyc, used by aiohttp + ("protobuf", LATEST), + # ("requests", LATEST), # XXX: https://github.com/psf/requests/pull/6920 + ("celery", LATEST), + # When adding packages to this list, make sure they expose a `__version__` + # attribute, or modify the tests below +] + + +# Some packages have "optional" dependencies that modify their build behaviour +# and are not listed in pyproject.toml, others still use `setup_requires` +EXTRA_BUILD_DEPS = { + "pyyaml": ("Cython<3.0",), # constraint to avoid errors + "charset-normalizer": ("mypy>=1.4.1",), # no pyproject.toml available +} + +EXTRA_ENV_VARS = { + "pyyaml": {"PYYAML_FORCE_CYTHON": "1"}, + "charset-normalizer": {"CHARSET_NORMALIZER_USE_MYPYC": "1"}, +} + +IMPORT_NAME = { + "pyyaml": "yaml", + "protobuf": "google.protobuf", +} + + +VIRTUALENV = (sys.executable, "-m", "virtualenv") + + +# By default, pip will try to build packages in isolation (PEP 517), which +# means it will download the previous stable version of setuptools. +# `pip` flags can avoid that (the version of setuptools under test +# should be the one to be used) +INSTALL_OPTIONS = ( + "--ignore-installed", + "--no-build-isolation", + # Omit "--no-binary :all:" the sdist is supplied directly. + # Allows dependencies as wheels. +) +# The downside of `--no-build-isolation` is that pip will not download build +# dependencies. The test script will have to also handle that. + + +@pytest.fixture +def venv_python(tmp_path): + run([*VIRTUALENV, str(tmp_path / ".venv")]) + possible_path = (str(p.parent) for p in tmp_path.glob(".venv/*/python*")) + return shutil.which("python", path=os.pathsep.join(possible_path)) + + +@pytest.fixture(autouse=True) +def _prepare(tmp_path, venv_python, monkeypatch): + download_path = os.getenv("DOWNLOAD_PATH", str(tmp_path)) + os.makedirs(download_path, exist_ok=True) + + # Environment vars used for building some of the packages + monkeypatch.setenv("USE_MYPYC", "1") + + yield + + # Let's provide the maximum amount of information possible in the case + # it is necessary to debug the tests directly from the CI logs. + print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") + print("Temporary directory:") + map(print, tmp_path.glob("*")) + print("Virtual environment:") + run([venv_python, "-m", "pip", "freeze"]) + + +@pytest.mark.parametrize(("package", "version"), EXAMPLES) +@pytest.mark.uses_network +def test_install_sdist(package, version, tmp_path, venv_python, setuptools_wheel): + venv_pip = (venv_python, "-m", "pip") + sdist = retrieve_sdist(package, version, tmp_path) + deps = build_deps(package, sdist) + if deps: + print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") + print("Dependencies:", deps) + run([*venv_pip, "install", *deps]) + + # Use a virtualenv to simulate PEP 517 isolation + # but install fresh setuptools wheel to ensure the version under development + env = EXTRA_ENV_VARS.get(package, {}) + run([*venv_pip, "install", "--force-reinstall", setuptools_wheel]) + run([*venv_pip, "install", *INSTALL_OPTIONS, sdist], env) + + # Execute a simple script to make sure the package was installed correctly + pkg = IMPORT_NAME.get(package, package).replace("-", "_") + script = f"import {pkg}; print(getattr({pkg}, '__version__', 0))" + run([venv_python, "-c", script]) + + +# ---- Helper Functions ---- + + +def retrieve_sdist(package, version, tmp_path): + """Either use cached sdist file or download it from PyPI""" + # `pip download` cannot be used due to + # https://github.com/pypa/pip/issues/1884 + # https://discuss.python.org/t/pep-625-file-name-of-a-source-distribution/4686 + # We have to find the correct distribution file and download it + download_path = os.getenv("DOWNLOAD_PATH", str(tmp_path)) + dist = retrieve_pypi_sdist_metadata(package, version) + + # Remove old files to prevent cache to grow indefinitely + for file in glob(os.path.join(download_path, f"{package}*")): + if dist["filename"] != file: + os.unlink(file) + + dist_file = os.path.join(download_path, dist["filename"]) + if not os.path.exists(dist_file): + download(dist["url"], dist_file, dist["md5_digest"]) + return dist_file + + +def retrieve_pypi_sdist_metadata(package, version): + # https://warehouse.pypa.io/api-reference/json.html + id_ = package if version is LATEST else f"{package}/{version}" + with urlopen(f"https://pypi.org/pypi/{id_}/json") as f: + metadata = json.load(f) + + if metadata["info"]["yanked"]: + raise ValueError(f"Release for {package} {version} was yanked") + + version = metadata["info"]["version"] + release = metadata["releases"][version] if version is LATEST else metadata["urls"] + (sdist,) = filter(lambda d: d["packagetype"] == "sdist", release) + return sdist + + +def download(url, dest, md5_digest): + with urlopen(url) as f: + data = f.read() + + assert md5(data).hexdigest() == md5_digest + + with open(dest, "wb") as f: + f.write(data) + + assert os.path.exists(dest) + + +def build_deps(package, sdist_file): + """Find out what are the build dependencies for a package. + + "Manually" install them, since pip will not install build + deps with `--no-build-isolation`. + """ + # delay importing, since pytest discovery phase may hit this file from a + # testenv without tomli + from setuptools.compat.py310 import tomllib + + archive = Archive(sdist_file) + info = tomllib.loads(_read_pyproject(archive)) + deps = info.get("build-system", {}).get("requires", []) + deps += EXTRA_BUILD_DEPS.get(package, []) + # Remove setuptools from requirements (and deduplicate) + requirements = {Requirement(d).name: d for d in deps} + return [v for k, v in requirements.items() if k != "setuptools"] + + +def _read_pyproject(archive): + contents = ( + archive.get_content(member) + for member in archive + if os.path.basename(archive.get_name(member)) == "pyproject.toml" + ) + return next(contents, "") diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/control/__pycache__/lti.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/control/__pycache__/lti.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7df49a262a7fc7edfb2a7894a1f0b1f124c5c002 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/control/__pycache__/lti.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea265e215716d193ecaca497cbca9871dbf9b51fcc116998954d1c661ae008e4 +size 216678 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/control/tests/__pycache__/test_lti.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/control/tests/__pycache__/test_lti.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8aa06be99eb9f9c31b563fcbccbe32ea48143998 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/control/tests/__pycache__/test_lti.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3b0d2a76e2c8c32a60f5cec74e25a950aa402081b1bd249cf6221c4726478ab +size 220703 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/mechanics/tests/__pycache__/test_joint.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/mechanics/tests/__pycache__/test_joint.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd514110e18221a79a0a3a16a374285a9512e573 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/mechanics/tests/__pycache__/test_joint.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0de62ea2f1e0096272f099a86ea8a938dca4b3aec90ea26ec29d25d92ef2b2af +size 122812 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/quantum/__pycache__/spin.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/quantum/__pycache__/spin.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94baa7854ceb9863a32e566a20940f6c8d700b97 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/quantum/__pycache__/spin.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9acd0c94d5aa54d78062af5fa55c96caa08eb8968911543003a5c23874b33cf9 +size 106347 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/quantum/tests/__pycache__/test_spin.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/quantum/tests/__pycache__/test_spin.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5eb8b7f32ae27682ee5a87ecf1990d773657585b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/physics/quantum/tests/__pycache__/test_spin.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a661f912d81b17f4377b2c3dc29dbec7483f8a903a8e4b967e5f19fe9b57d778 +size 846538 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/plotting/__pycache__/series.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/plotting/__pycache__/series.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..170878523c1ea78db45c2334fa8470acc3b48b71 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/plotting/__pycache__/series.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:622eab13fd78cfa0c9a3cbeabfe09997a7cd9d82f4a177e8465454d90525bfd6 +size 121787 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/plotting/tests/__pycache__/test_series.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/plotting/tests/__pycache__/test_series.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73838ef7289bc5ff2bb9e3861750c8097a95339b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/plotting/tests/__pycache__/test_series.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60af5b058d1566bf949ce5321e9307c3dc5a91065bbcb1042db7bdbfb1871d7d +size 107672 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/compatibility.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/compatibility.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1fb76114fffcb226167181e5c7da6b3f6b609a8e --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/compatibility.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e81e2abfbd37f2293fd12c9452e014375f5fdede7a45d57209d0426e5cd6b50f +size 112087 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polyclasses.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polyclasses.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a3a81adbe1fa1e901c1e6f06adce0429c0e680e9 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polyclasses.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1513d737fcdd63fb62c0b48593afd5f8684bbbabad3009c73f3a33dee106b5df +size 159899 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polyquinticconst.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polyquinticconst.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..023279800dd4e0503ec3fce9e127c0feb8b4b8d9 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polyquinticconst.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bc273a5d1a9a7bddc81708c838ecb8477de8e3da787897b97dac472b4bea643 +size 516662 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polytools.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polytools.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..01753248645b7d1ac09eaebf1297aa85f44beb4b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/polytools.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ae8d0f9b5e26ad2bff60e1b8d9ee0289e9257c9fefb6e5df702465ccbedc71e +size 274681 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/rings.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/rings.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bf074b8cef86d3aead29966fc33754b702e18dbe --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/__pycache__/rings.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac7f0d027be80eddd0a48c40ad5cbe9e555e23527a754d34b2cd83d8b50d454f +size 124685 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/benchmarks/__pycache__/bench_solvers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/benchmarks/__pycache__/bench_solvers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..45c8e7fbf23cedf795e237b33d49c0a4f5da292b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/benchmarks/__pycache__/bench_solvers.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9828f6e4bf3b0dcabbdc62f6bdaaedbbdf2314aa57384de4eb33095f08c5bdcc +size 1429470 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/domains/tests/__pycache__/test_domains.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/domains/tests/__pycache__/test_domains.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e3c8d29c55a77d52df50a668e35cd385261566d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/domains/tests/__pycache__/test_domains.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89e157defc769582c680958e4202e042aa2d754d553a563423d93aadb777405f +size 128114 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/matrices/__pycache__/domainmatrix.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/matrices/__pycache__/domainmatrix.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7ab585e71ed0b99a638b9b2a9cfb31d2dffafd10 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/matrices/__pycache__/domainmatrix.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8b6eb52c7c10c2df75560046f81c8f3e3e31af21330210012373e7c1dbd0987 +size 136652 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/matrices/tests/__pycache__/test_domainmatrix.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/matrices/tests/__pycache__/test_domainmatrix.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c5c2022072ee74627b4b57ee2675a21225cb9c41 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/matrices/tests/__pycache__/test_domainmatrix.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fddc0fecb1fe59a3a322aa11941f3b99b5f443095d2a1fe32ac80726f0f1aeb +size 123448 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/numberfields/__pycache__/resolvent_lookup.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/numberfields/__pycache__/resolvent_lookup.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6752c73a1f88f787933f7074f2574f78ff6c37b2 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/numberfields/__pycache__/resolvent_lookup.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:513683df06e10e740554062966a8446c6be3c0a686018ca992fc82fe7e1b0f3c +size 138990 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/tests/__pycache__/test_polytools.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/tests/__pycache__/test_polytools.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9048ab2f0a955bd22f1b2ba188bb2a3304d996ee --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/tests/__pycache__/test_polytools.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d89220e05a95c1d193b2bc5b52ed09840ea4f332e5f24f5f51f921fcb7f4b67 +size 373052 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/tests/__pycache__/test_rings.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/tests/__pycache__/test_rings.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12a88afc0bb2e1ce8cfb21fc1a8e45410169111f --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/polys/tests/__pycache__/test_rings.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5ea43d422bbae91dd87e4972771bc2336450bd6281278ac5f99658f309480df +size 125297 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/__pycache__/latex.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/__pycache__/latex.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..65b272932dfcc7543226a95eb91abe22e3a1eda1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/__pycache__/latex.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7dc56af3be17e0b84211680d557aa3e65f45c38c9507918581d36c8458d9509c +size 182722 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/__pycache__/mathml.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/__pycache__/mathml.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ccff9d84fbe6ee98a6544a49ede6c5072c342644 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/__pycache__/mathml.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cbfa3e3f2111e7afadebadc6b0ca96ed07cf487d7e7fea2f7bf6ee26ce8daee +size 134020 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/pretty/__pycache__/pretty.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/pretty/__pycache__/pretty.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c3cc3c3280b22be6a111ee4dea92b4178ab356d0 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/pretty/__pycache__/pretty.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f9f0c004672283d74dfee844367d1513b8c1c303a5c087f52fcb32aa87143b8 +size 156653 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/pretty/tests/__pycache__/test_pretty.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/pretty/tests/__pycache__/test_pretty.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b73099abcd8870d3256dbc17553902420274f892 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/pretty/tests/__pycache__/test_pretty.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e1bf3670e31f466043c82ea9d24ecb88c76a1a4cf53ac8b54aa0c1e62863e6a +size 243876 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/tests/__pycache__/test_latex.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/tests/__pycache__/test_latex.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8cf780a945a02e4d72d764da766eee5682f9e905 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/tests/__pycache__/test_latex.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:448409aa76cc5383cf3e7c22851f416816ac4409571246508a5387e0c5ca9e03 +size 226190 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/tests/__pycache__/test_mathml.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/tests/__pycache__/test_mathml.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7297d44723f92489416deb85f728aac0b8b6bf41 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/printing/tests/__pycache__/test_mathml.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95aaff7e557787001dc0c6024511eca70f713237de9f2c5da367c1cdef8dc3a6 +size 166515 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/series/tests/__pycache__/test_limits.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/series/tests/__pycache__/test_limits.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6c16f779e86e7a4ad89aedb802cfc67cd83b226f --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/series/tests/__pycache__/test_limits.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d090130f46a88cf0a1ca273c01bc1166227de9512fa82efc716a85178b1b2ca +size 138746 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/__pycache__/sets.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/__pycache__/sets.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e9f8592d6cee9903189f21bfa1c681d6d514ed8a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/__pycache__/sets.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b2350bb5ee9656dbda2eae0a065044ff3533b79b7931db27e690f13a4a9f233 +size 114948 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/tests/__pycache__/test_fancysets.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/tests/__pycache__/test_fancysets.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..877d4b4844704476429e39ff242c31b2b380f526 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/tests/__pycache__/test_fancysets.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bab4366bea3b6cc10915d610848e1d0a76207110a8c359ca25e6e4e07bb50d9a +size 124768 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/tests/__pycache__/test_sets.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/tests/__pycache__/test_sets.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb3a9475b1127cab00581e255e21eeaacf74172a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/sets/tests/__pycache__/test_sets.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52e16ad4d1015637bb1609346982500f81bd58bc886470ca5018299d19311e0f +size 154604 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/simplify/__pycache__/hyperexpand.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/simplify/__pycache__/hyperexpand.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..018c534df143566499ad2eeb5aed03dc93b33e9e --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/simplify/__pycache__/hyperexpand.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ccdab3f8e64ed1232f58363553c49f1e79785207651435f1328eb5e7bc1cafd +size 127658 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/__pycache__/solvers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/__pycache__/solvers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..577c00b32a5d102d8c68ce0cb01e34340ac46488 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/__pycache__/solvers.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83a58b7b0039447f46edc2e4536819d61eae6074f19e037bebb27c454b36cea9 +size 148265 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/__pycache__/solveset.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/__pycache__/solveset.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b663826e3fc7412ddb76cc2b1658c81ef0f7446 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/__pycache__/solveset.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74af14e6124ee595e2df1f133aa9fe403ea467b50bcd869ab1315f2381762ea6 +size 158758 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/diophantine/__pycache__/diophantine.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/diophantine/__pycache__/diophantine.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..df1a62e693c8a4b28d29839b6da2e699c2fac454 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/diophantine/__pycache__/diophantine.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6457d638485484d169b5d80d38e864e8601dc8911072956ce3ed0c1771c190a +size 148049 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/__pycache__/ode.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/__pycache__/ode.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ca0f05fcda193c05a31a94cf76420aaf378fe69 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/__pycache__/ode.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d75bb7d045878c14e7af5cf81844f3b64f12fb4a620f89ae77653f7bb059123 +size 187383 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/__pycache__/single.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/__pycache__/single.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..932dec041eea138562a7b45ae34c29a9962422c5 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/__pycache__/single.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:355e4eab4e5bb8f548f881f905ba92d54613cd37ea4da6c9e92c6b78c2cb5cd4 +size 144758 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_ode.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_ode.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..99af4f7c2b416a82ac3ef945f392b7f05a4b8f80 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_ode.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c665137dafbc99c846081dd64b1bbd9ce1240731ecedaf989d1c15e570a92101 +size 100653 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_single.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_single.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f9f3e2d1a70885cd04edadd54677d49c213565b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_single.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6cf9cfd94e53d923d1cfb44300996b42bc81ea3f060a4152a7b507f4f1c21a3 +size 240216 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_systems.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_systems.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9fac7c06824da363d3ba7d407a0ab33e0584f25c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/ode/tests/__pycache__/test_systems.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:911c69880537c5826af23ed34ff0f45cce684b9d1cb54cb0e7419f13f32ef959 +size 314800 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/tests/__pycache__/test_solvers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/tests/__pycache__/test_solvers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..752d99c47345870741a81324b051476fda6e2c67 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/tests/__pycache__/test_solvers.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c16577b35c816a58caabe5dd4b667d91f3b2bfd789cb53e7fc1e25268b6cfa0c +size 254295 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/tests/__pycache__/test_solveset.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/tests/__pycache__/test_solveset.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6b87373356300c99a9f883e4c658b6bf30b3de37 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/solvers/tests/__pycache__/test_solveset.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12799279b94332d8275af31854f1a896341515694d856916d473dcc9c801c5c4 +size 364542 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/__pycache__/crv_types.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/__pycache__/crv_types.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..83f34f3b098fa4073a860235bf5a0f190d7b35d0 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/__pycache__/crv_types.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31c5e3ea96b4b2ea9d32a22e52a442ee5cee3daffba523b755d809f91eacac3e +size 167702 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/__pycache__/stochastic_process_types.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/__pycache__/stochastic_process_types.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..730bc93f69c42f6f4f4eadd74441fa542a1a16d0 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/__pycache__/stochastic_process_types.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e42570ec3c6b03efc623f347408fd31308205878556dc19476bcc53bd7f7febd +size 112404 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/tests/__pycache__/test_continuous_rv.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/tests/__pycache__/test_continuous_rv.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..25b0ca281e72463718ca8a4b68f852ae26f2a9be --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/stats/tests/__pycache__/test_continuous_rv.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81520e407e3640510329a276b9c8512c09321788c250e740fc25a61bee83cb2e +size 125701 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/__pycache__/tensor.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/__pycache__/tensor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..65df33d5ce98d659ff49559fda9e869bdfb9737d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/__pycache__/tensor.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd1af538b7acd4ba43d2fa65a97ddf09f3fa1e432d0461bbc3cfc70a56980da0 +size 228225 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/array/expressions/__pycache__/array_expressions.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/array/expressions/__pycache__/array_expressions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..45683ab65e1959323a03a6a6ca4136d291b519ed --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/array/expressions/__pycache__/array_expressions.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6be2d2a454bf3895bd39386a326471048d5793bd84e36777c7ff3cb93370a5bc +size 110830 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/tests/__pycache__/test_tensor.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/tests/__pycache__/test_tensor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d1b9028ef4e2d858dc94627b8fa997e7e8d2c0b6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/tensor/tests/__pycache__/test_tensor.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4bd7058a6e170d892aa67ddeeaf203d0d04a510a9f03bd833e12bdf7c99d49d +size 144903 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/__pycache__/iterables.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/__pycache__/iterables.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e9e2bd3cf33ef5a447ea4de6fae9cf5109885c00 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/__pycache__/iterables.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:118bb6f5c947b96722d8096d73d238c5e0bf4035c8465f0c0e963cd810202e27 +size 105403 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/tests/__pycache__/test_lambdify.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/tests/__pycache__/test_lambdify.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..473b95281520e7921e40a67d7330407ac9440339 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/tests/__pycache__/test_lambdify.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72163a79326525ef1d60e4dd93a10ebc738c0ba5509c3feed5719d759720fa9e +size 141318 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/tests/__pycache__/test_wester.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/tests/__pycache__/test_wester.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86029879f3ca53140a416b9342b26f42cd9a384d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/sympy/utilities/tests/__pycache__/test_wester.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:985636654c4b701cb038d708a7d280dc369d905c8a0a51ca2f93db3610d5b5d1 +size 205501 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/thinc/backends/cblas.cp312-win_amd64.pyd b/TTS/Kokoro/.venv/Lib/site-packages/thinc/backends/cblas.cp312-win_amd64.pyd new file mode 100644 index 0000000000000000000000000000000000000000..aa8d86ad1c6eda1d7a65b76c4a18cf0012ff882d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/thinc/backends/cblas.cp312-win_amd64.pyd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eece6fb3ec062c62020783711aa1cb8e40d31c8388fb3e98022063c11fac57d2 +size 122880 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/thinc/backends/numpy_ops.cp312-win_amd64.pyd b/TTS/Kokoro/.venv/Lib/site-packages/thinc/backends/numpy_ops.cp312-win_amd64.pyd new file mode 100644 index 0000000000000000000000000000000000000000..5980062fa332a317dbab25e0b5ab98068b1a77f1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/thinc/backends/numpy_ops.cp312-win_amd64.pyd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5a7edfdbde0b5f9c5e2e993f2332af6bb1bce6890c1487c43ffebfa29e3af1b +size 455168 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/thinc/extra/search.cp312-win_amd64.pyd b/TTS/Kokoro/.venv/Lib/site-packages/thinc/extra/search.cp312-win_amd64.pyd new file mode 100644 index 0000000000000000000000000000000000000000..3917eaf5d368f2e2bf847e2eae61a45be894a34c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/thinc/extra/search.cp312-win_amd64.pyd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:feeb664e53e556ba6f1b2a7625e44f6bf10827134596b5acee04227e6611aa45 +size 104960 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/thinc/layers/premap_ids.cp312-win_amd64.pyd b/TTS/Kokoro/.venv/Lib/site-packages/thinc/layers/premap_ids.cp312-win_amd64.pyd new file mode 100644 index 0000000000000000000000000000000000000000..f74266befba654d4c6f10e9ee05e14f9b813356e --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/thinc/layers/premap_ids.cp312-win_amd64.pyd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0fd2fb4adf4a17bd2721c429df239ecd19460394510e89e8e1da5d61ea22db25 +size 148992 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/thinc/layers/sparselinear.cp312-win_amd64.pyd b/TTS/Kokoro/.venv/Lib/site-packages/thinc/layers/sparselinear.cp312-win_amd64.pyd new file mode 100644 index 0000000000000000000000000000000000000000..67583d20ffa06c5d84f2c550c7bbd2480d481480 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/thinc/layers/sparselinear.cp312-win_amd64.pyd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abca632352da29ea60f7871f522508a66f5142f156cad82b995641d7f94b2a07 +size 171520 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..da010f8facf40c6aa1eb4f8add70ae385c3d73f7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/__init__.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:463623373c9dd2010e973cd854c9b1ed37fd57fffbf49ca9be4c89244e6fffc3 +size 118621 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_meta_registrations.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_meta_registrations.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..301915ee877ee347b8dd286b6f5be2cf67a05aad --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_meta_registrations.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54fd7c2723235b6cb4ecc2cf19d2c3753543f83740d2f2d313edaaae06cba34a +size 402841 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_tensor_docs.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_tensor_docs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..692caac71dae040bb4833400bf69e51662802e67 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_tensor_docs.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4864ed3f3ac449ce7fd397609b0d48c3652a9ba600f3a20174289a3743d3c4b0 +size 148894 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_torch_docs.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_torch_docs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e6205ea39fa7f59b18e2885e1c29e90d06d63cc1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/_torch_docs.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67c0294248ba3ce3f104ef539e9c714fe52c55be68d2bf8fe9e043eb60ee47ca +size 457071 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/overrides.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/overrides.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5aed6ba48f16d8cc2739ca4214840cf365930feb --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/__pycache__/overrides.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d58ef9acdb584672e094b7ba96c368968556c6925a3ff4f6515d3bdf8b4d886e +size 252342 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_decomp/__pycache__/decompositions.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_decomp/__pycache__/decompositions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8ace3e7d4f55eb1e924ebb0aab9152df31e799b7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_decomp/__pycache__/decompositions.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bdddc85974ab36c70963dde94767390f3cdc4ae4e9e044ea0dc4f5e69bbf972 +size 242733 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/eval_frame.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/eval_frame.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..87a28a27b7c5409e7e4f8e409fa0280364b53077 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/eval_frame.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6431a3dcb7d6b09020d9b765e6d66ea54cac61353f5d03487bb586f6a874e3e0 +size 101159 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/guards.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/guards.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3d8e1f7d990fa9c20c13ecda01bcbfc3a7f9e4ad --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/guards.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1da892508b57d4175f4ce95ff8698c7dba9067d99b9995339bd9fbfd37068e8d +size 183671 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/output_graph.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/output_graph.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2ecb3602ccb5f30692f4e0cce9cc66251f9d4332 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/output_graph.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06649f0bc4076b3e381e85230858d02bdec2e783fb13f30a4f6af4809d9bfb66 +size 160216 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/symbolic_convert.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/symbolic_convert.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3b22c56655b0ec7794e92fa2ed73c0abec263793 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/symbolic_convert.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8f03d2a3179fe636818e0f65d8e32f5a887c44d1c87d1aa51064af7abaa7a98 +size 225199 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/trace_rules.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/trace_rules.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a9e46069fe7673f09d31274c5086f5b029953bc5 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/trace_rules.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc8ede80e5c19c9cd0a53bb54109f8c9a7d56a9026114aaea2e5ae11b44ae7b5 +size 125825 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f8a7ab9f6d69670e04121981dbe9356dc3cc7cf8 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/__pycache__/utils.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6feca8fc10fdbde75b474b21d1560c964643fdb4323f5c90461c0ac73bf69c2 +size 218454 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/builder.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/builder.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6a4096baf9cbebaff8acc565548ae1c3b2d19727 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/builder.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fff6698e6654a4958318847b80aad7bf7ea9d1bdd872f8703047fff96d857135 +size 164980 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/builtin.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/builtin.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d6f40d3266f4761165a78b2ace01625b40f43ef --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/builtin.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d3f924cd90e955ee13680c61f5ab432616bcb9fbb0218f65779a56f42594311 +size 133901 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/functions.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/functions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..448025b833d271c972c4d2af37cc06e854725a47 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/functions.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb7ca31aa1dc509943017e507e9d2aab20ce692e52b6eaeb076006225af9c8eb +size 137392 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/higher_order_ops.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/higher_order_ops.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb1f7f729315cd2998b86aeefc53d329bdf9eb5c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/higher_order_ops.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1644fd66b9d8d63d51a09946d5d8c332a9b53e152f53bd41ff96d270fd476961 +size 162424 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/torch.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/torch.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73660af9348816bb2553ae0596040a0698069b4a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/torch.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:afceef47e59234601591958b2b48585e3a07f92f8ef4e6c10c995c50d77d9e11 +size 105141 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/user_defined.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/user_defined.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1597ba8acc4da89e139e31ce4d33ec805bc94c00 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_dynamo/variables/__pycache__/user_defined.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf05a9c3ce9420cdc3d6a5d85dd3e082fcfe447bb81ef3fb2fd6e1d48606eb34 +size 107741 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_export/serde/__pycache__/serialize.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_export/serde/__pycache__/serialize.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b166768701d99145010b8a12002d9f3a69c428bc --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_export/serde/__pycache__/serialize.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f1c00375dd197e6d31ee20e4b34a172138bc7fb574d30e8cf57ad001dda6f92 +size 203099 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_functorch/__pycache__/partitioners.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_functorch/__pycache__/partitioners.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..08520e70de1c4073682c04d6827525bf75abe97b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_functorch/__pycache__/partitioners.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bc101935134d89a8b4c42713838d6ce1310765e8f01ee1825bafb01ad66ee70 +size 144788 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/codecache.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/codecache.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3dbd36bcd57d84fb0c63b1424fdec8e73e54f7a2 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/codecache.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d702b96cbb7dd4b76f106c5e8906c9386ecf4998ce80db37f430e322638af19 +size 190450 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/compile_fx.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/compile_fx.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ffaf5ae9531b0d98f6c61051015d8dc273f4422 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/compile_fx.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64ba0853e49d04acdb8c97d3815a16e118498374a3102125d1fbe63e4ea538e4 +size 117604 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/cudagraph_trees.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/cudagraph_trees.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..160dd2a0f8a5dcc29343b726be802b4a872afcb6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/cudagraph_trees.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2862d9f40516a99574ab876c6fc85dee2d44ab087c35b07f090fb4631f619d61 +size 112162 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/graph.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/graph.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8744e06fccd322bb8528653647ae318b41f5406f --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/graph.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aef867761a0a90f7f15ea9a17b814c8d0901fc530688bd84964a185482616261 +size 111933 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/ir.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/ir.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b21c4dd493feeb00284986762827de65824e793c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/ir.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61e9daf18ede65b555ac4980f96a8309230c609d250a5ad15ffc464fc92a1340 +size 439138 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/lowering.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/lowering.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2d4e0fe6a75a5757fd52f993cc2d0b333370677 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/lowering.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a89d1cd5272cb69aaa1688696f50c772390e422ab5ea98127e4b1ca539265a09 +size 346547 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/pattern_matcher.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/pattern_matcher.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eeb71878d92bd5faaaeacc60a092d0fcc236cd4a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/pattern_matcher.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a638367d6c8e06edeaa3ae19b3642238a9bda4f02fbadccbac9f6072a9f26493 +size 111021 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/scheduler.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/scheduler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb676119f259840c710d7fc48b0837827fd6cc1c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/scheduler.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:767172a01797c6f1bcbdf29b23d034d2e1983878b88552beb2b7874f07177b7a +size 309884 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/select_algorithm.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/select_algorithm.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..164e39dc20cd860b307666bfdce98fba800b32c1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/select_algorithm.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63a1c0fb016da9596e9355c74753c1dff800325314a7796fb115cd93c9ac39cb +size 191830 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..600cb3de7fbaa476850ceb45b13f58bc629a63a7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/__pycache__/utils.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ebf51a7631d23a9880c5d77c9233be464266364447bad22d15cc53c0799e00c +size 188735 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/common.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/common.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..14f98b219ede96156659a15450bf61b2424c4d90 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/common.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9db3aae7bdc535a310f312bb9e6f02d1a4d0b6584d234edddc9e4edfa50c946 +size 142600 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/cpp.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/cpp.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6ed864da175ec3ef4f8581e2d4a1f8512d123f4c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/cpp.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:594662e87b00e1030199136f72e35307c793b51ef2b0fefd0d64ee137be1d159 +size 272536 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/cpp_wrapper_cpu.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/cpp_wrapper_cpu.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f4cb8c7fb618db58f5e462ea4075d73bcc5301a1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/cpp_wrapper_cpu.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9af3c183d54ef051c8e4f15c607a056be96d686c6ec45abe581814878f896fcb +size 147304 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/simd.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/simd.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..638b432a9f37f7da1b7578b5133364d2c5b74d10 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/simd.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:198871e846e3ad1f04bd0fcc085dd491c62acc95dfcb79273f3736b0331975a8 +size 138538 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/triton.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/triton.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d6e29f8c2c31aee898a8a42d45c5fe308aaf7444 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/triton.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab99c78016e72da41d8d0fab94d5d8b004b92e0759adb8853bb0fc4d4fc2bd67 +size 280315 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/wrapper.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/wrapper.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b4c9bbf31ba452954a7a2317c87771dd921bd2c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/codegen/__pycache__/wrapper.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aee8fec9cded4d01b4bd1feee87f4ef9697bbf6f7bb789b7ad4b448532326aeb +size 201353 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/fx_passes/__pycache__/quantization.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/fx_passes/__pycache__/quantization.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd1593c4e34deb82c59104f2773b9095c54b6556 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/fx_passes/__pycache__/quantization.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6c21bf520d3d32a485b461d7990687746e4d67cd2eca51094e951285115bb5e +size 131017 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/fx_passes/__pycache__/split_cat.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/fx_passes/__pycache__/split_cat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..48a45a20d8b8ba88516e92c00886432d51f6542b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/fx_passes/__pycache__/split_cat.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24707528e4b9c72d10d5c968659776487fd12b21b3dae4a3091514937138cb89 +size 122330 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/runtime/__pycache__/triton_heuristics.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/runtime/__pycache__/triton_heuristics.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b502402a54a5a858cfe66e522ac0ccf14695aa1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/runtime/__pycache__/triton_heuristics.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16e21835a76af417d7429fce1eb7102e593299beb3fa299905e7d6bc67e115b2 +size 148791 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/template_heuristics/__pycache__/triton.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/template_heuristics/__pycache__/triton.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..60a81b6c8de591857e227f2422a19b7fdc336eda --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_inductor/template_heuristics/__pycache__/triton.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c21895eaae0bc1a0a9733dcf0e9308f726163ca7bb95a8053418c3beaeaace28 +size 103942 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_refs/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_refs/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6ff84d43559e07160caec9e924dbeb0b478c1184 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_refs/__pycache__/__init__.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6592384dae9ae6c47b1c418234d4ea589bd4bbcde292d2fa1f6d994be2f63f02 +size 276723 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/_subclasses/__pycache__/fake_tensor.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/_subclasses/__pycache__/fake_tensor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a3c68eb28154327aa7e9013c541bff3a3cfca42 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/_subclasses/__pycache__/fake_tensor.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:212ac7ae455cffea062a409e057802dedc22a0ce05004bc970162601ee163b70 +size 131824 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/backends/_nnapi/__pycache__/serializer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/backends/_nnapi/__pycache__/serializer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12f1ab7fedd2e2bfdc4f2de266bfd36ef8f1e6fc --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/backends/_nnapi/__pycache__/serializer.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb1409d03f19859a6a448fc17a0e4ea12e1258cd92423f6c7e659b0254a8b1ee +size 107834 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/bin/protoc.exe b/TTS/Kokoro/.venv/Lib/site-packages/torch/bin/protoc.exe new file mode 100644 index 0000000000000000000000000000000000000000..d73869c5dd5907223834a36f85579a2a9d665709 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/bin/protoc.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:281a8d8b13235071e02310f0ec61201ccc4514fbc412aefbb315273e0bfe0bae +size 2800640 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/__pycache__/distributed_c10d.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/__pycache__/distributed_c10d.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ab2238ca2bb8a9503e5779945fcacb0db7ab07ab --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/__pycache__/distributed_c10d.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:681074e62a67da70ca25fa8d4ebacf3541d02b43f510669d8499894b692dd9e3 +size 239565 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/fsdp/__pycache__/_flat_param.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/fsdp/__pycache__/_flat_param.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bd4dd686681942fa4345cde97fbe09b166e74190 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/fsdp/__pycache__/_flat_param.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5bf2cbf9396e43316e8f976948f557be0362dd5f414b309fe8b522c3a031c5d +size 116580 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/fsdp/__pycache__/fully_sharded_data_parallel.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/fsdp/__pycache__/fully_sharded_data_parallel.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb5f9861543dfdfa8edd8b6fe56e5f130caac0b4 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/fsdp/__pycache__/fully_sharded_data_parallel.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8edaa0831a7f8ac301720ab8742a25b5d0c2a2ffc36e975bf6dfaf3f2f72dc4a +size 101193 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/pipelining/__pycache__/schedules.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/pipelining/__pycache__/schedules.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3e4aa897bf9c114afee08acefc71fc0554f66a0 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/distributed/pipelining/__pycache__/schedules.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72df24e62211099daa032e7a75e4469d6325e64fdd79e2b699a6b39264d98349 +size 126077 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/__pycache__/graph.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/__pycache__/graph.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe9a2c6629eee4741dc585f770ec848b093ffa3f --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/__pycache__/graph.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3b6faa363fc4aaa55c102c1d980a3b9d7c728cdbb60db32347fb9ccb98f59e1 +size 102131 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/experimental/__pycache__/proxy_tensor.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/experimental/__pycache__/proxy_tensor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3745b5e85053257b14227a86d5c3019864828a24 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/experimental/__pycache__/proxy_tensor.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e52a760a5247badda1067c5f3ddc7e30656806d494aa08093a73d3f15305c425 +size 116289 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/experimental/__pycache__/symbolic_shapes.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/experimental/__pycache__/symbolic_shapes.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2aecd94432f789cda3e251657de58482ef35f9d1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/fx/experimental/__pycache__/symbolic_shapes.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63aa2968b3cca09c9a823068b8de23a62ff7854e7d54e722c2465525539af7e5 +size 318836 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/XNNPACK.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/XNNPACK.lib new file mode 100644 index 0000000000000000000000000000000000000000..af46b3a923f69568f2d4a6900140fcf1df572c3d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/XNNPACK.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af43f67dcf80799565c55732e04e88caa1b7599aec94320e0503afe8a668d904 +size 2703490 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/c10.dll b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/c10.dll new file mode 100644 index 0000000000000000000000000000000000000000..8577eb974f9e3aacc5eb208f21e7a75d4c4ab38f --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/c10.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7871e7c40fb907c75ab8a26e8fd243d58c2664965b9a768adad348dc5b090f86 +size 1081344 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/c10.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/c10.lib new file mode 100644 index 0000000000000000000000000000000000000000..e43c523267a16938ff066a5be410d0c7c0706e2e --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/c10.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4d03395cc8d8dc639224e69999729fb553ed22f6576709f128f7603017f4974 +size 822024 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/cpuinfo.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/cpuinfo.lib new file mode 100644 index 0000000000000000000000000000000000000000..306ddda035598458383635abe7484929ee2f8895 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/cpuinfo.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2636b7e8b30b3bbcd7fab103c5cffdc317b8301bd4d5bf4edc09fd1649f0541 +size 118108 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/fmt.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/fmt.lib new file mode 100644 index 0000000000000000000000000000000000000000..2483c0503885444b3b657018b4ea4b8c193d8ab6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/fmt.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0cab7369568b552c95c6151dcd1fd3213837bfeae0fe93dcca8512c586fc31d +size 1309238 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/libiomp5md.dll b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/libiomp5md.dll new file mode 100644 index 0000000000000000000000000000000000000000..95a4508edaa0dafb153934ecf2588b577b8aaea1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/libiomp5md.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d41a71c38f627a95748596820ab380135dcccc4ceecd6fe7d4e247d015bf55a4 +size 1614192 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/libittnotify.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/libittnotify.lib new file mode 100644 index 0000000000000000000000000000000000000000..6c179401520970a4fca73de02ddd34745c387a67 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/libittnotify.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bdd083ac1fa85aff9436d8667229e1bd64ffa830413ed8c85b09e7e65865995 +size 284300 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/microkernels-prod.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/microkernels-prod.lib new file mode 100644 index 0000000000000000000000000000000000000000..16fe1c6ba692c92c5296a1af82a1e2b6945603e6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/microkernels-prod.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2039cc1286c7d7e2af01c3606e1c1f230b9b8556784df876255a85888debe13a +size 2891768 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/pthreadpool.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/pthreadpool.lib new file mode 100644 index 0000000000000000000000000000000000000000..7ac4655dbc413fe8fb0cea77d26862d47de917ec --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/pthreadpool.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1301fa6957b2a26651ac201eff1b1ca332edd28804ca1c2daa69f833a37aaa6a +size 185328 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/sleef.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/sleef.lib new file mode 100644 index 0000000000000000000000000000000000000000..5cb91a5bcc712d3f4701b35922600308999b7e01 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/sleef.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45397022b148148a5402173056b233c2d37d194a8e5400f859b2e6bffa2a363c +size 8812252 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_cpu.dll b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_cpu.dll new file mode 100644 index 0000000000000000000000000000000000000000..e143f5d211d196873fcdba2d3aa455ecf47008af --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_cpu.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78542eb53af452d841b1b24645f90d25009679731c745e4357ae39c8d312eab7 +size 264942080 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_cpu.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_cpu.lib new file mode 100644 index 0000000000000000000000000000000000000000..b62a37ab29a50760c0b418b415d9e9606060fcd6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_cpu.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:389e498999216a560bf398439a54c834ecb76ff0d12c21d291e2b0de0fb09f2e +size 29597848 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_python.dll b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_python.dll new file mode 100644 index 0000000000000000000000000000000000000000..e2f334c88b33f8e4d38809547e0a3c20c9827495 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_python.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cedb370caeaabd220509c5a163645db214cbe3fe303fe5296afbbc1b86abc92f +size 18705920 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_python.lib b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_python.lib new file mode 100644 index 0000000000000000000000000000000000000000..cb90d77c8bbfafd59e93c76c6bd94a765f581ae1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/torch_python.lib @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1a75b2576d4a30d199c31c17a619e1f955dc44d21e9ebcb8cef98406839a997 +size 289248 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/uv.dll b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/uv.dll new file mode 100644 index 0000000000000000000000000000000000000000..698fa11ebd9e267ef04d2a9f4dc3ad71a6df9532 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/lib/uv.dll @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa569e682fc5fb7a8eb94c6829af9f30a569748dbbc6bce39735d48bc960bcf8 +size 195072 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/linalg/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/linalg/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eafca45bf39c04d1d986b8de84abf9727385654c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/linalg/__pycache__/__init__.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca675e512c6573b44e72448a5f43f9d5df4fe299d41ea600c84a7d7d47044188 +size 116217 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/nested/_internal/__pycache__/ops.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/nested/_internal/__pycache__/ops.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..02bef6ab72892577666cbe920f137c50acc14779 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/nested/_internal/__pycache__/ops.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc6e2decd8a1f7171df488f1e23b188399e0b765fe4b31f2a357e38a8ca62e74 +size 113910 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/__pycache__/functional.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/__pycache__/functional.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a9b39f85247c5f1963b180adb04055e79b54f759 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/__pycache__/functional.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c4f01c93e9aff3722910a0e507afe3b6112cd2427b1771a0c203d8a709feae0 +size 253663 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/modules/__pycache__/loss.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/modules/__pycache__/loss.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9c952c98de90e6764cdd6a0237488b5b205c7628 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/modules/__pycache__/loss.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e28558e8dcee5e73c29f1f97d155ac343108a606668c2abdf67537f89b23a217 +size 103197 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/modules/__pycache__/module.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/modules/__pycache__/module.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ee2bf16180931528d411413edded2ce9e85c1c32 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/modules/__pycache__/module.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6193f08475a9a9a840d9bacf1b3effffabb7ba14e1467a9751cdd281a4d8d427 +size 129137 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/parallel/__pycache__/distributed.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/parallel/__pycache__/distributed.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..852afae4157153bea82ad1ad5dcc7b5c40cff1e3 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/nn/parallel/__pycache__/distributed.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5639924346dd29dc80c6ee6aa147399013336c187d149663971423004d3bf060 +size 106998 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset9.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset9.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3d3a177789ce4392307b7eb1517317dc8c56aa92 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/onnx/_internal/torchscript_exporter/__pycache__/symbolic_opset9.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17d80d6d87f1047bf0f77e9023ac9e1c52ee6067a2aa99f2e1cce2b6e2bc7890 +size 256204 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/optim/__pycache__/lr_scheduler.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/optim/__pycache__/lr_scheduler.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82cfd7049253c15bb446704d153a450c9ae3f4b6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/optim/__pycache__/lr_scheduler.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b34b78e6e187f64c0dd13a348f65954c6c89addcf75242dde23448448005993f +size 110802 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/sparse/__pycache__/_triton_ops_meta.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/sparse/__pycache__/_triton_ops_meta.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f9590800be63e3f5c420b9f1a243958201a682b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/sparse/__pycache__/_triton_ops_meta.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4856c99ce41399a7287128ed64940567ab85d91b488426306962dae813ead7da +size 305592 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_methods_invocations.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_methods_invocations.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad542167968d275d1b7bdef52dea3c5ac6c157d4 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_methods_invocations.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea67ef4ee341eb3feb42064f69d61d83df9a319c762e8e651aa89b74052c1565 +size 967707 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_modules.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_modules.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1eef2caae73f049ec399fc11342cd4a019c0cab8 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_modules.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b861e63cdf00e6bf7015c00c7b38b690462a7750719e76f700d8d0f389259d7 +size 173505 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_nn.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_nn.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6507d85d1e8533665c18519d3db740d0ea24a4f9 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_nn.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26c8b7fea4aa4efc8aadda24f47b04e746927792e818584077c536c0c7e77246 +size 211266 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_quantization.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_quantization.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e928d1aa8ace95517c25dd216208e6a89e23f02c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_quantization.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4fd6ef60b1e919b766dec4d9679b50f07cb6a5281540cfe7911d48f04d075804 +size 200755 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..580df4e7d89573c282dda90c88d804f0c72bb422 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/__pycache__/common_utils.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:134e9a486ff12dd0639d1d8f5f647c1765abe09e77f0d99af0b1dbae4e083b2c +size 287461 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/__pycache__/distributed_test.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/__pycache__/distributed_test.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a6fb5ba2793106fc4f734c05427329224face90b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/__pycache__/distributed_test.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f241b62ca413731cde7f16b43acb04f55a9740ba18a7811f4712aa94620c4f2 +size 493592 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/dist_autograd_test.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/dist_autograd_test.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d7047a3d1d68593b284f410f135401f78c889c63 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/dist_autograd_test.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17f748121e35015b410b32c4c21652962bba3ca396e152d26380cc69ec9467d5 +size 143953 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/rpc_test.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/rpc_test.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..955e10530b67494c06bf59ed528209508d2d3362 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/distributed/rpc/__pycache__/rpc_test.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84078483ce7c046c5df6a0338274468c69246fb7bd2b9454901eae891c42c1e8 +size 364531 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/generated/__pycache__/annotated_fn_args.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/generated/__pycache__/annotated_fn_args.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2cc6cde1b26243ee399fb28446713e1080799aec --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/generated/__pycache__/annotated_fn_args.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d40a0eb0eddf07c28e537224cdba7df01ef3ac1dc1d165c08aa124ac7b950e8a +size 487756 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/opinfo/__pycache__/core.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/opinfo/__pycache__/core.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d468cc6b2bacc952c992dbb19638a112cec8166a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/testing/_internal/opinfo/__pycache__/core.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:841dac36785b88802ccc15540b472f8062fb0760c12dfaac51915f7c07473aec +size 101321 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/utils/__pycache__/cpp_extension.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/utils/__pycache__/cpp_extension.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..53036e5ce8363e4cbdbe9c2735c0fdacada17551 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/utils/__pycache__/cpp_extension.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:59b10ac64c2cb4d9271520338862b85b69d8a1a65442bb36aa58f14d6b1aaa9d +size 136326 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torch/utils/hipify/__pycache__/cuda_to_hip_mappings.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torch/utils/hipify/__pycache__/cuda_to_hip_mappings.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb2cdd7e5d15f4134d01468087cba29666ca9e2c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torch/utils/hipify/__pycache__/cuda_to_hip_mappings.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4f92502377954a055bc6df0ba04bc2e77021abd7c3c54366afea74e364074c3 +size 306788 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torchgen/__pycache__/gen.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torchgen/__pycache__/gen.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..160e87b616a2eb039e332f798bd9d32411dc90a0 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torchgen/__pycache__/gen.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c376da72fdc2f23d8c00775e50d524d64bf89d093f59ee9436d8e745f703d6f +size 111701 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/torchgen/__pycache__/model.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/torchgen/__pycache__/model.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e6f49f38f013abc431cb64d0ba375a3c14136435 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/torchgen/__pycache__/model.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dc2b53265f5e45526f0707b7e67d8bf66e9a3a78bb6de2e439e93aed743bd03 +size 110923 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/modeling_outputs.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/modeling_outputs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9e88628d11df164cfcf458afa85822f9aba1510c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/modeling_outputs.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6aee48eabcb1073b278ff82bbcc2f74986e5cc6c42e9110a05c0580e3239adfd +size 120195 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/modeling_utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/modeling_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b1471becd899d861043db46608168256d63a0e6b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/modeling_utils.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32f1262ee95510f367c51fe5d94d18816d463e733a073225470c49e3f4610435 +size 224031 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/testing_utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/testing_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b449b9caf7778eb7f730b82500392b6e482b26c9 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/testing_utils.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b388b35bb060cf213df36e39a0537ac0d0b3ecdf7d139df38b7b90c54589c9f0 +size 183699 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/tokenization_utils_base.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/tokenization_utils_base.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..030860e24d7a5aad2602c9c596c3910d1634dd8e --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/tokenization_utils_base.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3898f62d6ec7c500a50d17c79769b305936e0e05d76a4165059ef54dd83e1cc +size 163635 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/trainer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/trainer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..27af1c33e15949c577e00a9d9361e5411179d96f --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/trainer.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abe358b0adf35be05799b0f4c6c5b2c2bf983722090fedd1d5d0fd8ac7f8ebd7 +size 219637 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/training_args.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/training_args.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e3f416979d16f777b48fa20cb94f1fd245015a88 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/__pycache__/training_args.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7d28fa16c8a4d5a74d12be71e3c022014728c812054dda5dd2fe6806833ba49 +size 140818 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/generation/__pycache__/logits_process.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/generation/__pycache__/logits_process.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c4da052142e3797eb6a8699cec75ff3ba3e665a3 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/generation/__pycache__/logits_process.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:106a49e21449cef199be9c85f82402f1b55522b2e42dcf1671f79c585680746e +size 169587 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/generation/__pycache__/utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/generation/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98416ade6721b2b470c8a76d6dfd2104c54b65ad --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/generation/__pycache__/utils.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8397ff2f89adb8ba382106b7804fd7bd20b683131a85fad3bf9d248d33f3edf3 +size 175294 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/integrations/__pycache__/integration_utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/integrations/__pycache__/integration_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e9abb4e3cb27ae3f4faf53484759ccba4d7eb56 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/integrations/__pycache__/integration_utils.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6cda012a36a920f13244177b8324a25051f327fb3ecc049ef7b98b1c680ddb5 +size 127257 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/autoformer/__pycache__/modeling_autoformer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/autoformer/__pycache__/modeling_autoformer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90c0f7075c49b86bd422c201190f8834e68298db --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/autoformer/__pycache__/modeling_autoformer.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e367fd485c21bc53e95c37fd18d8febb05b83a381dd8ec178e1ef48a427fd34 +size 104467 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/big_bird/__pycache__/modeling_big_bird.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/big_bird/__pycache__/modeling_big_bird.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90a7f589b0ea34445a2aa49cf2466592a6c1e651 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/big_bird/__pycache__/modeling_big_bird.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69ffe97aa341aabb56be6248a156cbe2823169015688c92b16b41a72b986c6bd +size 111273 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/bigbird_pegasus/__pycache__/modeling_bigbird_pegasus.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/bigbird_pegasus/__pycache__/modeling_bigbird_pegasus.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3f294dfba3caa7f3cdf8b6b84cd61ec4e0de1083 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/bigbird_pegasus/__pycache__/modeling_bigbird_pegasus.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62bd7393e9e9f2eb3a7db317d6aea02ad66747f6f2a035ea4cd80f8e1fffc5c0 +size 114324 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/d_fine/__pycache__/modeling_d_fine.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/d_fine/__pycache__/modeling_d_fine.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d7bf92e402cab540a34e7b174cbffa1cab5b6630 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/d_fine/__pycache__/modeling_d_fine.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f737ccc023b89678eb5c8297d1937bcf3a9a509e06e30dd739bedb9003833a41 +size 114083 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/edgetam_video/__pycache__/modeling_edgetam_video.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/edgetam_video/__pycache__/modeling_edgetam_video.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12cd6d850a34168d5a349b38434fad2168e11272 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/edgetam_video/__pycache__/modeling_edgetam_video.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb29aa0f395e94fd6a94c7801e61226604600344970ad64f80b802c04d9bc596 +size 160132 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/ernie4_5_vl_moe/__pycache__/modeling_ernie4_5_vl_moe.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/ernie4_5_vl_moe/__pycache__/modeling_ernie4_5_vl_moe.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe12791d02185c3d83e85a8af6d11a09f8ccd25a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/ernie4_5_vl_moe/__pycache__/modeling_ernie4_5_vl_moe.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bd8a309f15be99b2783c77d5d27283e425393319e83b224c108b46717c1aa2c +size 102344 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/esm/__pycache__/modeling_esmfold.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/esm/__pycache__/modeling_esmfold.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b22d35b3a05dab90b4824b031b810779a30d255c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/esm/__pycache__/modeling_esmfold.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:628f4871a525da0116a54deddade707273f8e17f2db42f7309780e9d269dd1f4 +size 109836 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/gemma3n/__pycache__/modeling_gemma3n.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/gemma3n/__pycache__/modeling_gemma3n.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d8339976267112c470594fb0c172dc71a56c1102 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/gemma3n/__pycache__/modeling_gemma3n.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1ea98cb1a9d3af1fedd90b895c8c731939ddbc66cfaba998377ad4e24fabc8f +size 126346 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/gemma3n/__pycache__/modular_gemma3n.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/gemma3n/__pycache__/modular_gemma3n.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..134f84604261e7875a013dc70cc3df9ac6e0bbad --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/gemma3n/__pycache__/modular_gemma3n.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf57d90d2efba236bc3257ecb18c3d3bb84ffe468ac997a87bac097fd6fe655c +size 136991 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/glm4v_moe/__pycache__/modeling_glm4v_moe.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/glm4v_moe/__pycache__/modeling_glm4v_moe.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a936f1270e128f3f9e23851ef702e736d86c3242 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/glm4v_moe/__pycache__/modeling_glm4v_moe.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da81f0937ceecae17c52c1795c8af5ae4e840ce83ae0f2ca9ac9e40749ec919c +size 105466 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/grounding_dino/__pycache__/modeling_grounding_dino.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/grounding_dino/__pycache__/modeling_grounding_dino.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5683b3b693513c39ff72f74d8a690376aa02a58c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/grounding_dino/__pycache__/modeling_grounding_dino.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fe311d9a24bdcb81328f51662619f74e79892cb41b3d2560eab3ad3241b4bc1 +size 140263 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/informer/__pycache__/modeling_informer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/informer/__pycache__/modeling_informer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a5cd7bf111e3e850b12540d2e362a2bb8b33f38a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/informer/__pycache__/modeling_informer.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:107fef5c11cb768bf7760b3a93fb80790a8649843b655d4c2f6382ea1f3665cf +size 100300 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/led/__pycache__/modeling_led.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/led/__pycache__/modeling_led.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd7b2e6b56553d59cc421b453f61ec10e93963c6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/led/__pycache__/modeling_led.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17005b061e544ac37631e3bb85dd5e24b7c2e83dcd022e33e0859c8ba44f736c +size 103033 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/longformer/__pycache__/modeling_longformer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/longformer/__pycache__/modeling_longformer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8bc470ff07836dd05de08bc09fb019f75e22897b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/longformer/__pycache__/modeling_longformer.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a70bc08ec79e03e59e3a010c389fbc9befcb7b8d72451ce7b6baf4eaddc23d4d +size 103923 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/luke/__pycache__/modeling_luke.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/luke/__pycache__/modeling_luke.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8f5da552ac382d1caceed5d988cb98a9a81d550c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/luke/__pycache__/modeling_luke.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fcce972171db966d80cd6fa5f922780ab00b557f2a6d9c33f807f4faa2c7284 +size 103232 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/mask2former/__pycache__/modeling_mask2former.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/mask2former/__pycache__/modeling_mask2former.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..95ced9b168ce2594a0c7e9f273e897fda5fd76d3 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/mask2former/__pycache__/modeling_mask2former.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86eb4147ec0311af135a48eba18309876214b658434aa3e4cf804de23d7cebfb +size 127987 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/mm_grounding_dino/__pycache__/modeling_mm_grounding_dino.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/mm_grounding_dino/__pycache__/modeling_mm_grounding_dino.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c818cf6b06178798f6d010adfadbd59373ee33b6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/mm_grounding_dino/__pycache__/modeling_mm_grounding_dino.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b27949f7e837f235500b35ffa759c5ba4ccd1cc43f1c12a31079fe64e63526c +size 139953 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/moshi/__pycache__/modeling_moshi.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/moshi/__pycache__/modeling_moshi.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..29cf66b68bef9f6e4f84a9d060182ba4404e3f7e --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/moshi/__pycache__/modeling_moshi.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72933324027b7088d7cef5ebc799d2f271e223d40bfa1d90ce7c5f40aa8b0e49 +size 102928 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/oneformer/__pycache__/modeling_oneformer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/oneformer/__pycache__/modeling_oneformer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a80296309fefe838254f518685e1f59c91bc7380 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/oneformer/__pycache__/modeling_oneformer.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58f320e381a42b27fb68fdee0a8b2b1e89cad6ecc8ced89dd9fb1b596e693d72 +size 157395 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/perceiver/__pycache__/modeling_perceiver.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/perceiver/__pycache__/modeling_perceiver.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..99a5a63c233f24fc190db6438cce00a471d7b377 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/perceiver/__pycache__/modeling_perceiver.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a246be5c0b5d59f5a8afc2e7a2a5a52a69c07899ce866dd4b1423c6888a2a0ef +size 139256 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/pp_doclayout_v3/__pycache__/modeling_pp_doclayout_v3.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/pp_doclayout_v3/__pycache__/modeling_pp_doclayout_v3.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6000eb13255f68810c5307ae9a38acd3647c58c2 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/pp_doclayout_v3/__pycache__/modeling_pp_doclayout_v3.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d135ee7a1140172c906d00e8978314946b2644495f0f1d3f36d345f9cea1c93 +size 111653 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen2_5_omni/__pycache__/modeling_qwen2_5_omni.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen2_5_omni/__pycache__/modeling_qwen2_5_omni.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3e574d82027a74e01fb29d000f39e9943c873432 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen2_5_omni/__pycache__/modeling_qwen2_5_omni.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adc5d25cfdc99e29f88d3a7b21f796685e8133d29d083f3ac82dc76bd334a185 +size 206682 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen2_5_omni/__pycache__/modular_qwen2_5_omni.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen2_5_omni/__pycache__/modular_qwen2_5_omni.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..835bef98e9f14cdc07e05ef51bff3ae673bb165c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen2_5_omni/__pycache__/modular_qwen2_5_omni.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0bb83735bd90e5121174da2ab19427d7c16b70bf353b83a08503edc5fb4329c +size 208062 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_5/__pycache__/modeling_qwen3_5.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_5/__pycache__/modeling_qwen3_5.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..52d8b6379d7e177db6ece78b001aaa47690b72d9 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_5/__pycache__/modeling_qwen3_5.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb24882e855c627a05624eeeae14a98afab6622ca2b8dcac4f2edfea568a60b0 +size 116921 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_5_moe/__pycache__/modeling_qwen3_5_moe.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_5_moe/__pycache__/modeling_qwen3_5_moe.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6ec4f57e11f390aa6b36feb38f213db453d4a4f1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_5_moe/__pycache__/modeling_qwen3_5_moe.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3485648dd5170050c1f78473a12dffc936af4b27910eae572199cc8a7da84b76 +size 129893 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modeling_qwen3_omni_moe.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modeling_qwen3_omni_moe.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c056c2b3248d4eb99bf49a94222cd9269dec2cac --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modeling_qwen3_omni_moe.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3a7520aa65dc08b50de56c091cec0981fc8dd8108ee86a9d5c75081b3b92039 +size 209697 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modular_qwen3_omni_moe.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modular_qwen3_omni_moe.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ba595aefd5281d6d1ec53d9270ed74c26efa54b3 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_omni_moe/__pycache__/modular_qwen3_omni_moe.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a45254ca7ad5f068cc710bd24bae9c5f9db443928a449752bf75572fc1a04422 +size 141664 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_vl_moe/__pycache__/modeling_qwen3_vl_moe.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_vl_moe/__pycache__/modeling_qwen3_vl_moe.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b97f9dbc118e327dab0441b6042045cdb7a4a887 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/qwen3_vl_moe/__pycache__/modeling_qwen3_vl_moe.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f0c9d2f81b1a65d4e4b8f9bed19bb6bc76ed745201be551adc4b8f59222a105 +size 101004 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/reformer/__pycache__/modeling_reformer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/reformer/__pycache__/modeling_reformer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2ca3c85fd2fa2afd5f87e8b15c452ae274122756 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/reformer/__pycache__/modeling_reformer.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3572fee5fa68887ec0e37b97f23b67a8e86bce77614840130437cb7026c3fd48 +size 113288 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam2_video/__pycache__/modeling_sam2_video.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam2_video/__pycache__/modeling_sam2_video.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..74d3413ee8617d38933ef2c7dd476280b952a1ee --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam2_video/__pycache__/modeling_sam2_video.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a19846751123120b06a881719fab44d2b9b5701062ac3708fb685ed1436d9cfa +size 141032 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam2_video/__pycache__/modular_sam2_video.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam2_video/__pycache__/modular_sam2_video.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..147777744efe4415319112dfa9e92c47e996a75d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam2_video/__pycache__/modular_sam2_video.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9b7077b2d5003a9120b8255363e1dba9eec6a03e260f6773cdcffe5d6582d28 +size 122424 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam3/__pycache__/modeling_sam3.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam3/__pycache__/modeling_sam3.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..64dcdb1c6267437deaff1124b94827b0987787b7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam3/__pycache__/modeling_sam3.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:700b47b16c7547dbe941c145318770b8960d50a375eb181b869817f9f0e286b5 +size 121324 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam3_tracker_video/__pycache__/modeling_sam3_tracker_video.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam3_tracker_video/__pycache__/modeling_sam3_tracker_video.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b50d71f72d2b78952342812626a1d66ddc591d2d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/sam3_tracker_video/__pycache__/modeling_sam3_tracker_video.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99447ac24547e0408e9f0b1e1d81422a18a02fad0074de499475af4d9e70116b +size 142662 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/seamless_m4t/__pycache__/modeling_seamless_m4t.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/seamless_m4t/__pycache__/modeling_seamless_m4t.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d011f78eb042428797b8b5e8a1af2df1150dc593 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/seamless_m4t/__pycache__/modeling_seamless_m4t.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30a5ce09024d1097cf237715aa4d8dfe7859aee18c2d5e98644bfe4db4b80dd2 +size 183121 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/seamless_m4t_v2/__pycache__/modeling_seamless_m4t_v2.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/seamless_m4t_v2/__pycache__/modeling_seamless_m4t_v2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd4b1e40073cfbf0bc49002c2147a65ef39c9d51 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/seamless_m4t_v2/__pycache__/modeling_seamless_m4t_v2.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:40b11493dce913698cf0a897dede331180af022ca033139bb97cbbfc29a3888f +size 193975 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/speecht5/__pycache__/modeling_speecht5.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/speecht5/__pycache__/modeling_speecht5.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4ab62da32006d20a441434b0bf6b287743899323 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/speecht5/__pycache__/modeling_speecht5.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc693aa87349904409677c758a53d4676a562417a09bd59be188583f52bc9b25 +size 155829 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/tapas/__pycache__/tokenization_tapas.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/tapas/__pycache__/tokenization_tapas.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f2cec827c76c07fbcb66fa7a8e339242c2fea9c3 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/tapas/__pycache__/tokenization_tapas.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07a9362f218e14dd8b8f05ede0b7641aa9ab00dfd8d08763165d86de36e1488e +size 114847 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/wav2vec2/__pycache__/modeling_wav2vec2.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/wav2vec2/__pycache__/modeling_wav2vec2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2e7d3aa3e4bbc6f3e21e834325798a3aacfaa731 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/wav2vec2/__pycache__/modeling_wav2vec2.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac86643560dac85420add9a6778d769e8d2c63c2584dbe898db391d0e084e13b +size 101044 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/xlnet/__pycache__/modeling_xlnet.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/xlnet/__pycache__/modeling_xlnet.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e2390cda88be7dc5df6d358a5ae7485059b7732 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/models/xlnet/__pycache__/modeling_xlnet.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffa261b0559980b616e77c88f35300d6c5164029353c4986ad1470f9afe5add7 +size 100962 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/transformers/utils/__pycache__/import_utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/transformers/utils/__pycache__/import_utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb9f7b084ff07bdbc163781cc9dead9d03a80c48 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/transformers/utils/__pycache__/import_utils.cpython-312.pyc @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1145e851126f9a37edb322c10fcb8ee1738aef5dcc20908161678dc41c852af2 +size 115107 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn-0.41.0.dist-info/licenses/LICENSE.md b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn-0.41.0.dist-info/licenses/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..a6bba14552c7673a7db57a5750ddb06508264273 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn-0.41.0.dist-info/licenses/LICENSE.md @@ -0,0 +1,27 @@ +Copyright © 2017-present, [Encode OSS Ltd](https://www.encode.io/). +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..409eaf2ad04038097ce12fce7d0980fda7e125ee Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/__main__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/__main__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6545fc9ddfab64e3b688e7ce6e951463484f5197 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/__main__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_compat.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ed96542a194c7aa50e74f7fc802fdb606262392 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_compat.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_subprocess.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_subprocess.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aba1462a164b9c314ab4baf62dda776012377789 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_subprocess.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_types.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_types.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f44574f982400e7f3d55e936fe43779366246036 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/_types.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/config.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9223f177abc01e4086a8eb0a92db6079242454a9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/config.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/importer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/importer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55abe0697b859f36c7caf4e767999afbe4241f44 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/importer.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/logging.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/logging.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1bd4f8cf3a3717bd74b49a68bbdad625686bf2e9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/logging.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/main.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/main.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4683c207b84b771819bfcf403a0a8effd8a7e20c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/main.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/server.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/server.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ffc29b8bdf4c4fa00f64ee5226b36f5ad23d2cec Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/server.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/workers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/workers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bca99fae0ddf650410a5bfe521b95addc051320c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/__pycache__/workers.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51fec6696f9925848febcf46e8d92ced245738c4 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/off.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/off.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..798afee34bbef7251d666f42cd43ad9faa58fe6b Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/off.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/on.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/on.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8101eb5af4bfdfe3ff46bdb5a510aaac6489bd2a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/lifespan/__pycache__/on.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a9338765220118c0ccdf0f3f278e081fe4195e4 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/asyncio.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/asyncio.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6a9d0cc778b83cdab54faa53b5ddafa5bc5ad69d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/asyncio.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/auto.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/auto.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e875df6b509b90de233d92969f51229edac209d0 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/auto.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12ef44f19960fca45831af2dc759ba722c286a7b Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/loops/__pycache__/uvloop.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6709e5a1a0c8d384f19230e1b0918a03b9b08564 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/asgi2.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/asgi2.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46c4d03fae4c53d752a014f9b86049d7f83b64a7 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/asgi2.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/message_logger.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/message_logger.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..91319eb035910a690e7856b0a2b7de8fdaf92fcb Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/message_logger.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/proxy_headers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/proxy_headers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d6c19a8b6a999c23382a906d644662a3ad1d9cdb Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/proxy_headers.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/wsgi.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/wsgi.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..400ada363f43306fc92951603edd3f5a92b3751d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/__pycache__/wsgi.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/wsgi.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/wsgi.py new file mode 100644 index 0000000000000000000000000000000000000000..b2e3cb77d421085947741430e8b5451821eb66c7 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/middleware/wsgi.py @@ -0,0 +1,199 @@ +from __future__ import annotations + +import asyncio +import concurrent.futures +import io +import sys +import warnings +from collections import deque +from collections.abc import Iterable + +from uvicorn._types import ( + ASGIReceiveCallable, + ASGIReceiveEvent, + ASGISendCallable, + ASGISendEvent, + Environ, + ExcInfo, + HTTPRequestEvent, + HTTPResponseBodyEvent, + HTTPResponseStartEvent, + HTTPScope, + StartResponse, + WSGIApp, +) + + +def build_environ(scope: HTTPScope, message: ASGIReceiveEvent, body: io.BytesIO) -> Environ: + """ + Builds a scope and request message into a WSGI environ object. + """ + script_name = scope.get("root_path", "").encode("utf8").decode("latin1") + path_info = scope["path"].encode("utf8").decode("latin1") + if path_info.startswith(script_name): + path_info = path_info[len(script_name) :] + environ = { + "REQUEST_METHOD": scope["method"], + "SCRIPT_NAME": script_name, + "PATH_INFO": path_info, + "QUERY_STRING": scope["query_string"].decode("ascii"), + "SERVER_PROTOCOL": "HTTP/%s" % scope["http_version"], + "wsgi.version": (1, 0), + "wsgi.url_scheme": scope.get("scheme", "http"), + "wsgi.input": body, + "wsgi.errors": sys.stdout, + "wsgi.multithread": True, + "wsgi.multiprocess": True, + "wsgi.run_once": False, + } + + # Get server name and port - required in WSGI, not in ASGI + server = scope.get("server") + if server is None: + server = ("localhost", 80) + environ["SERVER_NAME"] = server[0] + environ["SERVER_PORT"] = server[1] + + # Get client IP address + client = scope.get("client") + if client is not None: + environ["REMOTE_ADDR"] = client[0] + + # Go through headers and make them into environ entries + for name, value in scope.get("headers", []): + name_str: str = name.decode("latin1") + if name_str == "content-length": + corrected_name = "CONTENT_LENGTH" + elif name_str == "content-type": + corrected_name = "CONTENT_TYPE" + else: + corrected_name = "HTTP_%s" % name_str.upper().replace("-", "_") + # HTTPbis say only ASCII chars are allowed in headers, but we latin1 + # just in case + value_str: str = value.decode("latin1") + if corrected_name in environ: + corrected_name_environ = environ[corrected_name] + assert isinstance(corrected_name_environ, str) + value_str = corrected_name_environ + "," + value_str + environ[corrected_name] = value_str + return environ + + +class _WSGIMiddleware: + def __init__(self, app: WSGIApp, workers: int = 10): + warnings.warn( + "Uvicorn's native WSGI implementation is deprecated, you should switch to a2wsgi (`pip install a2wsgi`).", + DeprecationWarning, + ) + self.app = app + self.executor = concurrent.futures.ThreadPoolExecutor(max_workers=workers) + + async def __call__( + self, + scope: HTTPScope, + receive: ASGIReceiveCallable, + send: ASGISendCallable, + ) -> None: + assert scope["type"] == "http" + instance = WSGIResponder(self.app, self.executor, scope) + await instance(receive, send) + + +class WSGIResponder: + def __init__( + self, + app: WSGIApp, + executor: concurrent.futures.ThreadPoolExecutor, + scope: HTTPScope, + ): + self.app = app + self.executor = executor + self.scope = scope + self.status = None + self.response_headers = None + self.send_event = asyncio.Event() + self.send_queue: deque[ASGISendEvent | None] = deque() + self.loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() + self.response_started = False + self.exc_info: ExcInfo | None = None + + async def __call__(self, receive: ASGIReceiveCallable, send: ASGISendCallable) -> None: + message: HTTPRequestEvent = await receive() # type: ignore[assignment] + body = io.BytesIO(message.get("body", b"")) + more_body = message.get("more_body", False) + if more_body: + body.seek(0, io.SEEK_END) + while more_body: + body_message: HTTPRequestEvent = ( + await receive() # type: ignore[assignment] + ) + body.write(body_message.get("body", b"")) + more_body = body_message.get("more_body", False) + body.seek(0) + environ = build_environ(self.scope, message, body) + self.loop = asyncio.get_event_loop() + wsgi = self.loop.run_in_executor(self.executor, self.wsgi, environ, self.start_response) + sender = self.loop.create_task(self.sender(send)) + try: + await asyncio.wait_for(wsgi, None) + finally: + self.send_queue.append(None) + self.send_event.set() + await asyncio.wait_for(sender, None) + if self.exc_info is not None: + raise self.exc_info[0].with_traceback(self.exc_info[1], self.exc_info[2]) + + async def sender(self, send: ASGISendCallable) -> None: + while True: + if self.send_queue: + message = self.send_queue.popleft() + if message is None: + return + await send(message) + else: # pragma: no cover + await self.send_event.wait() + self.send_event.clear() + + def start_response( + self, + status: str, + response_headers: Iterable[tuple[str, str]], + exc_info: ExcInfo | None = None, + ) -> None: + self.exc_info = exc_info + if not self.response_started: + self.response_started = True + status_code_str, _ = status.split(" ", 1) + status_code = int(status_code_str) + headers = [(name.encode("ascii"), value.encode("ascii")) for name, value in response_headers] + http_response_start_event: HTTPResponseStartEvent = { + "type": "http.response.start", + "status": status_code, + "headers": headers, + } + self.send_queue.append(http_response_start_event) + self.loop.call_soon_threadsafe(self.send_event.set) + + def wsgi(self, environ: Environ, start_response: StartResponse) -> None: + for chunk in self.app(environ, start_response): # type: ignore + response_body: HTTPResponseBodyEvent = { + "type": "http.response.body", + "body": chunk, + "more_body": True, + } + self.send_queue.append(response_body) + self.loop.call_soon_threadsafe(self.send_event.set) + + empty_body: HTTPResponseBodyEvent = { + "type": "http.response.body", + "body": b"", + "more_body": False, + } + self.send_queue.append(empty_body) + self.loop.call_soon_threadsafe(self.send_event.set) + + +try: + from a2wsgi import WSGIMiddleware +except ModuleNotFoundError: # pragma: no cover + WSGIMiddleware = _WSGIMiddleware # type: ignore[misc, assignment] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ab5cbc8e278bbf397e1f3fe866a0c7e6e85856f0 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/__pycache__/utils.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/__pycache__/utils.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7e7ae15cc92e2a97f7d29d30e7d1988f41448bbe Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/__pycache__/utils.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb3675789a5051635a63968b136a28f9ff84c741 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/auto.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/auto.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f231ec2c3921a60ca6548a363f0a1128bbfa8f3a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/auto.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/flow_control.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/flow_control.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..afac9c91dfdf41d82e87f8183bc7d8e8d7ef682e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/flow_control.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/h11_impl.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/h11_impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eaaea266825eec87d09341b1c2b22bff5253ce7f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/h11_impl.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/httptools_impl.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/httptools_impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..748272a51c30baa93799647c096eed5a50d3e062 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/__pycache__/httptools_impl.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/auto.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/auto.py new file mode 100644 index 0000000000000000000000000000000000000000..a14bec144a97a5e3718a768abe3b6a9e7e93d2c1 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/auto.py @@ -0,0 +1,15 @@ +from __future__ import annotations + +import asyncio + +AutoHTTPProtocol: type[asyncio.Protocol] +try: + import httptools # noqa +except ImportError: # pragma: no cover + from uvicorn.protocols.http.h11_impl import H11Protocol + + AutoHTTPProtocol = H11Protocol +else: # pragma: no cover + from uvicorn.protocols.http.httptools_impl import HttpToolsProtocol + + AutoHTTPProtocol = HttpToolsProtocol diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/flow_control.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/flow_control.py new file mode 100644 index 0000000000000000000000000000000000000000..2d1b5fa2d3366fd6584181a26c8569a0207900cc --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/flow_control.py @@ -0,0 +1,54 @@ +import asyncio + +from uvicorn._types import ASGIReceiveCallable, ASGISendCallable, Scope + +CLOSE_HEADER = (b"connection", b"close") + +HIGH_WATER_LIMIT = 65536 + + +class FlowControl: + def __init__(self, transport: asyncio.Transport) -> None: + self._transport = transport + self.read_paused = False + self.write_paused = False + self._is_writable_event = asyncio.Event() + self._is_writable_event.set() + + async def drain(self) -> None: + await self._is_writable_event.wait() # pragma: full coverage + + def pause_reading(self) -> None: + if not self.read_paused: + self.read_paused = True + self._transport.pause_reading() + + def resume_reading(self) -> None: + if self.read_paused: + self.read_paused = False + self._transport.resume_reading() + + def pause_writing(self) -> None: + if not self.write_paused: # pragma: full coverage + self.write_paused = True + self._is_writable_event.clear() + + def resume_writing(self) -> None: + if self.write_paused: # pragma: full coverage + self.write_paused = False + self._is_writable_event.set() + + +async def service_unavailable(scope: Scope, receive: ASGIReceiveCallable, send: ASGISendCallable) -> None: + await send( + { + "type": "http.response.start", + "status": 503, + "headers": [ + (b"content-type", b"text/plain; charset=utf-8"), + (b"content-length", b"19"), + (b"connection", b"close"), + ], + } + ) + await send({"type": "http.response.body", "body": b"Service Unavailable", "more_body": False}) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/h11_impl.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/h11_impl.py new file mode 100644 index 0000000000000000000000000000000000000000..2a3725f6fd07deed4ff30234e8d5fbb7b7db63e0 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/h11_impl.py @@ -0,0 +1,550 @@ +from __future__ import annotations + +import asyncio +import contextvars +import http +import logging +from collections.abc import Callable +from typing import Any, Literal, cast +from urllib.parse import unquote + +import h11 +from h11._connection import DEFAULT_MAX_INCOMPLETE_EVENT_SIZE + +from uvicorn._types import ( + ASGI3Application, + ASGIReceiveEvent, + ASGISendEvent, + HTTPRequestEvent, + HTTPResponseBodyEvent, + HTTPResponseStartEvent, + HTTPScope, +) +from uvicorn.config import Config +from uvicorn.logging import TRACE_LOG_LEVEL +from uvicorn.protocols.http.flow_control import CLOSE_HEADER, HIGH_WATER_LIMIT, FlowControl, service_unavailable +from uvicorn.protocols.utils import get_client_addr, get_local_addr, get_path_with_query_string, get_remote_addr, is_ssl +from uvicorn.server import ServerState + + +def _get_status_phrase(status_code: int) -> bytes: + try: + return http.HTTPStatus(status_code).phrase.encode() + except ValueError: + return b"" + + +STATUS_PHRASES = {status_code: _get_status_phrase(status_code) for status_code in range(100, 600)} + + +class H11Protocol(asyncio.Protocol): + def __init__( + self, + config: Config, + server_state: ServerState, + app_state: dict[str, Any], + _loop: asyncio.AbstractEventLoop | None = None, + ) -> None: + if not config.loaded: + config.load() + + self.config = config + self.app = config.loaded_app + self.loop = _loop or asyncio.get_event_loop() + self.logger = logging.getLogger("uvicorn.error") + self.access_logger = logging.getLogger("uvicorn.access") + self.access_log = self.access_logger.hasHandlers() + self.conn = h11.Connection( + h11.SERVER, + config.h11_max_incomplete_event_size + if config.h11_max_incomplete_event_size is not None + else DEFAULT_MAX_INCOMPLETE_EVENT_SIZE, + ) + self.ws_protocol_class = config.ws_protocol_class + self.root_path = config.root_path + self.limit_concurrency = config.limit_concurrency + self.app_state = app_state + + # Timeouts + self.timeout_keep_alive_task: asyncio.TimerHandle | None = None + self.timeout_keep_alive = config.timeout_keep_alive + + # Shared server state + self.server_state = server_state + self.connections = server_state.connections + self.tasks = server_state.tasks + + # Per-connection state + self.transport: asyncio.Transport = None # type: ignore[assignment] + self.flow: FlowControl = None # type: ignore[assignment] + self.server: tuple[str, int | None] | None = None + self.client: tuple[str, int] | None = None + self.scheme: Literal["http", "https"] | None = None + + # Per-request state + self.scope: HTTPScope = None # type: ignore[assignment] + self.headers: list[tuple[bytes, bytes]] = None # type: ignore[assignment] + self.cycle: RequestResponseCycle = None # type: ignore[assignment] + + # Protocol interface + def connection_made( # type: ignore[override] + self, transport: asyncio.Transport + ) -> None: + self.connections.add(self) + + self.transport = transport + self.flow = FlowControl(transport) + self.server = get_local_addr(transport) + self.client = get_remote_addr(transport) + self.scheme = "https" if is_ssl(transport) else "http" + + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sHTTP connection made", prefix) + + def connection_lost(self, exc: Exception | None) -> None: + self.connections.discard(self) + + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sHTTP connection lost", prefix) + + if self.cycle and not self.cycle.response_complete: + self.cycle.disconnected = True + if self.conn.our_state != h11.ERROR: + event = h11.ConnectionClosed() + try: + self.conn.send(event) + except h11.LocalProtocolError: + # Premature client disconnect + pass + + if self.cycle is not None: + self.cycle.message_event.set() + if self.flow is not None: + self.flow.resume_writing() + if exc is None: + self.transport.close() + self._unset_keepalive_if_required() + + def eof_received(self) -> None: + pass + + def _unset_keepalive_if_required(self) -> None: + if self.timeout_keep_alive_task is not None: + self.timeout_keep_alive_task.cancel() + self.timeout_keep_alive_task = None + + def _get_upgrade(self) -> bytes | None: + connection = [] + upgrade = None + for name, value in self.headers: + if name == b"connection": + connection = [token.lower().strip() for token in value.split(b",")] + if name == b"upgrade": + upgrade = value.lower() + if b"upgrade" in connection: + return upgrade + return None + + def _should_upgrade_to_ws(self) -> bool: + if self.ws_protocol_class is None: + return False + return True + + def _unsupported_upgrade_warning(self) -> None: + msg = "Unsupported upgrade request." + self.logger.warning(msg) + if not self._should_upgrade_to_ws(): + msg = "No supported WebSocket library detected. Please use \"pip install 'uvicorn[standard]'\", or install 'websockets' or 'wsproto' manually." # noqa: E501 + self.logger.warning(msg) + + def _should_upgrade(self) -> bool: + upgrade = self._get_upgrade() + if upgrade == b"websocket" and self._should_upgrade_to_ws(): + return True + if upgrade is not None: + self._unsupported_upgrade_warning() + return False + + def data_received(self, data: bytes) -> None: + self._unset_keepalive_if_required() + + self.conn.receive_data(data) + self.handle_events() + + def handle_events(self) -> None: + while True: + try: + event = self.conn.next_event() + except h11.RemoteProtocolError: + msg = "Invalid HTTP request received." + self.logger.warning(msg) + self.send_400_response(msg) + return + + if event is h11.NEED_DATA: + break + + elif event is h11.PAUSED: + # This case can occur in HTTP pipelining, so we need to + # stop reading any more data, and ensure that at the end + # of the active request/response cycle we handle any + # events that have been buffered up. + self.flow.pause_reading() + break + + elif isinstance(event, h11.Request): + self.headers = [(key.lower(), value) for key, value in event.headers] + raw_path, _, query_string = event.target.partition(b"?") + path = unquote(raw_path.decode("ascii")) + full_path = self.root_path + path + full_raw_path = self.root_path.encode("ascii") + raw_path + self.scope = { + "type": "http", + "asgi": {"version": self.config.asgi_version, "spec_version": "2.3"}, + "http_version": event.http_version.decode("ascii"), + "server": self.server, + "client": self.client, + "scheme": self.scheme, # type: ignore[typeddict-item] + "method": event.method.decode("ascii"), + "root_path": self.root_path, + "path": full_path, + "raw_path": full_raw_path, + "query_string": query_string, + "headers": self.headers, + "state": self.app_state.copy(), + } + if self._should_upgrade(): + self.handle_websocket_upgrade(event) + return + + # Handle 503 responses when 'limit_concurrency' is exceeded. + if self.limit_concurrency is not None and ( + len(self.connections) >= self.limit_concurrency or len(self.tasks) >= self.limit_concurrency + ): + app = service_unavailable + message = "Exceeded concurrency limit." + self.logger.warning(message) + else: + app = self.app + + # When starting to process a request, disable the keep-alive + # timeout. Normally we disable this when receiving data from + # client and set back when finishing processing its request. + # However, for pipelined requests processing finishes after + # already receiving the next request and thus the timer may + # be set here, which we don't want. + self._unset_keepalive_if_required() + + self.cycle = RequestResponseCycle( + scope=self.scope, + conn=self.conn, + transport=self.transport, + flow=self.flow, + logger=self.logger, + access_logger=self.access_logger, + access_log=self.access_log, + default_headers=self.server_state.default_headers, + message_event=asyncio.Event(), + on_response=self.on_response_complete, + ) + # For the asyncio loop, we need to explicitly start with an empty context + # as it can be polluted from previous ASGI runs. + # See https://github.com/python/cpython/issues/140947 for details. + task = contextvars.Context().run(self.loop.create_task, self.cycle.run_asgi(app)) + # TODO: Replace the line above with the line below for Python >= 3.11 + # task = self.loop.create_task(self.cycle.run_asgi(app), context=contextvars.Context()) + task.add_done_callback(self.tasks.discard) + self.tasks.add(task) + + elif isinstance(event, h11.Data): + if self.conn.our_state is h11.DONE: + continue + self.cycle.body += event.data + if len(self.cycle.body) > HIGH_WATER_LIMIT: + self.flow.pause_reading() + self.cycle.message_event.set() + + elif isinstance(event, h11.EndOfMessage): + if self.conn.our_state is h11.DONE: + self.transport.resume_reading() + self.conn.start_next_cycle() + continue + self.cycle.more_body = False + self.cycle.message_event.set() + if self.conn.their_state == h11.MUST_CLOSE: + break + + def handle_websocket_upgrade(self, event: h11.Request) -> None: + if self.logger.level <= TRACE_LOG_LEVEL: # pragma: full coverage + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sUpgrading to WebSocket", prefix) + + self.connections.discard(self) + output = [event.method, b" ", event.target, b" HTTP/1.1\r\n"] + for name, value in self.headers: + output += [name, b": ", value, b"\r\n"] + output.append(b"\r\n") + protocol = self.ws_protocol_class( # type: ignore[call-arg, misc] + config=self.config, + server_state=self.server_state, + app_state=self.app_state, + ) + protocol.connection_made(self.transport) + protocol.data_received(b"".join(output)) + self.transport.set_protocol(protocol) + + def send_400_response(self, msg: str) -> None: + reason = STATUS_PHRASES[400] + headers: list[tuple[bytes, bytes]] = [ + (b"content-type", b"text/plain; charset=utf-8"), + (b"connection", b"close"), + ] + event = h11.Response(status_code=400, headers=headers, reason=reason) + output = self.conn.send(event) + self.transport.write(output) + + output = self.conn.send(event=h11.Data(data=msg.encode("ascii"))) + self.transport.write(output) + + output = self.conn.send(event=h11.EndOfMessage()) + self.transport.write(output) + + self.transport.close() + + def on_response_complete(self) -> None: + self.server_state.total_requests += 1 + + if self.transport.is_closing(): + return + + # Set a short Keep-Alive timeout. + self._unset_keepalive_if_required() + + self.timeout_keep_alive_task = self.loop.call_later(self.timeout_keep_alive, self.timeout_keep_alive_handler) + + # Unpause data reads if needed. + self.flow.resume_reading() + + # Unblock any pipelined events. + if self.conn.our_state is h11.DONE and self.conn.their_state is h11.DONE: + self.conn.start_next_cycle() + self.handle_events() + + def shutdown(self) -> None: + """ + Called by the server to commence a graceful shutdown. + """ + if self.cycle is None or self.cycle.response_complete: + event = h11.ConnectionClosed() + self.conn.send(event) + self.transport.close() + else: + self.cycle.keep_alive = False + + def pause_writing(self) -> None: + """ + Called by the transport when the write buffer exceeds the high water mark. + """ + self.flow.pause_writing() # pragma: full coverage + + def resume_writing(self) -> None: + """ + Called by the transport when the write buffer drops below the low water mark. + """ + self.flow.resume_writing() # pragma: full coverage + + def timeout_keep_alive_handler(self) -> None: + """ + Called on a keep-alive connection if no new data is received after a short + delay. + """ + if not self.transport.is_closing(): + event = h11.ConnectionClosed() + self.conn.send(event) + self.transport.close() + + +class RequestResponseCycle: + def __init__( + self, + scope: HTTPScope, + conn: h11.Connection, + transport: asyncio.Transport, + flow: FlowControl, + logger: logging.Logger, + access_logger: logging.Logger, + access_log: bool, + default_headers: list[tuple[bytes, bytes]], + message_event: asyncio.Event, + on_response: Callable[..., None], + ) -> None: + self.scope = scope + self.conn = conn + self.transport = transport + self.flow = flow + self.logger = logger + self.access_logger = access_logger + self.access_log = access_log + self.default_headers = default_headers + self.message_event = message_event + self.on_response = on_response + + # Connection state + self.disconnected = False + self.keep_alive = True + self.waiting_for_100_continue = conn.they_are_waiting_for_100_continue + + # Request state + self.body = b"" + self.more_body = True + + # Response state + self.response_started = False + self.response_complete = False + + # ASGI exception wrapper + async def run_asgi(self, app: ASGI3Application) -> None: + try: + result = await app( # type: ignore[func-returns-value] + self.scope, self.receive, self.send + ) + except BaseException as exc: + msg = "Exception in ASGI application\n" + self.logger.error(msg, exc_info=exc) + if not self.response_started: + await self.send_500_response() + else: + self.transport.close() + else: + if result is not None: + msg = "ASGI callable should return None, but returned '%s'." + self.logger.error(msg, result) + self.transport.close() + elif not self.response_started and not self.disconnected: + msg = "ASGI callable returned without starting response." + self.logger.error(msg) + await self.send_500_response() + elif not self.response_complete and not self.disconnected: + msg = "ASGI callable returned without completing response." + self.logger.error(msg) + self.transport.close() + finally: + self.on_response = lambda: None + + async def send_500_response(self) -> None: + response_start_event: HTTPResponseStartEvent = { + "type": "http.response.start", + "status": 500, + "headers": [ + (b"content-type", b"text/plain; charset=utf-8"), + (b"connection", b"close"), + ], + } + await self.send(response_start_event) + response_body_event: HTTPResponseBodyEvent = { + "type": "http.response.body", + "body": b"Internal Server Error", + "more_body": False, + } + await self.send(response_body_event) + + # ASGI interface + async def send(self, message: ASGISendEvent) -> None: + message_type = message["type"] + + if self.flow.write_paused and not self.disconnected: + await self.flow.drain() # pragma: full coverage + + if self.disconnected: + return # pragma: full coverage + + if not self.response_started: + # Sending response status line and headers + if message_type != "http.response.start": + msg = "Expected ASGI message 'http.response.start', but got '%s'." + raise RuntimeError(msg % message_type) + message = cast("HTTPResponseStartEvent", message) + + self.response_started = True + self.waiting_for_100_continue = False + + status = message["status"] + headers = self.default_headers + list(message.get("headers", [])) + + if CLOSE_HEADER in self.scope["headers"] and CLOSE_HEADER not in headers: + headers = headers + [CLOSE_HEADER] + + if self.access_log: + self.access_logger.info( + '%s - "%s %s HTTP/%s" %d', + get_client_addr(self.scope), + self.scope["method"], + get_path_with_query_string(self.scope), + self.scope["http_version"], + status, + ) + + # Write response status line and headers + reason = STATUS_PHRASES[status] + response = h11.Response(status_code=status, headers=headers, reason=reason) + output = self.conn.send(event=response) + self.transport.write(output) + + elif not self.response_complete: + # Sending response body + if message_type != "http.response.body": + msg = "Expected ASGI message 'http.response.body', but got '%s'." + raise RuntimeError(msg % message_type) + message = cast("HTTPResponseBodyEvent", message) + + body = message.get("body", b"") + more_body = message.get("more_body", False) + + # Write response body + data = b"" if self.scope["method"] == "HEAD" else body + output = self.conn.send(event=h11.Data(data=data)) + self.transport.write(output) + + # Handle response completion + if not more_body: + self.response_complete = True + self.message_event.set() + output = self.conn.send(event=h11.EndOfMessage()) + self.transport.write(output) + + else: + # Response already sent + msg = "Unexpected ASGI message '%s' sent, after response already completed." + raise RuntimeError(msg % message_type) + + if self.response_complete: + if self.conn.our_state is h11.MUST_CLOSE or not self.keep_alive: + self.conn.send(event=h11.ConnectionClosed()) + self.transport.close() + self.on_response() + + async def receive(self) -> ASGIReceiveEvent: + if self.waiting_for_100_continue and not self.transport.is_closing(): + headers: list[tuple[str, str]] = [] + event = h11.InformationalResponse(status_code=100, headers=headers, reason="Continue") + output = self.conn.send(event=event) + self.transport.write(output) + self.waiting_for_100_continue = False + + if not self.disconnected and not self.response_complete: + self.flow.resume_reading() + await self.message_event.wait() + self.message_event.clear() + + if self.disconnected or self.response_complete: + return {"type": "http.disconnect"} + + message: HTTPRequestEvent = { + "type": "http.request", + "body": self.body, + "more_body": self.more_body, + } + self.body = b"" + return message diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/httptools_impl.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/httptools_impl.py new file mode 100644 index 0000000000000000000000000000000000000000..0c9c20f1c819b5525c3e76a6f18102b3cd796c57 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/http/httptools_impl.py @@ -0,0 +1,577 @@ +from __future__ import annotations + +import asyncio +import contextvars +import http +import logging +import re +import urllib +from asyncio.events import TimerHandle +from collections import deque +from collections.abc import Callable +from typing import Any, Literal, cast + +import httptools + +from uvicorn._types import ( + ASGI3Application, + ASGIReceiveEvent, + ASGISendEvent, + HTTPRequestEvent, + HTTPResponseStartEvent, + HTTPScope, +) +from uvicorn.config import Config +from uvicorn.logging import TRACE_LOG_LEVEL +from uvicorn.protocols.http.flow_control import CLOSE_HEADER, HIGH_WATER_LIMIT, FlowControl, service_unavailable +from uvicorn.protocols.utils import get_client_addr, get_local_addr, get_path_with_query_string, get_remote_addr, is_ssl +from uvicorn.server import ServerState + +HEADER_RE = re.compile(b'[\x00-\x1f\x7f()<>@,;:[]={} \t\\"]') +HEADER_VALUE_RE = re.compile(b"[\x00-\x08\x0a-\x1f\x7f]") + + +def _get_status_line(status_code: int) -> bytes: + try: + phrase = http.HTTPStatus(status_code).phrase.encode() + except ValueError: + phrase = b"" + return b"".join([b"HTTP/1.1 ", str(status_code).encode(), b" ", phrase, b"\r\n"]) + + +STATUS_LINE = {status_code: _get_status_line(status_code) for status_code in range(100, 600)} + + +class HttpToolsProtocol(asyncio.Protocol): + def __init__( + self, + config: Config, + server_state: ServerState, + app_state: dict[str, Any], + _loop: asyncio.AbstractEventLoop | None = None, + ) -> None: + if not config.loaded: + config.load() + + self.config = config + self.app = config.loaded_app + self.loop = _loop or asyncio.get_event_loop() + self.logger = logging.getLogger("uvicorn.error") + self.access_logger = logging.getLogger("uvicorn.access") + self.access_log = self.access_logger.hasHandlers() + self.parser = httptools.HttpRequestParser(self) + + try: + # Enable dangerous leniencies to allow server to a response on the first request from a pipelined request. + self.parser.set_dangerous_leniencies(lenient_data_after_close=True) + except AttributeError: # pragma: no cover + # httptools < 0.6.3 + pass + + self.ws_protocol_class = config.ws_protocol_class + self.root_path = config.root_path + self.limit_concurrency = config.limit_concurrency + self.app_state = app_state + + # Timeouts + self.timeout_keep_alive_task: TimerHandle | None = None + self.timeout_keep_alive = config.timeout_keep_alive + + # Global state + self.server_state = server_state + self.connections = server_state.connections + self.tasks = server_state.tasks + + # Per-connection state + self.transport: asyncio.Transport = None # type: ignore[assignment] + self.flow: FlowControl = None # type: ignore[assignment] + self.server: tuple[str, int | None] | None = None + self.client: tuple[str, int] | None = None + self.scheme: Literal["http", "https"] | None = None + self.pipeline: deque[tuple[RequestResponseCycle, ASGI3Application]] = deque() + + # Per-request state + self.scope: HTTPScope = None # type: ignore[assignment] + self.headers: list[tuple[bytes, bytes]] = None # type: ignore[assignment] + self.expect_100_continue = False + self.cycle: RequestResponseCycle = None # type: ignore[assignment] + + # Protocol interface + def connection_made( # type: ignore[override] + self, transport: asyncio.Transport + ) -> None: + self.connections.add(self) + + self.transport = transport + self.flow = FlowControl(transport) + self.server = get_local_addr(transport) + self.client = get_remote_addr(transport) + self.scheme = "https" if is_ssl(transport) else "http" + + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sHTTP connection made", prefix) + + def connection_lost(self, exc: Exception | None) -> None: + self.connections.discard(self) + + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sHTTP connection lost", prefix) + + if self.cycle and not self.cycle.response_complete: + self.cycle.disconnected = True + if self.cycle is not None: + self.cycle.message_event.set() + if self.flow is not None: + self.flow.resume_writing() + if exc is None: + self.transport.close() + self._unset_keepalive_if_required() + + self.parser = None + + def eof_received(self) -> None: + pass + + def _unset_keepalive_if_required(self) -> None: + if self.timeout_keep_alive_task is not None: + self.timeout_keep_alive_task.cancel() + self.timeout_keep_alive_task = None + + def _get_upgrade(self) -> bytes | None: + connection = [] + upgrade = None + for name, value in self.headers: + if name == b"connection": + connection = [token.lower().strip() for token in value.split(b",")] + if name == b"upgrade": + upgrade = value.lower() + if b"upgrade" in connection: + return upgrade + return None # pragma: full coverage + + def _should_upgrade_to_ws(self) -> bool: + if self.ws_protocol_class is None: + return False + return True + + def _unsupported_upgrade_warning(self) -> None: + self.logger.warning("Unsupported upgrade request.") + if not self._should_upgrade_to_ws(): + msg = "No supported WebSocket library detected. Please use \"pip install 'uvicorn[standard]'\", or install 'websockets' or 'wsproto' manually." # noqa: E501 + self.logger.warning(msg) + + def _should_upgrade(self) -> bool: + upgrade = self._get_upgrade() + return upgrade == b"websocket" and self._should_upgrade_to_ws() + + def data_received(self, data: bytes) -> None: + self._unset_keepalive_if_required() + + try: + self.parser.feed_data(data) + except httptools.HttpParserError: + msg = "Invalid HTTP request received." + self.logger.warning(msg) + self.send_400_response(msg) + return + except httptools.HttpParserUpgrade: + if self._should_upgrade(): + self.handle_websocket_upgrade() + else: + self._unsupported_upgrade_warning() + + def handle_websocket_upgrade(self) -> None: + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sUpgrading to WebSocket", prefix) + + self.connections.discard(self) + method = self.scope["method"].encode() + output = [method, b" ", self.url, b" HTTP/1.1\r\n"] + for name, value in self.scope["headers"]: + output += [name, b": ", value, b"\r\n"] + output.append(b"\r\n") + protocol = self.ws_protocol_class( # type: ignore[call-arg, misc] + config=self.config, + server_state=self.server_state, + app_state=self.app_state, + ) + protocol.connection_made(self.transport) + protocol.data_received(b"".join(output)) + self.transport.set_protocol(protocol) + + def send_400_response(self, msg: str) -> None: + content = [STATUS_LINE[400]] + for name, value in self.server_state.default_headers: + content.extend([name, b": ", value, b"\r\n"]) # pragma: full coverage + content.extend( + [ + b"content-type: text/plain; charset=utf-8\r\n", + b"content-length: " + str(len(msg)).encode("ascii") + b"\r\n", + b"connection: close\r\n", + b"\r\n", + msg.encode("ascii"), + ] + ) + self.transport.write(b"".join(content)) + self.transport.close() + + def on_message_begin(self) -> None: + self.url = b"" + self.expect_100_continue = False + self.headers = [] + self.scope = { # type: ignore[typeddict-item] + "type": "http", + "asgi": {"version": self.config.asgi_version, "spec_version": "2.3"}, + "http_version": "1.1", + "server": self.server, + "client": self.client, + "scheme": self.scheme, # type: ignore[typeddict-item] + "root_path": self.root_path, + "headers": self.headers, + "state": self.app_state.copy(), + } + + # Parser callbacks + def on_url(self, url: bytes) -> None: + self.url += url + + def on_header(self, name: bytes, value: bytes) -> None: + name = name.lower() + if name == b"expect" and value.lower() == b"100-continue": + self.expect_100_continue = True + self.headers.append((name, value)) + + def on_headers_complete(self) -> None: + http_version = self.parser.get_http_version() + method = self.parser.get_method() + self.scope["method"] = method.decode("ascii") + if http_version != "1.1": + self.scope["http_version"] = http_version + if self.parser.should_upgrade() and self._should_upgrade(): + return + parsed_url = httptools.parse_url(self.url) + raw_path = parsed_url.path + path = raw_path.decode("ascii") + if "%" in path: + path = urllib.parse.unquote(path) + full_path = self.root_path + path + full_raw_path = self.root_path.encode("ascii") + raw_path + self.scope["path"] = full_path + self.scope["raw_path"] = full_raw_path + self.scope["query_string"] = parsed_url.query or b"" + + # Handle 503 responses when 'limit_concurrency' is exceeded. + if self.limit_concurrency is not None and ( + len(self.connections) >= self.limit_concurrency or len(self.tasks) >= self.limit_concurrency + ): + app = service_unavailable + message = "Exceeded concurrency limit." + self.logger.warning(message) + else: + app = self.app + + existing_cycle = self.cycle + self.cycle = RequestResponseCycle( + scope=self.scope, + transport=self.transport, + flow=self.flow, + logger=self.logger, + access_logger=self.access_logger, + access_log=self.access_log, + default_headers=self.server_state.default_headers, + message_event=asyncio.Event(), + expect_100_continue=self.expect_100_continue, + keep_alive=http_version != "1.0", + on_response=self.on_response_complete, + ) + if existing_cycle is None or existing_cycle.response_complete: + # Standard case - start processing the request. + # For the asyncio loop, we need to explicitly start with an empty context + # as it can be polluted from previous ASGI runs. + # See https://github.com/python/cpython/issues/140947 for details. + task = contextvars.Context().run(self.loop.create_task, self.cycle.run_asgi(app)) + # TODO: Replace the line above with the line below for Python >= 3.11 + # task = self.loop.create_task(self.cycle.run_asgi(app), context=contextvars.Context()) + task.add_done_callback(self.tasks.discard) + self.tasks.add(task) + else: + # Pipelined HTTP requests need to be queued up. + self.flow.pause_reading() + self.pipeline.appendleft((self.cycle, app)) + + def on_body(self, body: bytes) -> None: + if (self.parser.should_upgrade() and self._should_upgrade()) or self.cycle.response_complete: + return + self.cycle.body += body + if len(self.cycle.body) > HIGH_WATER_LIMIT: + self.flow.pause_reading() + self.cycle.message_event.set() + + def on_message_complete(self) -> None: + if (self.parser.should_upgrade() and self._should_upgrade()) or self.cycle.response_complete: + return + self.cycle.more_body = False + self.cycle.message_event.set() + + def on_response_complete(self) -> None: + # Callback for pipelined HTTP requests to be started. + self.server_state.total_requests += 1 + + if self.transport.is_closing(): + return + + self._unset_keepalive_if_required() + + # Unpause data reads if needed. + self.flow.resume_reading() + + # Unblock any pipelined events. If there are none, arm the + # Keep-Alive timeout instead. + if self.pipeline: + cycle, app = self.pipeline.pop() + task = self.loop.create_task(cycle.run_asgi(app)) + task.add_done_callback(self.tasks.discard) + self.tasks.add(task) + else: + self.timeout_keep_alive_task = self.loop.call_later( + self.timeout_keep_alive, self.timeout_keep_alive_handler + ) + + def shutdown(self) -> None: + """ + Called by the server to commence a graceful shutdown. + """ + if self.cycle is None or self.cycle.response_complete: + self.transport.close() + else: + self.cycle.keep_alive = False + + def pause_writing(self) -> None: + """ + Called by the transport when the write buffer exceeds the high water mark. + """ + self.flow.pause_writing() # pragma: full coverage + + def resume_writing(self) -> None: + """ + Called by the transport when the write buffer drops below the low water mark. + """ + self.flow.resume_writing() # pragma: full coverage + + def timeout_keep_alive_handler(self) -> None: + """ + Called on a keep-alive connection if no new data is received after a short + delay. + """ + if not self.transport.is_closing(): + self.transport.close() + + +class RequestResponseCycle: + def __init__( + self, + scope: HTTPScope, + transport: asyncio.Transport, + flow: FlowControl, + logger: logging.Logger, + access_logger: logging.Logger, + access_log: bool, + default_headers: list[tuple[bytes, bytes]], + message_event: asyncio.Event, + expect_100_continue: bool, + keep_alive: bool, + on_response: Callable[..., None], + ): + self.scope = scope + self.transport = transport + self.flow = flow + self.logger = logger + self.access_logger = access_logger + self.access_log = access_log + self.default_headers = default_headers + self.message_event = message_event + self.on_response = on_response + + # Connection state + self.disconnected = False + self.keep_alive = keep_alive + self.waiting_for_100_continue = expect_100_continue + + # Request state + self.body = b"" + self.more_body = True + + # Response state + self.response_started = False + self.response_complete = False + self.chunked_encoding: bool | None = None + self.expected_content_length = 0 + + # ASGI exception wrapper + async def run_asgi(self, app: ASGI3Application) -> None: + try: + result = await app( # type: ignore[func-returns-value] + self.scope, self.receive, self.send + ) + except BaseException as exc: + msg = "Exception in ASGI application\n" + self.logger.error(msg, exc_info=exc) + if not self.response_started: + await self.send_500_response() + else: + self.transport.close() + else: + if result is not None: + msg = "ASGI callable should return None, but returned '%s'." + self.logger.error(msg, result) + self.transport.close() + elif not self.response_started and not self.disconnected: + msg = "ASGI callable returned without starting response." + self.logger.error(msg) + await self.send_500_response() + elif not self.response_complete and not self.disconnected: + msg = "ASGI callable returned without completing response." + self.logger.error(msg) + self.transport.close() + finally: + self.on_response = lambda: None + + async def send_500_response(self) -> None: + await self.send( + { + "type": "http.response.start", + "status": 500, + "headers": [ + (b"content-type", b"text/plain; charset=utf-8"), + (b"content-length", b"21"), + (b"connection", b"close"), + ], + } + ) + await self.send({"type": "http.response.body", "body": b"Internal Server Error", "more_body": False}) + + # ASGI interface + async def send(self, message: ASGISendEvent) -> None: + message_type = message["type"] + + if self.flow.write_paused and not self.disconnected: + await self.flow.drain() # pragma: full coverage + + if self.disconnected: + return # pragma: full coverage + + if not self.response_started: + # Sending response status line and headers + if message_type != "http.response.start": + msg = "Expected ASGI message 'http.response.start', but got '%s'." + raise RuntimeError(msg % message_type) + message = cast("HTTPResponseStartEvent", message) + + self.response_started = True + self.waiting_for_100_continue = False + + status_code = message["status"] + headers = self.default_headers + list(message.get("headers", [])) + + if CLOSE_HEADER in self.scope["headers"] and CLOSE_HEADER not in headers: + headers = headers + [CLOSE_HEADER] + + if self.access_log: + self.access_logger.info( + '%s - "%s %s HTTP/%s" %d', + get_client_addr(self.scope), + self.scope["method"], + get_path_with_query_string(self.scope), + self.scope["http_version"], + status_code, + ) + + # Write response status line and headers + content = [STATUS_LINE[status_code]] + + for name, value in headers: + if HEADER_RE.search(name): + raise RuntimeError("Invalid HTTP header name.") # pragma: full coverage + if HEADER_VALUE_RE.search(value): + raise RuntimeError("Invalid HTTP header value.") + + name = name.lower() + if name == b"content-length" and self.chunked_encoding is None: + self.expected_content_length = int(value.decode()) + self.chunked_encoding = False + elif name == b"transfer-encoding" and value.lower() == b"chunked": + self.expected_content_length = 0 + self.chunked_encoding = True + elif name == b"connection" and value.lower() == b"close": + self.keep_alive = False + content.extend([name, b": ", value, b"\r\n"]) + + if self.chunked_encoding is None and self.scope["method"] != "HEAD" and status_code not in (204, 304): + # Neither content-length nor transfer-encoding specified + self.chunked_encoding = True + content.append(b"transfer-encoding: chunked\r\n") + + content.append(b"\r\n") + self.transport.write(b"".join(content)) + + elif not self.response_complete: + # Sending response body + if message_type != "http.response.body": + msg = "Expected ASGI message 'http.response.body', but got '%s'." + raise RuntimeError(msg % message_type) + + body = cast(bytes, message.get("body", b"")) + more_body = message.get("more_body", False) + + # Write response body + if self.scope["method"] == "HEAD": + self.expected_content_length = 0 + elif self.chunked_encoding: + if body: + content = [b"%x\r\n" % len(body), body, b"\r\n"] + else: + content = [] + if not more_body: + content.append(b"0\r\n\r\n") + self.transport.write(b"".join(content)) + else: + num_bytes = len(body) + if num_bytes > self.expected_content_length: + raise RuntimeError("Response content longer than Content-Length") + else: + self.expected_content_length -= num_bytes + self.transport.write(body) + + # Handle response completion + if not more_body: + if self.expected_content_length != 0: + raise RuntimeError("Response content shorter than Content-Length") + self.response_complete = True + self.message_event.set() + if not self.keep_alive: + self.transport.close() + self.on_response() + + else: + # Response already sent + msg = "Unexpected ASGI message '%s' sent, after response already completed." + raise RuntimeError(msg % message_type) + + async def receive(self) -> ASGIReceiveEvent: + if self.waiting_for_100_continue and not self.transport.is_closing(): + self.transport.write(b"HTTP/1.1 100 Continue\r\n\r\n") + self.waiting_for_100_continue = False + + if not self.disconnected and not self.response_complete: + self.flow.resume_reading() + await self.message_event.wait() + self.message_event.clear() + + if self.disconnected or self.response_complete: + return {"type": "http.disconnect"} + message: HTTPRequestEvent = {"type": "http.request", "body": self.body, "more_body": self.more_body} + self.body = b"" + return message diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b968760d36eacf2fda6584f512d344a2fb8f73d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/auto.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/auto.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..270fd80a1260ba7a2d35635a8995bb624ce581c2 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/auto.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/websockets_impl.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/websockets_impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..20da306615d81a399a2a5061d2f0df908d8c5560 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/websockets_impl.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/websockets_sansio_impl.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/websockets_sansio_impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..23731e269171e7af788b2c5ac3d6bdcf452c5d38 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/websockets_sansio_impl.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/wsproto_impl.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/wsproto_impl.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f8bb4eba22c3f3a715f618e52f1dbbbefdb14d91 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/__pycache__/wsproto_impl.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/auto.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/auto.py new file mode 100644 index 0000000000000000000000000000000000000000..7180ad39788c6fb14e15ae3fda379aba01c332f8 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/auto.py @@ -0,0 +1,21 @@ +from __future__ import annotations + +import asyncio +from collections.abc import Callable + +AutoWebSocketsProtocol: Callable[..., asyncio.Protocol] | None +try: + import websockets # noqa +except ImportError: # pragma: no cover + try: + import wsproto # noqa + except ImportError: + AutoWebSocketsProtocol = None + else: + from uvicorn.protocols.websockets.wsproto_impl import WSProtocol + + AutoWebSocketsProtocol = WSProtocol +else: + from uvicorn.protocols.websockets.websockets_impl import WebSocketProtocol + + AutoWebSocketsProtocol = WebSocketProtocol diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/websockets_impl.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/websockets_impl.py new file mode 100644 index 0000000000000000000000000000000000000000..1721e4c4610689b08d7ceda62016750e9a33a007 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/websockets_impl.py @@ -0,0 +1,384 @@ +from __future__ import annotations + +import asyncio +import http +import logging +from collections.abc import Sequence +from typing import Any, Literal, cast +from urllib.parse import unquote + +import websockets +import websockets.legacy.handshake +from websockets.datastructures import Headers +from websockets.exceptions import ConnectionClosed +from websockets.extensions.base import ServerExtensionFactory +from websockets.extensions.permessage_deflate import ServerPerMessageDeflateFactory +from websockets.legacy.server import HTTPResponse +from websockets.server import WebSocketServerProtocol +from websockets.typing import Subprotocol + +from uvicorn._types import ( + ASGI3Application, + ASGISendEvent, + WebSocketAcceptEvent, + WebSocketCloseEvent, + WebSocketConnectEvent, + WebSocketDisconnectEvent, + WebSocketReceiveEvent, + WebSocketResponseBodyEvent, + WebSocketResponseStartEvent, + WebSocketScope, + WebSocketSendEvent, +) +from uvicorn.config import Config +from uvicorn.logging import TRACE_LOG_LEVEL +from uvicorn.protocols.utils import ( + ClientDisconnected, + get_client_addr, + get_local_addr, + get_path_with_query_string, + get_remote_addr, + is_ssl, +) +from uvicorn.server import ServerState + + +class Server: + closing = False + + def register(self, ws: WebSocketServerProtocol) -> None: + pass + + def unregister(self, ws: WebSocketServerProtocol) -> None: + pass + + def is_serving(self) -> bool: + return not self.closing + + +class WebSocketProtocol(WebSocketServerProtocol): + extra_headers: list[tuple[str, str]] + logger: logging.Logger | logging.LoggerAdapter[Any] + + def __init__( + self, + config: Config, + server_state: ServerState, + app_state: dict[str, Any], + _loop: asyncio.AbstractEventLoop | None = None, + ): + if not config.loaded: + config.load() + + self.config = config + self.app = cast(ASGI3Application, config.loaded_app) + self.loop = _loop or asyncio.get_event_loop() + self.root_path = config.root_path + self.app_state = app_state + + # Shared server state + self.connections = server_state.connections + self.tasks = server_state.tasks + + # Connection state + self.transport: asyncio.Transport = None # type: ignore[assignment] + self.server: tuple[str, int | None] | None = None + self.client: tuple[str, int] | None = None + self.scheme: Literal["wss", "ws"] = None # type: ignore[assignment] + + # Connection events + self.scope: WebSocketScope + self.handshake_started_event = asyncio.Event() + self.handshake_completed_event = asyncio.Event() + self.closed_event = asyncio.Event() + self.initial_response: HTTPResponse | None = None + self.connect_sent = False + self.lost_connection_before_handshake = False + self.accepted_subprotocol: Subprotocol | None = None + + self.ws_server: Server = Server() # type: ignore[assignment] + + extensions: list[ServerExtensionFactory] = [] + if self.config.ws_per_message_deflate: + extensions.append(ServerPerMessageDeflateFactory()) + + super().__init__( + ws_handler=self.ws_handler, + ws_server=self.ws_server, # type: ignore[arg-type] + max_size=self.config.ws_max_size, + max_queue=self.config.ws_max_queue, + ping_interval=self.config.ws_ping_interval, + ping_timeout=self.config.ws_ping_timeout, + extensions=extensions, + logger=logging.getLogger("uvicorn.error"), + ) + self.server_header = None + self.extra_headers = [ + (name.decode("latin-1"), value.decode("latin-1")) for name, value in server_state.default_headers + ] + + def connection_made( # type: ignore[override] + self, transport: asyncio.Transport + ) -> None: + self.connections.add(self) + self.transport = transport + self.server = get_local_addr(transport) + self.client = get_remote_addr(transport) + self.scheme = "wss" if is_ssl(transport) else "ws" + + if self.logger.isEnabledFor(TRACE_LOG_LEVEL): + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sWebSocket connection made", prefix) + + super().connection_made(transport) + + def connection_lost(self, exc: Exception | None) -> None: + self.connections.remove(self) + + if self.logger.isEnabledFor(TRACE_LOG_LEVEL): + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sWebSocket connection lost", prefix) + + self.lost_connection_before_handshake = not self.handshake_completed_event.is_set() + self.handshake_completed_event.set() + super().connection_lost(exc) + if exc is None: + self.transport.close() + + def shutdown(self) -> None: + self.ws_server.closing = True + if self.handshake_completed_event.is_set(): + self.fail_connection(1012) + else: + self.send_500_response() + self.transport.close() + + def on_task_complete(self, task: asyncio.Task[None]) -> None: + self.tasks.discard(task) + + async def process_request(self, path: str, request_headers: Headers) -> HTTPResponse | None: + """ + This hook is called to determine if the websocket should return + an HTTP response and close. + + Our behavior here is to start the ASGI application, and then wait + for either `accept` or `close` in order to determine if we should + close the connection. + """ + path_portion, _, query_string = path.partition("?") + + websockets.legacy.handshake.check_request(request_headers) + + subprotocols: list[str] = [] + for header in request_headers.get_all("Sec-WebSocket-Protocol"): + subprotocols.extend([token.strip() for token in header.split(",")]) + + asgi_headers = [ + (name.encode("ascii"), value.encode("ascii", errors="surrogateescape")) + for name, value in request_headers.raw_items() + ] + path = unquote(path_portion) + full_path = self.root_path + path + full_raw_path = self.root_path.encode("ascii") + path_portion.encode("ascii") + + self.scope = { + "type": "websocket", + "asgi": {"version": self.config.asgi_version, "spec_version": "2.4"}, + "http_version": "1.1", + "scheme": self.scheme, + "server": self.server, + "client": self.client, + "root_path": self.root_path, + "path": full_path, + "raw_path": full_raw_path, + "query_string": query_string.encode("ascii"), + "headers": asgi_headers, + "subprotocols": subprotocols, + "state": self.app_state.copy(), + "extensions": {"websocket.http.response": {}}, + } + task = self.loop.create_task(self.run_asgi()) + task.add_done_callback(self.on_task_complete) + self.tasks.add(task) + await self.handshake_started_event.wait() + return self.initial_response + + def process_subprotocol( + self, headers: Headers, available_subprotocols: Sequence[Subprotocol] | None + ) -> Subprotocol | None: + """ + We override the standard 'process_subprotocol' behavior here so that + we return whatever subprotocol is sent in the 'accept' message. + """ + return self.accepted_subprotocol + + def send_500_response(self) -> None: + msg = b"Internal Server Error" + content = [ + b"HTTP/1.1 500 Internal Server Error\r\ncontent-type: text/plain; charset=utf-8\r\n", + b"content-length: " + str(len(msg)).encode("ascii") + b"\r\n", + b"connection: close\r\n", + b"\r\n", + msg, + ] + self.transport.write(b"".join(content)) + # Allow handler task to terminate cleanly, as websockets doesn't cancel it by + # itself (see https://github.com/Kludex/uvicorn/issues/920) + self.handshake_started_event.set() + + async def ws_handler(self, protocol: WebSocketServerProtocol, path: str) -> Any: # type: ignore[override] + """ + This is the main handler function for the 'websockets' implementation + to call into. We just wait for close then return, and instead allow + 'send' and 'receive' events to drive the flow. + """ + self.handshake_completed_event.set() + await self.wait_closed() + + async def run_asgi(self) -> None: + """ + Wrapper around the ASGI callable, handling exceptions and unexpected + termination states. + """ + try: + result = await self.app(self.scope, self.asgi_receive, self.asgi_send) # type: ignore[func-returns-value] + except ClientDisconnected: # pragma: full coverage + self.closed_event.set() + except BaseException: + self.closed_event.set() + self.logger.exception("Exception in ASGI application\n") + if not self.handshake_started_event.is_set(): + self.send_500_response() + else: + await self.handshake_completed_event.wait() + else: + self.closed_event.set() + if not self.handshake_started_event.is_set(): + self.logger.error("ASGI callable returned without sending handshake.") + self.send_500_response() + elif result is not None: + self.logger.error("ASGI callable should return None, but returned '%s'.", result) + await self.handshake_completed_event.wait() + self.transport.close() + + async def asgi_send(self, message: ASGISendEvent) -> None: + message_type = message["type"] + + if not self.handshake_started_event.is_set(): + if message_type == "websocket.accept": + message = cast("WebSocketAcceptEvent", message) + self.logger.info( + '%s - "WebSocket %s" [accepted]', + get_client_addr(self.scope), + get_path_with_query_string(self.scope), + ) + self.initial_response = None + self.accepted_subprotocol = cast(Subprotocol | None, message.get("subprotocol")) + if "headers" in message: + self.extra_headers.extend( + # ASGI spec requires bytes + # But for compatibility we need to convert it to strings + (name.decode("latin-1"), value.decode("latin-1")) + for name, value in message["headers"] + ) + self.handshake_started_event.set() + + elif message_type == "websocket.close": + message = cast("WebSocketCloseEvent", message) + self.logger.info( + '%s - "WebSocket %s" 403', + get_client_addr(self.scope), + get_path_with_query_string(self.scope), + ) + self.initial_response = (http.HTTPStatus.FORBIDDEN, [], b"") + self.handshake_started_event.set() + self.closed_event.set() + + elif message_type == "websocket.http.response.start": + message = cast("WebSocketResponseStartEvent", message) + self.logger.info( + '%s - "WebSocket %s" %d', + get_client_addr(self.scope), + get_path_with_query_string(self.scope), + message["status"], + ) + # websockets requires the status to be an enum. look it up. + status = http.HTTPStatus(message["status"]) + headers = [ + (name.decode("latin-1"), value.decode("latin-1")) for name, value in message.get("headers", []) + ] + self.initial_response = (status, headers, b"") + self.handshake_started_event.set() + + else: + msg = ( + "Expected ASGI message 'websocket.accept', 'websocket.close', " + "or 'websocket.http.response.start' but got '%s'." + ) + raise RuntimeError(msg % message_type) + + elif not self.closed_event.is_set() and self.initial_response is None: + await self.handshake_completed_event.wait() + + try: + if message_type == "websocket.send": + message = cast("WebSocketSendEvent", message) + bytes_data = message.get("bytes") + text_data = message.get("text") + data = text_data if bytes_data is None else bytes_data + await self.send(data) # type: ignore[arg-type] + + elif message_type == "websocket.close": + message = cast("WebSocketCloseEvent", message) + code = message.get("code", 1000) + reason = message.get("reason", "") or "" + await self.close(code, reason) + self.closed_event.set() + + else: + msg = "Expected ASGI message 'websocket.send' or 'websocket.close', but got '%s'." + raise RuntimeError(msg % message_type) + except ConnectionClosed as exc: + raise ClientDisconnected from exc + + elif self.initial_response is not None: + if message_type == "websocket.http.response.body": + message = cast("WebSocketResponseBodyEvent", message) + body = self.initial_response[2] + message["body"] + self.initial_response = self.initial_response[:2] + (body,) + if not message.get("more_body", False): + self.closed_event.set() + else: + msg = "Expected ASGI message 'websocket.http.response.body' but got '%s'." + raise RuntimeError(msg % message_type) + + else: + msg = "Unexpected ASGI message '%s', after sending 'websocket.close' or response already completed." + raise RuntimeError(msg % message_type) + + async def asgi_receive(self) -> WebSocketDisconnectEvent | WebSocketConnectEvent | WebSocketReceiveEvent: + if not self.connect_sent: + self.connect_sent = True + return {"type": "websocket.connect"} + + await self.handshake_completed_event.wait() + + if self.lost_connection_before_handshake: + # If the handshake failed or the app closed before handshake completion, + # use 1006 Abnormal Closure. + return {"type": "websocket.disconnect", "code": 1006} + + if self.closed_event.is_set(): + return {"type": "websocket.disconnect", "code": 1005} + + try: + data = await self.recv() + except ConnectionClosed: + self.closed_event.set() + if self.ws_server.closing: + return {"type": "websocket.disconnect", "code": 1012} + return {"type": "websocket.disconnect", "code": self.close_code or 1005, "reason": self.close_reason} + + if isinstance(data, str): + return {"type": "websocket.receive", "text": data} + return {"type": "websocket.receive", "bytes": data} diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/websockets_sansio_impl.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/websockets_sansio_impl.py new file mode 100644 index 0000000000000000000000000000000000000000..fbbd20f1ec0b33dc9523637f1548d0fc828042df --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/websockets_sansio_impl.py @@ -0,0 +1,415 @@ +from __future__ import annotations + +import asyncio +import logging +import sys +from asyncio.transports import BaseTransport, Transport +from http import HTTPStatus +from typing import Any, Literal, cast +from urllib.parse import unquote + +from websockets.exceptions import InvalidState +from websockets.extensions.permessage_deflate import ServerPerMessageDeflateFactory +from websockets.frames import Frame, Opcode +from websockets.http11 import Request +from websockets.server import ServerProtocol + +from uvicorn._types import ( + ASGIReceiveEvent, + ASGISendEvent, + WebSocketAcceptEvent, + WebSocketCloseEvent, + WebSocketResponseBodyEvent, + WebSocketResponseStartEvent, + WebSocketScope, + WebSocketSendEvent, +) +from uvicorn.config import Config +from uvicorn.logging import TRACE_LOG_LEVEL +from uvicorn.protocols.utils import ( + ClientDisconnected, + get_local_addr, + get_path_with_query_string, + get_remote_addr, + is_ssl, +) +from uvicorn.server import ServerState + +if sys.version_info >= (3, 11): # pragma: no cover + from typing import assert_never +else: # pragma: no cover + from typing_extensions import assert_never + + +class WebSocketsSansIOProtocol(asyncio.Protocol): + def __init__( + self, + config: Config, + server_state: ServerState, + app_state: dict[str, Any], + _loop: asyncio.AbstractEventLoop | None = None, + ) -> None: + if not config.loaded: + config.load() # pragma: no cover + + self.config = config + self.app = config.loaded_app + self.loop = _loop or asyncio.get_event_loop() + self.logger = logging.getLogger("uvicorn.error") + self.root_path = config.root_path + self.app_state = app_state + + # Shared server state + self.connections = server_state.connections + self.tasks = server_state.tasks + self.default_headers = server_state.default_headers + + # Connection state + self.transport: asyncio.Transport = None # type: ignore[assignment] + self.server: tuple[str, int | None] | None = None + self.client: tuple[str, int] | None = None + self.scheme: Literal["wss", "ws"] = None # type: ignore[assignment] + + # WebSocket state + self.queue: asyncio.Queue[ASGIReceiveEvent] = asyncio.Queue() + self.handshake_initiated = False + self.handshake_complete = False + self.close_sent = False + self.initial_response: tuple[int, list[tuple[str, str]], bytes] | None = None + + extensions = [] + if self.config.ws_per_message_deflate: + extensions = [ + ServerPerMessageDeflateFactory( + server_max_window_bits=12, + client_max_window_bits=12, + compress_settings={"memLevel": 5}, + ) + ] + self.conn = ServerProtocol( + extensions=extensions, + max_size=self.config.ws_max_size, + logger=logging.getLogger("uvicorn.error"), + ) + + self.read_paused = False + self.writable = asyncio.Event() + self.writable.set() + + # Buffers + self.bytes = b"" + + def connection_made(self, transport: BaseTransport) -> None: + """Called when a connection is made.""" + transport = cast(Transport, transport) + self.connections.add(self) + self.transport = transport + self.server = get_local_addr(transport) + self.client = get_remote_addr(transport) + self.scheme = "wss" if is_ssl(transport) else "ws" + + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sWebSocket connection made", prefix) + + def connection_lost(self, exc: Exception | None) -> None: + code = 1005 if self.handshake_complete else 1006 + self.queue.put_nowait({"type": "websocket.disconnect", "code": code}) + self.connections.remove(self) + + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sWebSocket connection lost", prefix) + + self.handshake_complete = True + if exc is None: + self.transport.close() + + def eof_received(self) -> None: + pass + + def shutdown(self) -> None: + if self.handshake_complete: + self.queue.put_nowait({"type": "websocket.disconnect", "code": 1012}) + self.conn.send_close(1012) + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + else: + self.send_500_response() + self.transport.close() + + def data_received(self, data: bytes) -> None: + self.conn.receive_data(data) + if self.conn.parser_exc is not None: # pragma: no cover + self.handle_parser_exception() + return + self.handle_events() + + def handle_events(self) -> None: + for event in self.conn.events_received(): + if isinstance(event, Request): + self.handle_connect(event) + if isinstance(event, Frame): + if event.opcode == Opcode.CONT: + self.handle_cont(event) # pragma: no cover + elif event.opcode == Opcode.TEXT: + self.handle_text(event) + elif event.opcode == Opcode.BINARY: + self.handle_bytes(event) + elif event.opcode == Opcode.PING: + self.handle_ping() + elif event.opcode == Opcode.PONG: + pass # pragma: no cover + elif event.opcode == Opcode.CLOSE: + self.handle_close(event) + else: + assert_never(event.opcode) # pragma: no cover + + # Event handlers + + def handle_connect(self, event: Request) -> None: + self.request = event + self.response = self.conn.accept(event) + self.handshake_initiated = True + if self.response.status_code != 101: + self.handshake_complete = True + self.close_sent = True + self.conn.send_response(self.response) + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + self.transport.close() + return + + headers = [ + (key.encode("ascii"), value.encode("ascii", errors="surrogateescape")) + for key, value in event.headers.raw_items() + ] + raw_path, _, query_string = event.path.partition("?") + self.scope: WebSocketScope = { + "type": "websocket", + "asgi": {"version": self.config.asgi_version, "spec_version": "2.3"}, + "http_version": "1.1", + "scheme": self.scheme, + "server": self.server, + "client": self.client, + "root_path": self.root_path, + "path": unquote(raw_path), + "raw_path": raw_path.encode("ascii"), + "query_string": query_string.encode("ascii"), + "headers": headers, + "subprotocols": event.headers.get_all("Sec-WebSocket-Protocol"), + "state": self.app_state.copy(), + "extensions": {"websocket.http.response": {}}, + } + self.queue.put_nowait({"type": "websocket.connect"}) + task = self.loop.create_task(self.run_asgi()) + task.add_done_callback(self.on_task_complete) + self.tasks.add(task) + + def handle_cont(self, event: Frame) -> None: # pragma: no cover + self.bytes += event.data + if event.fin: + self.send_receive_event_to_app() + + def handle_text(self, event: Frame) -> None: + self.bytes = event.data + self.curr_msg_data_type: Literal["text", "bytes"] = "text" + if event.fin: + self.send_receive_event_to_app() + + def handle_bytes(self, event: Frame) -> None: + self.bytes = event.data + self.curr_msg_data_type = "bytes" + if event.fin: + self.send_receive_event_to_app() + + def send_receive_event_to_app(self) -> None: + if self.curr_msg_data_type == "text": + try: + self.queue.put_nowait({"type": "websocket.receive", "text": self.bytes.decode()}) + except UnicodeDecodeError: # pragma: no cover + self.logger.exception("Invalid UTF-8 sequence received from client.") + self.conn.send_close(1007) + self.handle_parser_exception() + return + else: + self.queue.put_nowait({"type": "websocket.receive", "bytes": self.bytes}) + if not self.read_paused: + self.read_paused = True + self.transport.pause_reading() + + def handle_ping(self) -> None: + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + + def handle_close(self, event: Frame) -> None: + if not self.close_sent and not self.transport.is_closing(): + assert self.conn.close_rcvd is not None + code = self.conn.close_rcvd.code + reason = self.conn.close_rcvd.reason + self.queue.put_nowait({"type": "websocket.disconnect", "code": code, "reason": reason}) + + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + self.transport.close() + + def handle_parser_exception(self) -> None: # pragma: no cover + assert self.conn.close_sent is not None + code = self.conn.close_sent.code + reason = self.conn.close_sent.reason + self.queue.put_nowait({"type": "websocket.disconnect", "code": code, "reason": reason}) + + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + self.close_sent = True + self.transport.close() + + def on_task_complete(self, task: asyncio.Task[None]) -> None: + self.tasks.discard(task) + + async def run_asgi(self) -> None: + try: + result = await self.app(self.scope, self.receive, self.send) + except ClientDisconnected: + pass # pragma: full coverage + except BaseException: + self.logger.exception("Exception in ASGI application\n") + self.send_500_response() + else: + if not self.handshake_complete: + self.logger.error("ASGI callable returned without completing handshake.") + self.send_500_response() + elif result is not None: + self.logger.error("ASGI callable should return None, but returned '%s'.", result) + self.transport.close() + + def send_500_response(self) -> None: + if self.initial_response or self.handshake_complete: + return + response = self.conn.reject(500, "Internal Server Error") + self.conn.send_response(response) + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + + async def send(self, message: ASGISendEvent) -> None: + await self.writable.wait() + + message_type = message["type"] + + if not self.handshake_complete and self.initial_response is None: + if message_type == "websocket.accept": + message = cast(WebSocketAcceptEvent, message) + self.logger.info( + '%s - "WebSocket %s" [accepted]', + self.scope["client"], + get_path_with_query_string(self.scope), + ) + headers = [ + (name.decode("latin-1").lower(), value.decode("latin-1").lower()) + for name, value in (self.default_headers + list(message.get("headers", []))) + ] + accepted_subprotocol = message.get("subprotocol") + if accepted_subprotocol: + headers.append(("Sec-WebSocket-Protocol", accepted_subprotocol)) + self.response.headers.update(headers) + + if not self.transport.is_closing(): + self.handshake_complete = True + self.conn.send_response(self.response) + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + + elif message_type == "websocket.close": + message = cast(WebSocketCloseEvent, message) + self.queue.put_nowait({"type": "websocket.disconnect", "code": 1006}) + self.logger.info( + '%s - "WebSocket %s" 403', + self.scope["client"], + get_path_with_query_string(self.scope), + ) + response = self.conn.reject(HTTPStatus.FORBIDDEN, "") + self.conn.send_response(response) + output = self.conn.data_to_send() + self.close_sent = True + self.handshake_complete = True + self.transport.write(b"".join(output)) + self.transport.close() + elif message_type == "websocket.http.response.start" and self.initial_response is None: + message = cast(WebSocketResponseStartEvent, message) + if not (100 <= message["status"] < 600): + raise RuntimeError("Invalid HTTP status code '%d' in response." % message["status"]) + self.logger.info( + '%s - "WebSocket %s" %d', + self.scope["client"], + get_path_with_query_string(self.scope), + message["status"], + ) + headers = [ + (name.decode("latin-1"), value.decode("latin-1")) + for name, value in list(message.get("headers", [])) + ] + self.initial_response = (message["status"], headers, b"") + else: + msg = ( + "Expected ASGI message 'websocket.accept', 'websocket.close' " + "or 'websocket.http.response.start' " + "but got '%s'." + ) + raise RuntimeError(msg % message_type) + + elif not self.close_sent and self.initial_response is None: + try: + if message_type == "websocket.send": + message = cast(WebSocketSendEvent, message) + bytes_data = message.get("bytes") + text_data = message.get("text") + if text_data: + self.conn.send_text(text_data.encode()) + elif bytes_data: + self.conn.send_binary(bytes_data) + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + + elif message_type == "websocket.close" and not self.transport.is_closing(): + message = cast(WebSocketCloseEvent, message) + code = message.get("code", 1000) + reason = message.get("reason", "") or "" + self.queue.put_nowait({"type": "websocket.disconnect", "code": code, "reason": reason}) + self.conn.send_close(code, reason) + output = self.conn.data_to_send() + self.transport.write(b"".join(output)) + self.close_sent = True + self.transport.close() + else: + msg = "Expected ASGI message 'websocket.send' or 'websocket.close', but got '%s'." + raise RuntimeError(msg % message_type) + except InvalidState: + raise ClientDisconnected() + elif self.initial_response is not None: + if message_type == "websocket.http.response.body": + message = cast(WebSocketResponseBodyEvent, message) + body = self.initial_response[2] + message["body"] + self.initial_response = self.initial_response[:2] + (body,) + if not message.get("more_body", False): + response = self.conn.reject(self.initial_response[0], body.decode()) + response.headers.update(self.initial_response[1]) + self.queue.put_nowait({"type": "websocket.disconnect", "code": 1006}) + self.conn.send_response(response) + output = self.conn.data_to_send() + self.close_sent = True + self.transport.write(b"".join(output)) + self.transport.close() + else: # pragma: no cover + msg = "Expected ASGI message 'websocket.http.response.body' but got '%s'." + raise RuntimeError(msg % message_type) + + else: + msg = "Unexpected ASGI message '%s', after sending 'websocket.close'." + raise RuntimeError(msg % message_type) + + async def receive(self) -> ASGIReceiveEvent: + message = await self.queue.get() + if self.read_paused and self.queue.empty(): + self.read_paused = False + self.transport.resume_reading() + return message diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/wsproto_impl.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/wsproto_impl.py new file mode 100644 index 0000000000000000000000000000000000000000..075ec2401621e039f9a353e2f080d27544f1693a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/protocols/websockets/wsproto_impl.py @@ -0,0 +1,375 @@ +from __future__ import annotations + +import asyncio +import logging +from typing import Any, Literal, cast +from urllib.parse import unquote + +import wsproto +from wsproto import ConnectionType, events +from wsproto.connection import ConnectionState +from wsproto.extensions import Extension, PerMessageDeflate +from wsproto.utilities import LocalProtocolError, RemoteProtocolError + +from uvicorn._types import ( + ASGI3Application, + ASGISendEvent, + WebSocketAcceptEvent, + WebSocketCloseEvent, + WebSocketEvent, + WebSocketResponseBodyEvent, + WebSocketResponseStartEvent, + WebSocketScope, + WebSocketSendEvent, +) +from uvicorn.config import Config +from uvicorn.logging import TRACE_LOG_LEVEL +from uvicorn.protocols.utils import ( + ClientDisconnected, + get_client_addr, + get_local_addr, + get_path_with_query_string, + get_remote_addr, + is_ssl, +) +from uvicorn.server import ServerState + + +class WSProtocol(asyncio.Protocol): + def __init__( + self, + config: Config, + server_state: ServerState, + app_state: dict[str, Any], + _loop: asyncio.AbstractEventLoop | None = None, + ) -> None: + if not config.loaded: + config.load() # pragma: full coverage + + self.config = config + self.app = cast(ASGI3Application, config.loaded_app) + self.loop = _loop or asyncio.get_event_loop() + self.logger = logging.getLogger("uvicorn.error") + self.root_path = config.root_path + self.app_state = app_state + + # Shared server state + self.connections = server_state.connections + self.tasks = server_state.tasks + self.default_headers = server_state.default_headers + + # Connection state + self.transport: asyncio.Transport = None # type: ignore[assignment] + self.server: tuple[str, int | None] | None = None + self.client: tuple[str, int] | None = None + self.scheme: Literal["wss", "ws"] = None # type: ignore[assignment] + + # WebSocket state + self.queue: asyncio.Queue[WebSocketEvent] = asyncio.Queue() + self.handshake_complete = False + self.close_sent = False + + # Rejection state + self.response_started = False + + self.conn = wsproto.WSConnection(connection_type=ConnectionType.SERVER) + + self.read_paused = False + self.writable = asyncio.Event() + self.writable.set() + + # Buffers + self.bytes = b"" + self.text = "" + + # Protocol interface + + def connection_made( # type: ignore[override] + self, transport: asyncio.Transport + ) -> None: + self.connections.add(self) + self.transport = transport + self.server = get_local_addr(transport) + self.client = get_remote_addr(transport) + self.scheme = "wss" if is_ssl(transport) else "ws" + + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sWebSocket connection made", prefix) + + def connection_lost(self, exc: Exception | None) -> None: + code = 1005 if self.handshake_complete else 1006 + self.queue.put_nowait({"type": "websocket.disconnect", "code": code}) + self.connections.remove(self) + + if self.logger.level <= TRACE_LOG_LEVEL: + prefix = "%s:%d - " % self.client if self.client else "" + self.logger.log(TRACE_LOG_LEVEL, "%sWebSocket connection lost", prefix) + + self.handshake_complete = True + if exc is None: + self.transport.close() + + def eof_received(self) -> None: + pass + + def data_received(self, data: bytes) -> None: + try: + self.conn.receive_data(data) + except RemoteProtocolError as err: + # TODO: Remove `type: ignore` when wsproto fixes the type annotation. + self.transport.write(self.conn.send(err.event_hint)) # type: ignore[arg-type] # noqa: E501 + self.transport.close() + else: + self.handle_events() + + def handle_events(self) -> None: + for event in self.conn.events(): + if isinstance(event, events.Request): + self.handle_connect(event) + elif isinstance(event, events.TextMessage): + self.handle_text(event) + elif isinstance(event, events.BytesMessage): + self.handle_bytes(event) + elif isinstance(event, events.CloseConnection): + self.handle_close(event) + elif isinstance(event, events.Ping): + self.handle_ping(event) + + def pause_writing(self) -> None: + """ + Called by the transport when the write buffer exceeds the high water mark. + """ + self.writable.clear() # pragma: full coverage + + def resume_writing(self) -> None: + """ + Called by the transport when the write buffer drops below the low water mark. + """ + self.writable.set() # pragma: full coverage + + def shutdown(self) -> None: + if self.handshake_complete: + self.queue.put_nowait({"type": "websocket.disconnect", "code": 1012}) + output = self.conn.send(wsproto.events.CloseConnection(code=1012)) + self.transport.write(output) + else: + self.send_500_response() + self.transport.close() + + def on_task_complete(self, task: asyncio.Task[None]) -> None: + self.tasks.discard(task) + + # Event handlers + + def handle_connect(self, event: events.Request) -> None: + headers = [(b"host", event.host.encode())] + headers += [(key.lower(), value) for key, value in event.extra_headers] + raw_path, _, query_string = event.target.partition("?") + path = unquote(raw_path) + full_path = self.root_path + path + full_raw_path = self.root_path.encode("ascii") + raw_path.encode("ascii") + self.scope: WebSocketScope = { + "type": "websocket", + "asgi": {"version": self.config.asgi_version, "spec_version": "2.4"}, + "http_version": "1.1", + "scheme": self.scheme, + "server": self.server, + "client": self.client, + "root_path": self.root_path, + "path": full_path, + "raw_path": full_raw_path, + "query_string": query_string.encode("ascii"), + "headers": headers, + "subprotocols": event.subprotocols, + "state": self.app_state.copy(), + "extensions": {"websocket.http.response": {}}, + } + self.queue.put_nowait({"type": "websocket.connect"}) + task = self.loop.create_task(self.run_asgi()) + task.add_done_callback(self.on_task_complete) + self.tasks.add(task) + + def handle_text(self, event: events.TextMessage) -> None: + self.text += event.data + if event.message_finished: + self.queue.put_nowait({"type": "websocket.receive", "text": self.text}) + self.text = "" + if not self.read_paused: + self.read_paused = True + self.transport.pause_reading() + + def handle_bytes(self, event: events.BytesMessage) -> None: + self.bytes += event.data + # todo: we may want to guard the size of self.bytes and self.text + if event.message_finished: + self.queue.put_nowait({"type": "websocket.receive", "bytes": self.bytes}) + self.bytes = b"" + if not self.read_paused: + self.read_paused = True + self.transport.pause_reading() + + def handle_close(self, event: events.CloseConnection) -> None: + if self.conn.state == ConnectionState.REMOTE_CLOSING: + self.transport.write(self.conn.send(event.response())) + self.queue.put_nowait({"type": "websocket.disconnect", "code": event.code, "reason": event.reason}) + self.transport.close() + + def handle_ping(self, event: events.Ping) -> None: + self.transport.write(self.conn.send(event.response())) + + def send_500_response(self) -> None: + if self.response_started or self.handshake_complete: + return # we cannot send responses anymore + headers: list[tuple[bytes, bytes]] = [ + (b"content-type", b"text/plain; charset=utf-8"), + (b"connection", b"close"), + (b"content-length", b"21"), + ] + output = self.conn.send(wsproto.events.RejectConnection(status_code=500, headers=headers, has_body=True)) + output += self.conn.send(wsproto.events.RejectData(data=b"Internal Server Error")) + self.transport.write(output) + + async def run_asgi(self) -> None: + try: + result = await self.app(self.scope, self.receive, self.send) # type: ignore[func-returns-value] + except ClientDisconnected: + pass # pragma: full coverage + except BaseException: + self.logger.exception("Exception in ASGI application\n") + self.send_500_response() + else: + if not self.handshake_complete: + self.logger.error("ASGI callable returned without completing handshake.") + self.send_500_response() + elif result is not None: + self.logger.error("ASGI callable should return None, but returned '%s'.", result) + self.transport.close() + + async def send(self, message: ASGISendEvent) -> None: + await self.writable.wait() + + message_type = message["type"] + + if not self.handshake_complete: + if message_type == "websocket.accept": + message = cast(WebSocketAcceptEvent, message) + self.logger.info( + '%s - "WebSocket %s" [accepted]', + get_client_addr(self.scope), + get_path_with_query_string(self.scope), + ) + subprotocol = message.get("subprotocol") + extra_headers = self.default_headers + list(message.get("headers", [])) + extensions: list[Extension] = [] + if self.config.ws_per_message_deflate: + extensions.append(PerMessageDeflate()) + if not self.transport.is_closing(): + self.handshake_complete = True + output = self.conn.send( + wsproto.events.AcceptConnection( + subprotocol=subprotocol, + extensions=extensions, + extra_headers=extra_headers, + ) + ) + self.transport.write(output) + + elif message_type == "websocket.close": + self.queue.put_nowait({"type": "websocket.disconnect", "code": 1006}) + self.logger.info( + '%s - "WebSocket %s" 403', + get_client_addr(self.scope), + get_path_with_query_string(self.scope), + ) + self.handshake_complete = True + self.close_sent = True + event = events.RejectConnection(status_code=403, headers=[]) + output = self.conn.send(event) + self.transport.write(output) + self.transport.close() + + elif message_type == "websocket.http.response.start": + message = cast(WebSocketResponseStartEvent, message) + # ensure status code is in the valid range + if not (100 <= message["status"] < 600): + msg = "Invalid HTTP status code '%d' in response." + raise RuntimeError(msg % message["status"]) + self.logger.info( + '%s - "WebSocket %s" %d', + get_client_addr(self.scope), + get_path_with_query_string(self.scope), + message["status"], + ) + self.handshake_complete = True + event = events.RejectConnection( + status_code=message["status"], + headers=list(message["headers"]), + has_body=True, + ) + output = self.conn.send(event) + self.transport.write(output) + self.response_started = True + + else: + msg = ( + "Expected ASGI message 'websocket.accept', 'websocket.close' " + "or 'websocket.http.response.start' " + "but got '%s'." + ) + raise RuntimeError(msg % message_type) + + elif not self.close_sent and not self.response_started: + try: + if message_type == "websocket.send": + message = cast(WebSocketSendEvent, message) + bytes_data = message.get("bytes") + text_data = message.get("text") + data = text_data if bytes_data is None else bytes_data + output = self.conn.send(wsproto.events.Message(data=data)) # type: ignore + if not self.transport.is_closing(): + self.transport.write(output) + + elif message_type == "websocket.close": + message = cast(WebSocketCloseEvent, message) + self.close_sent = True + code = message.get("code", 1000) + reason = message.get("reason", "") or "" + self.queue.put_nowait({"type": "websocket.disconnect", "code": code, "reason": reason}) + output = self.conn.send(wsproto.events.CloseConnection(code=code, reason=reason)) + if not self.transport.is_closing(): + self.transport.write(output) + self.transport.close() + + else: + msg = "Expected ASGI message 'websocket.send' or 'websocket.close', but got '%s'." + raise RuntimeError(msg % message_type) + except LocalProtocolError as exc: + raise ClientDisconnected from exc + elif self.response_started: + if message_type == "websocket.http.response.body": + message = cast("WebSocketResponseBodyEvent", message) + body_finished = not message.get("more_body", False) + reject_data = events.RejectData(data=message["body"], body_finished=body_finished) + output = self.conn.send(reject_data) + self.transport.write(output) + + if body_finished: + self.queue.put_nowait({"type": "websocket.disconnect", "code": 1006}) + self.close_sent = True + self.transport.close() + + else: + msg = "Expected ASGI message 'websocket.http.response.body' but got '%s'." + raise RuntimeError(msg % message_type) + + else: + msg = "Unexpected ASGI message '%s', after sending 'websocket.close'." + raise RuntimeError(msg % message_type) + + async def receive(self) -> WebSocketEvent: + message = await self.queue.get() + if self.read_paused and self.queue.empty(): + self.read_paused = False + self.transport.resume_reading() + return message diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfceb6b94ce36dad006b1f81b816d45ce70ab3d6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__init__.py @@ -0,0 +1,16 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from uvicorn.supervisors.basereload import BaseReload +from uvicorn.supervisors.multiprocess import Multiprocess + +if TYPE_CHECKING: + ChangeReload: type[BaseReload] +else: + try: + from uvicorn.supervisors.watchfilesreload import WatchFilesReload as ChangeReload + except ImportError: # pragma: no cover + from uvicorn.supervisors.statreload import StatReload as ChangeReload + +__all__ = ["Multiprocess", "ChangeReload"] diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96d14cd3a43d4e7d3598a61cd6fdc1712cc2b399 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/basereload.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/basereload.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cce5e8e2f8de5e9d2e437708ec16979ebe77f51c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/basereload.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/multiprocess.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/multiprocess.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..44e7b99fc561734ce9cbea0c0ad292fad0e4bb8f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/multiprocess.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/statreload.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/statreload.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7d8db02e320f168960caf1d03c46e84654b20001 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/statreload.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/watchfilesreload.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/watchfilesreload.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3831252f6361e843489e94f72cd0177bd58e2dd5 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/__pycache__/watchfilesreload.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/basereload.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/basereload.py new file mode 100644 index 0000000000000000000000000000000000000000..66e34f53ffe62df65284d914bbf7d44a268b4917 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/basereload.py @@ -0,0 +1,125 @@ +from __future__ import annotations + +import logging +import os +import signal +import sys +import threading +from collections.abc import Callable, Iterator +from pathlib import Path +from socket import socket +from types import FrameType + +import click + +from uvicorn._subprocess import get_subprocess +from uvicorn.config import Config + +HANDLED_SIGNALS = ( + signal.SIGINT, # Unix signal 2. Sent by Ctrl+C. + signal.SIGTERM, # Unix signal 15. Sent by `kill `. +) + +logger = logging.getLogger("uvicorn.error") + + +class BaseReload: + def __init__( + self, + config: Config, + target: Callable[[list[socket] | None], None], + sockets: list[socket], + ) -> None: + self.config = config + self.target = target + self.sockets = sockets + self.should_exit = threading.Event() + self.pid = os.getpid() + self.is_restarting = False + self.reloader_name: str | None = None + + def signal_handler(self, sig: int, frame: FrameType | None) -> None: # pragma: full coverage + """ + A signal handler that is registered with the parent process. + """ + if sys.platform == "win32" and self.is_restarting: + self.is_restarting = False + else: + self.should_exit.set() + + def run(self) -> None: + self.startup() + for changes in self: + if changes: + logger.warning( + "%s detected changes in %s. Reloading...", + self.reloader_name, + ", ".join(map(_display_path, changes)), + ) + self.restart() + + self.shutdown() + + def pause(self) -> None: + if self.should_exit.wait(self.config.reload_delay): + raise StopIteration() + + def __iter__(self) -> Iterator[list[Path] | None]: + return self + + def __next__(self) -> list[Path] | None: + return self.should_restart() + + def startup(self) -> None: + message = f"Started reloader process [{self.pid}] using {self.reloader_name}" + color_message = "Started reloader process [{}] using {}".format( + click.style(str(self.pid), fg="cyan", bold=True), + click.style(str(self.reloader_name), fg="cyan", bold=True), + ) + logger.info(message, extra={"color_message": color_message}) + + for sig in HANDLED_SIGNALS: + signal.signal(sig, self.signal_handler) + + self.process = get_subprocess(config=self.config, target=self.target, sockets=self.sockets) + self.process.start() + + def restart(self) -> None: + if sys.platform == "win32": # pragma: py-not-win32 + self.is_restarting = True + assert self.process.pid is not None + os.kill(self.process.pid, signal.CTRL_C_EVENT) + + # This is a workaround to ensure the Ctrl+C event is processed + sys.stdout.write(" ") # This has to be a non-empty string + sys.stdout.flush() + else: # pragma: py-win32 + self.process.terminate() + self.process.join() + + self.process = get_subprocess(config=self.config, target=self.target, sockets=self.sockets) + self.process.start() + + def shutdown(self) -> None: + if sys.platform == "win32": + self.should_exit.set() # pragma: py-not-win32 + else: + self.process.terminate() # pragma: py-win32 + self.process.join() + + for sock in self.sockets: + sock.close() + + message = f"Stopping reloader process [{str(self.pid)}]" + color_message = "Stopping reloader process [{}]".format(click.style(str(self.pid), fg="cyan", bold=True)) + logger.info(message, extra={"color_message": color_message}) + + def should_restart(self) -> list[Path] | None: + raise NotImplementedError("Reload strategies should override should_restart()") + + +def _display_path(path: Path) -> str: + try: + return f"'{path.relative_to(Path.cwd())}'" + except ValueError: + return f"'{path}'" diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/multiprocess.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/multiprocess.py new file mode 100644 index 0000000000000000000000000000000000000000..3ad98afab2bd5f6d6d729b7d3ad7c50ed5c6b941 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/multiprocess.py @@ -0,0 +1,223 @@ +from __future__ import annotations + +import logging +import os +import signal +import threading +from collections.abc import Callable +from multiprocessing import Pipe +from socket import socket +from typing import Any + +import click + +from uvicorn._subprocess import get_subprocess +from uvicorn.config import Config + +SIGNALS = { + getattr(signal, f"SIG{x}"): x + for x in "INT TERM BREAK HUP QUIT TTIN TTOU USR1 USR2 WINCH".split() + if hasattr(signal, f"SIG{x}") +} + +logger = logging.getLogger("uvicorn.error") + + +class Process: + def __init__( + self, + config: Config, + target: Callable[[list[socket] | None], None], + sockets: list[socket], + ) -> None: + self.real_target = target + + self.parent_conn, self.child_conn = Pipe() + self.process = get_subprocess(config, self.target, sockets) + + def ping(self, timeout: float = 5) -> bool: + self.parent_conn.send(b"ping") + if self.parent_conn.poll(timeout): + self.parent_conn.recv() + return True + return False + + def pong(self) -> None: + self.child_conn.recv() + self.child_conn.send(b"pong") + + def always_pong(self) -> None: + while True: + self.pong() + + def target(self, sockets: list[socket] | None = None) -> Any: # pragma: no cover + if os.name == "nt": # pragma: py-not-win32 + # Windows doesn't support SIGTERM, so we use SIGBREAK instead. + # And then we raise SIGTERM when SIGBREAK is received. + # https://learn.microsoft.com/zh-cn/cpp/c-runtime-library/reference/signal?view=msvc-170 + signal.signal( + signal.SIGBREAK, # type: ignore[attr-defined] + lambda sig, frame: signal.raise_signal(signal.SIGTERM), + ) + + threading.Thread(target=self.always_pong, daemon=True).start() + return self.real_target(sockets) + + def is_alive(self, timeout: float = 5) -> bool: + if not self.process.is_alive(): + return False # pragma: full coverage + + return self.ping(timeout) + + def start(self) -> None: + self.process.start() + + def terminate(self) -> None: + if self.process.exitcode is None: # Process is still running + assert self.process.pid is not None + if os.name == "nt": # pragma: py-not-win32 + # Windows doesn't support SIGTERM. + # So send SIGBREAK, and then in process raise SIGTERM. + os.kill(self.process.pid, signal.CTRL_BREAK_EVENT) # type: ignore[attr-defined] + else: + os.kill(self.process.pid, signal.SIGTERM) + logger.info(f"Terminated child process [{self.process.pid}]") + + self.parent_conn.close() + self.child_conn.close() + + def kill(self) -> None: + # In Windows, the method will call `TerminateProcess` to kill the process. + # In Unix, the method will send SIGKILL to the process. + self.process.kill() + + def join(self) -> None: + logger.info(f"Waiting for child process [{self.process.pid}]") + self.process.join() + + @property + def pid(self) -> int | None: + return self.process.pid + + +class Multiprocess: + def __init__( + self, + config: Config, + target: Callable[[list[socket] | None], None], + sockets: list[socket], + ) -> None: + self.config = config + self.target = target + self.sockets = sockets + + self.processes_num = config.workers + self.processes: list[Process] = [] + + self.should_exit = threading.Event() + + self.signal_queue: list[int] = [] + for sig in SIGNALS: + signal.signal(sig, lambda sig, frame: self.signal_queue.append(sig)) + + def init_processes(self) -> None: + for _ in range(self.processes_num): + process = Process(self.config, self.target, self.sockets) + process.start() + self.processes.append(process) + + def terminate_all(self) -> None: + for process in self.processes: + process.terminate() + + def join_all(self) -> None: + for process in self.processes: + process.join() + + def restart_all(self) -> None: + for idx, process in enumerate(self.processes): + process.terminate() + process.join() + new_process = Process(self.config, self.target, self.sockets) + new_process.start() + self.processes[idx] = new_process + + def run(self) -> None: + message = f"Started parent process [{os.getpid()}]" + color_message = "Started parent process [{}]".format(click.style(str(os.getpid()), fg="cyan", bold=True)) + logger.info(message, extra={"color_message": color_message}) + + self.init_processes() + + while not self.should_exit.wait(0.5): + self.handle_signals() + self.keep_subprocess_alive() + + self.terminate_all() + self.join_all() + + message = f"Stopping parent process [{os.getpid()}]" + color_message = "Stopping parent process [{}]".format(click.style(str(os.getpid()), fg="cyan", bold=True)) + logger.info(message, extra={"color_message": color_message}) + + def keep_subprocess_alive(self) -> None: + if self.should_exit.is_set(): + return # parent process is exiting, no need to keep subprocess alive + + for idx, process in enumerate(self.processes): + if process.is_alive(timeout=self.config.timeout_worker_healthcheck): + continue + + process.kill() # process is hung, kill it + process.join() + + if self.should_exit.is_set(): + return # pragma: full coverage + + logger.info(f"Child process [{process.pid}] died") + process = Process(self.config, self.target, self.sockets) + process.start() + self.processes[idx] = process + + def handle_signals(self) -> None: + for sig in tuple(self.signal_queue): + self.signal_queue.remove(sig) + sig_name = SIGNALS[sig] + sig_handler = getattr(self, f"handle_{sig_name.lower()}", None) + if sig_handler is not None: + sig_handler() + else: # pragma: no cover + logger.debug(f"Received signal {sig_name}, but no handler is defined for it.") + + def handle_int(self) -> None: + logger.info("Received SIGINT, exiting.") + self.should_exit.set() + + def handle_term(self) -> None: + logger.info("Received SIGTERM, exiting.") + self.should_exit.set() + + def handle_break(self) -> None: # pragma: py-not-win32 + logger.info("Received SIGBREAK, exiting.") + self.should_exit.set() + + def handle_hup(self) -> None: # pragma: py-win32 + logger.info("Received SIGHUP, restarting processes.") + self.restart_all() + + def handle_ttin(self) -> None: # pragma: py-win32 + logger.info("Received SIGTTIN, increasing the number of processes.") + self.processes_num += 1 + process = Process(self.config, self.target, self.sockets) + process.start() + self.processes.append(process) + + def handle_ttou(self) -> None: # pragma: py-win32 + logger.info("Received SIGTTOU, decreasing number of processes.") + if self.processes_num <= 1: + logger.info("Already reached one process, cannot decrease the number of processes anymore.") + return + self.processes_num -= 1 + process = self.processes.pop() + process.terminate() + process.join() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/statreload.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/statreload.py new file mode 100644 index 0000000000000000000000000000000000000000..28693f9cc6d14ed8ea98518a78162e8c84f51c72 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/statreload.py @@ -0,0 +1,52 @@ +from __future__ import annotations + +import logging +from collections.abc import Callable, Iterator +from pathlib import Path +from socket import socket + +from uvicorn.config import Config +from uvicorn.supervisors.basereload import BaseReload + +logger = logging.getLogger("uvicorn.error") + + +class StatReload(BaseReload): + def __init__( + self, + config: Config, + target: Callable[[list[socket] | None], None], + sockets: list[socket], + ) -> None: + super().__init__(config, target, sockets) + self.reloader_name = "StatReload" + self.mtimes: dict[Path, float] = {} + + if config.reload_excludes or config.reload_includes: + logger.warning("--reload-include and --reload-exclude have no effect unless watchfiles is installed.") + + def should_restart(self) -> list[Path] | None: + self.pause() + + for file in self.iter_py_files(): + try: + mtime = file.stat().st_mtime + except OSError: # pragma: nocover + continue + + old_time = self.mtimes.get(file) + if old_time is None: + self.mtimes[file] = mtime + continue + elif mtime > old_time: + return [file] + return None + + def restart(self) -> None: + self.mtimes = {} + return super().restart() + + def iter_py_files(self) -> Iterator[Path]: + for reload_dir in self.config.reload_dirs: + for path in list(reload_dir.rglob("*.py")): + yield path.resolve() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/watchfilesreload.py b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/watchfilesreload.py new file mode 100644 index 0000000000000000000000000000000000000000..600990595274dbc649176247c0c15840e59e0105 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/uvicorn/supervisors/watchfilesreload.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Callable +from pathlib import Path +from socket import socket + +from watchfiles import watch + +from uvicorn.config import Config +from uvicorn.supervisors.basereload import BaseReload + + +class FileFilter: + def __init__(self, config: Config): + default_includes = ["*.py"] + self.includes = [default for default in default_includes if default not in config.reload_excludes] + self.includes.extend(config.reload_includes) + self.includes = list(set(self.includes)) + + default_excludes = [".*", ".py[cod]", ".sw.*", "~*"] + self.excludes = [default for default in default_excludes if default not in config.reload_includes] + self.exclude_dirs = [] + for e in config.reload_excludes: + p = Path(e) + try: + is_dir = p.is_dir() + except OSError: # pragma: no cover + # gets raised on Windows for values like "*.py" + is_dir = False + + if is_dir: + self.exclude_dirs.append(p) + else: + self.excludes.append(e) # pragma: full coverage + self.excludes = list(set(self.excludes)) + + def __call__(self, path: Path) -> bool: + for include_pattern in self.includes: + if path.match(include_pattern): + if str(path).endswith(include_pattern): + return True # pragma: full coverage + + for exclude_dir in self.exclude_dirs: + if exclude_dir in path.parents: + return False + + for exclude_pattern in self.excludes: + if path.match(exclude_pattern): + return False # pragma: full coverage + + return True + return False + + +class WatchFilesReload(BaseReload): + def __init__( + self, + config: Config, + target: Callable[[list[socket] | None], None], + sockets: list[socket], + ) -> None: + super().__init__(config, target, sockets) + self.reloader_name = "WatchFiles" + self.reload_dirs: list[Path] = [] + for directory in config.reload_dirs: + self.reload_dirs.append(directory) + + self.watch_filter = FileFilter(config) + self.watcher = watch( + *self.reload_dirs, + watch_filter=None, + stop_event=self.should_exit, + # using yield_on_timeout here mostly to make sure tests don't + # hang forever, won't affect the class's behavior + yield_on_timeout=True, + ignore_permission_denied=True, + ) + + def should_restart(self) -> list[Path] | None: + self.pause() + + changes = next(self.watcher) + if changes: + unique_paths = {Path(c[1]) for c in changes} + return [p for p in unique_paths if self.watch_filter(p)] + return None diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b796ae5cd1e62d3f6445e1dc4bed80b72660753 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/compat.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..800f6eddfd133d7bc514794ad0b25266e30deb8e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/compat.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/markdown.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/markdown.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b11fb606f9b1ea8d3f03760daa2caf0af35cd02 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/markdown.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/printer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/printer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c6149ef66dbc8b3b7a3cf005e297684a3f61a269 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/printer.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/tables.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/tables.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9c6f6408b34ac8b40d88e266b96368b61e23e16d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/tables.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/traceback_printer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/traceback_printer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3957efef1086d65b0fcbd4c5e468b8115334b486 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/traceback_printer.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a1d3d5896fedfcd21176bbbae524a4e0bab7110c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/__pycache__/util.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd8a8860e742d0e8ad666a5d83cfbea45adcc897 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_jupyter.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_jupyter.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f8546236106f33a4ff334b378da3927d6135fa43 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_jupyter.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_markdown.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_markdown.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..41f95f3588809ec9ac4c13249837808572527be2 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_markdown.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_printer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_printer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7fb53f68d4b70c302c4bf2620e508291c67079ce Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_printer.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_tables.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_tables.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98b6e1855b74490cca137269d06d47ade8fde755 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_tables.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_traceback.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_traceback.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3a99c58470e827f0fec89ba5e649b38bffa2dc87 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_traceback.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7fccefa4f2a9879a6223f6f0ad835465408cb4e4 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/__pycache__/test_util.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test-data/wasabi-test-notebook.ipynb b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test-data/wasabi-test-notebook.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..32c198028ceacaa821cfb9e5f723f0ee17acbbdc --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test-data/wasabi-test-notebook.ipynb @@ -0,0 +1,42 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "eb5586f8", + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "import wasabi\n", + "\n", + "wasabi.msg.warn(\"This is a test. This is only a test.\")\n", + "if sys.version_info >= (3, 7):\n", + " assert wasabi.util.supports_ansi()\n", + "\n", + "print(sys.stdout)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_jupyter.py b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_jupyter.py new file mode 100644 index 0000000000000000000000000000000000000000..a4da55492af024fcc7c25a5f857e595a5cd92345 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_jupyter.py @@ -0,0 +1,36 @@ +from pathlib import Path +import subprocess +import os +import sys + +import wasabi + +TEST_DATA = Path(__file__).absolute().parent / "test-data" +WASABI_DIR = Path(wasabi.__file__).absolute().parent.parent + + +def test_jupyter(): + # This runs some code in a jupyter notebook environment, but without actually + # starting up the notebook UI. Historically we once had a bug that caused crashes + # when importing wasabi in a jupyter notebook, because they replace + # sys.stdout/stderr with custom objects that aren't "real" files/ttys. So this makes + # sure that we can import and use wasabi inside a notebook without crashing. + env = dict(os.environ) + if "PYTHONPATH" in env: + env["PYTHONPATH"] = f"{WASABI_DIR}{os.pathsep}{env['PYTHONPATH']}" + else: + env["PYTHONPATH"] = str(WASABI_DIR) + subprocess.run( + [ + sys.executable, + "-m", + "nbconvert", + str(TEST_DATA / "wasabi-test-notebook.ipynb"), + "--execute", + "--stdout", + "--to", + "notebook", + ], + env=env, + check=True, + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_markdown.py b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_markdown.py new file mode 100644 index 0000000000000000000000000000000000000000..882362d2316b2660cb192f188c1506703332db1b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_markdown.py @@ -0,0 +1,26 @@ +import pytest + +from wasabi.markdown import MarkdownRenderer + + +def test_markdown(): + md = MarkdownRenderer() + md.add(md.title(1, "Title")) + md.add("Paragraph with {}".format(md.bold("bold"))) + md.add(md.list(["foo", "bar"])) + md.add(md.table([("a", "b"), ("c", "d")], ["foo", "bar"])) + md.add(md.code_block('import spacy\n\nnlp = spacy.blank("en")', "python")) + md.add(md.list(["first", "second"], numbered=True)) + expected = """# Title\n\nParagraph with **bold**\n\n- foo\n- bar\n\n| foo | bar |\n| --- | --- |\n| a | b |\n| c | d |\n\n```python\nimport spacy\n\nnlp = spacy.blank("en")\n```\n\n1. first\n2. second""" + assert md.text == expected + + +def test_markdown_table_aligns(): + md = MarkdownRenderer() + md.add(md.table([("a", "b", "c")], ["foo", "bar", "baz"], aligns=("c", "r", "l"))) + expected = """| foo | bar | baz |\n| :---: | ---: | --- |\n| a | b | c |""" + assert md.text == expected + with pytest.raises(ValueError): + md.table([("a", "b", "c")], ["foo", "bar", "baz"], aligns=("c", "r")) + with pytest.raises(ValueError): + md.table([("a", "b", "c")], ["foo", "bar", "baz"], aligns=("c", "r", "l", "l")) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_printer.py b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_printer.py new file mode 100644 index 0000000000000000000000000000000000000000..16d8d4a66c09ea08932e93382a18e0fbb51d8949 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_printer.py @@ -0,0 +1,236 @@ +import os +import re +import time + +import pytest + +from wasabi.printer import Printer +from wasabi.util import MESSAGES, NO_UTF8, supports_ansi + +SUPPORTS_ANSI = supports_ansi() + + +def test_printer(): + p = Printer(no_print=True) + text = "This is a test." + good = p.good(text) + fail = p.fail(text) + warn = p.warn(text) + info = p.info(text) + assert p.text(text) == text + if SUPPORTS_ANSI and not NO_UTF8: + assert good == "\x1b[38;5;2m\u2714 {}\x1b[0m".format(text) + assert fail == "\x1b[38;5;1m\u2718 {}\x1b[0m".format(text) + assert warn == "\x1b[38;5;3m\u26a0 {}\x1b[0m".format(text) + assert info == "\x1b[38;5;4m\u2139 {}\x1b[0m".format(text) + if SUPPORTS_ANSI and NO_UTF8: + assert good == "\x1b[38;5;2m[+] {}\x1b[0m".format(text) + assert fail == "\x1b[38;5;1m[x] {}\x1b[0m".format(text) + assert warn == "\x1b[38;5;3m[!] {}\x1b[0m".format(text) + assert info == "\x1b[38;5;4m[i] {}\x1b[0m".format(text) + if not SUPPORTS_ANSI and not NO_UTF8: + assert good == "\u2714 {}".format(text) + assert fail == "\u2718 {}".format(text) + assert warn == "\u26a0 {}".format(text) + assert info == "\u2139 {}".format(text) + if not SUPPORTS_ANSI and NO_UTF8: + assert good == "[+] {}".format(text) + assert fail == "[x] {}".format(text) + assert warn == "[!] {}".format(text) + assert info == "[i] {}".format(text) + + +def test_printer_print(): + p = Printer() + text = "This is a test." + p.good(text) + p.fail(text) + p.info(text) + p.text(text) + + +def test_printer_print_timestamp(): + p = Printer(no_print=True, timestamp=True) + result = p.info("Hello world") + matches = re.match("^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}", result) + assert matches + + +def test_printer_no_pretty(): + p = Printer(no_print=True, pretty=False) + text = "This is a test." + assert p.good(text) == text + assert p.fail(text) == text + assert p.warn(text) == text + assert p.info(text) == text + assert p.text(text) == text + + +def test_printer_custom(): + colors = {"yellow": 220, "purple": 99} + icons = {"warn": "\u26a0\ufe0f", "question": "?"} + p = Printer(no_print=True, colors=colors, icons=icons) + text = "This is a test." + purple_question = p.text(text, color="purple", icon="question") + warning = p.warn(text) + if SUPPORTS_ANSI and not NO_UTF8: + assert purple_question == "\x1b[38;5;99m? {}\x1b[0m".format(text) + assert warning == "\x1b[38;5;3m\u26a0\ufe0f {}\x1b[0m".format(text) + if SUPPORTS_ANSI and NO_UTF8: + assert purple_question == "\x1b[38;5;99m? {}\x1b[0m".format(text) + assert warning == "\x1b[38;5;3m?? {}\x1b[0m".format(text) + if not SUPPORTS_ANSI and not NO_UTF8: + assert purple_question == "? {}".format(text) + assert warning == "\u26a0\ufe0f {}".format(text) + if not SUPPORTS_ANSI and NO_UTF8: + assert purple_question == "? {}".format(text) + assert warning == "?? {}".format(text) + + +def test_color_as_int(): + p = Printer(no_print=True) + text = "This is a text." + result = p.text(text, color=220) + if SUPPORTS_ANSI: + assert result == "\x1b[38;5;220mThis is a text.\x1b[0m" + else: + assert result == "This is a text." + + +def test_bg_color(): + p = Printer(no_print=True) + text = "This is a text." + result = p.text(text, bg_color="red") + print(result) + if SUPPORTS_ANSI: + assert result == "\x1b[48;5;1mThis is a text.\x1b[0m" + else: + assert result == "This is a text." + + +def test_bg_color_as_int(): + p = Printer(no_print=True) + text = "This is a text." + result = p.text(text, bg_color=220) + print(result) + if SUPPORTS_ANSI: + assert result == "\x1b[48;5;220mThis is a text.\x1b[0m" + else: + assert result == "This is a text." + + +def test_color_and_bc_color(): + p = Printer(no_print=True) + text = "This is a text." + result = p.text(text, color="green", bg_color="yellow") + print(result) + if SUPPORTS_ANSI: + assert result == "\x1b[38;5;2;48;5;3mThis is a text.\x1b[0m" + else: + assert result == "This is a text." + + +def test_printer_counts(): + p = Printer() + text = "This is a test." + for i in range(2): + p.good(text) + for i in range(1): + p.fail(text) + for i in range(4): + p.warn(text) + assert p.counts[MESSAGES.GOOD] == 2 + assert p.counts[MESSAGES.FAIL] == 1 + assert p.counts[MESSAGES.WARN] == 4 + + +def test_printer_spaced(): + p = Printer(no_print=True, pretty=False) + text = "This is a test." + assert p.good(text) == text + assert p.good(text, spaced=True) == "\n{}\n".format(text) + + +def test_printer_divider(): + p = Printer(line_max=20, no_print=True) + p.divider() == "\x1b[1m\n================\x1b[0m" + p.divider("test") == "\x1b[1m\n====== test ======\x1b[0m" + p.divider("test", char="*") == "\x1b[1m\n****** test ******\x1b[0m" + assert ( + p.divider("This is a very long text, it is very long") + == "\x1b[1m\n This is a very long text, it is very long \x1b[0m" + ) + with pytest.raises(ValueError): + p.divider("test", char="~.") + + +@pytest.mark.parametrize("hide_animation", [False, True]) +def test_printer_loading(hide_animation): + p = Printer(hide_animation=hide_animation) + print("\n") + with p.loading("Loading..."): + time.sleep(1) + p.good("Success!") + + with p.loading("Something else..."): + time.sleep(2) + p.good("Yo!") + + with p.loading("Loading..."): + time.sleep(1) + p.good("Success!") + + +def test_printer_loading_raises_exception(): + def loading_with_exception(): + p = Printer() + print("\n") + with p.loading(): + raise Exception("This is an error.") + + with pytest.raises(Exception): + loading_with_exception() + + +def test_printer_loading_no_print(): + p = Printer(no_print=True) + with p.loading("Loading..."): + time.sleep(1) + p.good("Success!") + + +def test_printer_log_friendly(): + text = "This is a test." + ENV_LOG_FRIENDLY = "WASABI_LOG_FRIENDLY" + os.environ[ENV_LOG_FRIENDLY] = "True" + p = Printer(no_print=True) + assert p.good(text) in ("\u2714 This is a test.", "[+] This is a test.") + del os.environ[ENV_LOG_FRIENDLY] + + +def test_printer_log_friendly_prefix(): + text = "This is a test." + ENV_LOG_FRIENDLY = "CUSTOM_LOG_FRIENDLY" + os.environ[ENV_LOG_FRIENDLY] = "True" + p = Printer(no_print=True, env_prefix="CUSTOM") + assert p.good(text) in ("\u2714 This is a test.", "[+] This is a test.") + print(p.good(text)) + del os.environ[ENV_LOG_FRIENDLY] + + +@pytest.mark.skip(reason="Now seems to raise TypeError: readonly attribute?") +def test_printer_none_encoding(monkeypatch): + """Test that printer works even if sys.stdout.encoding is set to None. This + previously caused a very confusing error.""" + monkeypatch.setattr("sys.stdout.encoding", None) + p = Printer() # noqa: F841 + + +def test_printer_no_print_raise_on_exit(): + """Test that the printer raises if a non-zero exit code is provided, even + if no_print is set to True.""" + err = "This is an error." + p = Printer(no_print=True, pretty=False) + with pytest.raises(SystemExit) as e: + p.fail(err, exits=True) + assert str(e.value).strip()[-len(err) :] == err diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_tables.py b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_tables.py new file mode 100644 index 0000000000000000000000000000000000000000..d0fc488b35dfcbb4bc55be9c0b06d5100833d705 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_tables.py @@ -0,0 +1,421 @@ +import os + +import pytest + +from wasabi.tables import row, table +from wasabi.util import supports_ansi + +SUPPORTS_ANSI = supports_ansi() + + +@pytest.fixture() +def data(): + return [("Hello", "World", "12344342"), ("This is a test", "World", "1234")] + + +@pytest.fixture() +def header(): + return ["COL A", "COL B", "COL 3"] + + +@pytest.fixture() +def footer(): + return ["", "", "2030203.00"] + + +@pytest.fixture() +def fg_colors(): + return ["", "yellow", "87"] + + +@pytest.fixture() +def bg_colors(): + return ["green", "23", ""] + + +def test_table_default(data): + result = table(data) + assert ( + result + == "\nHello World 12344342\nThis is a test World 1234 \n" + ) + + +def test_table_header(data, header): + result = table(data, header=header) + assert ( + result + == "\nCOL A COL B COL 3 \nHello World 12344342\nThis is a test World 1234 \n" + ) + + +def test_table_header_footer_divider(data, header, footer): + result = table(data, header=header, footer=footer, divider=True) + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + + +def test_table_aligns(data): + result = table(data, aligns=("r", "c", "l")) + assert ( + result + == "\n Hello World 12344342\nThis is a test World 1234 \n" + ) + + +def test_table_aligns_single(data): + result = table(data, aligns="r") + assert ( + result + == "\n Hello World 12344342\nThis is a test World 1234\n" + ) + + +def test_table_widths(): + data = [("a", "bb", "ccc"), ("d", "ee", "fff")] + widths = (5, 2, 10) + result = table(data, widths=widths) + assert result == "\na bb ccc \nd ee fff \n" + + +def test_row_single_widths(): + data = ("a", "bb", "ccc") + result = row(data, widths=10) + assert result == "a bb ccc " + + +def test_table_multiline(header): + data = [ + ("hello", ["foo", "bar", "baz"], "world"), + ("hello", "world", ["world 1", "world 2"]), + ] + result = table(data, header=header, divider=True, multiline=True) + assert ( + result + == "\nCOL A COL B COL 3 \n----- ----- -------\nhello foo world \n bar \n baz \n \nhello world world 1\n world 2\n" + ) + + +def test_row_fg_colors(fg_colors): + result = row(("Hello", "World", "12344342"), fg_colors=fg_colors) + if SUPPORTS_ANSI: + assert ( + result == "Hello \x1b[38;5;3mWorld\x1b[0m \x1b[38;5;87m12344342\x1b[0m" + ) + else: + assert result == "Hello World 12344342" + + +def test_row_bg_colors(bg_colors): + result = row(("Hello", "World", "12344342"), bg_colors=bg_colors) + if SUPPORTS_ANSI: + assert ( + result == "\x1b[48;5;2mHello\x1b[0m \x1b[48;5;23mWorld\x1b[0m 12344342" + ) + else: + assert result == "Hello World 12344342" + + +def test_row_fg_colors_and_bg_colors(fg_colors, bg_colors): + result = row( + ("Hello", "World", "12344342"), fg_colors=fg_colors, bg_colors=bg_colors + ) + if SUPPORTS_ANSI: + assert ( + result + == "\x1b[48;5;2mHello\x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m12344342\x1b[0m" + ) + else: + assert result == "Hello World 12344342" + + +def test_row_fg_colors_and_bg_colors_log_friendly(fg_colors, bg_colors): + ENV_LOG_FRIENDLY = "WASABI_LOG_FRIENDLY" + os.environ[ENV_LOG_FRIENDLY] = "True" + result = row( + ("Hello", "World", "12344342"), fg_colors=fg_colors, bg_colors=bg_colors + ) + assert result == "Hello World 12344342" + del os.environ[ENV_LOG_FRIENDLY] + + +def test_row_fg_colors_and_bg_colors_log_friendly_prefix(fg_colors, bg_colors): + ENV_LOG_FRIENDLY = "CUSTOM_LOG_FRIENDLY" + os.environ[ENV_LOG_FRIENDLY] = "True" + result = row( + ("Hello", "World", "12344342"), + fg_colors=fg_colors, + bg_colors=bg_colors, + env_prefix="CUSTOM", + ) + assert result == "Hello World 12344342" + del os.environ[ENV_LOG_FRIENDLY] + + +def test_row_fg_colors_and_bg_colors_supports_ansi_false(fg_colors, bg_colors): + os.environ["ANSI_COLORS_DISABLED"] = "True" + result = row( + ("Hello", "World", "12344342"), fg_colors=fg_colors, bg_colors=bg_colors + ) + assert result == "Hello World 12344342" + del os.environ["ANSI_COLORS_DISABLED"] + + +def test_colors_whole_table_with_automatic_widths( + data, header, footer, fg_colors, bg_colors +): + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + ) + if SUPPORTS_ANSI: + assert ( + result + == "\n\x1b[48;5;2mCOL A \x1b[0m \x1b[38;5;3;48;5;23mCOL B\x1b[0m \x1b[38;5;87mCOL 3 \x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;3;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2mHello \x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m12344342 \x1b[0m\n\x1b[48;5;2mThis is a test\x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m1234 \x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;3;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2m \x1b[0m \x1b[38;5;3;48;5;23m \x1b[0m \x1b[38;5;87m2030203.00\x1b[0m\n" + ) + else: + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + + +def test_colors_whole_table_only_fg_colors(data, header, footer, fg_colors): + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + ) + if SUPPORTS_ANSI: + assert ( + result + == "\nCOL A \x1b[38;5;3mCOL B\x1b[0m \x1b[38;5;87mCOL 3 \x1b[0m\n-------------- \x1b[38;5;3m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\nHello \x1b[38;5;3mWorld\x1b[0m \x1b[38;5;87m12344342 \x1b[0m\nThis is a test \x1b[38;5;3mWorld\x1b[0m \x1b[38;5;87m1234 \x1b[0m\n-------------- \x1b[38;5;3m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n \x1b[38;5;3m \x1b[0m \x1b[38;5;87m2030203.00\x1b[0m\n" + ) + else: + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + + +def test_colors_whole_table_only_bg_colors(data, header, footer, bg_colors): + result = table( + data, + header=header, + footer=footer, + divider=True, + bg_colors=bg_colors, + ) + if SUPPORTS_ANSI: + assert ( + result + == "\n\x1b[48;5;2mCOL A \x1b[0m \x1b[48;5;23mCOL B\x1b[0m COL 3 \n\x1b[48;5;2m--------------\x1b[0m \x1b[48;5;23m-----\x1b[0m ----------\n\x1b[48;5;2mHello \x1b[0m \x1b[48;5;23mWorld\x1b[0m 12344342 \n\x1b[48;5;2mThis is a test\x1b[0m \x1b[48;5;23mWorld\x1b[0m 1234 \n\x1b[48;5;2m--------------\x1b[0m \x1b[48;5;23m-----\x1b[0m ----------\n\x1b[48;5;2m \x1b[0m \x1b[48;5;23m \x1b[0m 2030203.00\n" + ) + else: + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + + +def test_colors_whole_table_with_supplied_spacing( + data, header, footer, fg_colors, bg_colors +): + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + spacing=5, + ) + if SUPPORTS_ANSI: + assert ( + result + == "\n\x1b[48;5;2mCOL A \x1b[0m \x1b[38;5;3;48;5;23mCOL B\x1b[0m \x1b[38;5;87mCOL 3 \x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;3;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2mHello \x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m12344342 \x1b[0m\n\x1b[48;5;2mThis is a test\x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m1234 \x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;3;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2m \x1b[0m \x1b[38;5;3;48;5;23m \x1b[0m \x1b[38;5;87m2030203.00\x1b[0m\n" + ) + else: + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + + +def test_colors_whole_table_with_supplied_widths( + data, header, footer, fg_colors, bg_colors +): + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + widths=(5, 2, 10), + ) + if SUPPORTS_ANSI: + assert ( + result + == "\n\x1b[48;5;2mCOL A\x1b[0m \x1b[38;5;3;48;5;23mCOL B\x1b[0m \x1b[38;5;87mCOL 3 \x1b[0m\n\x1b[48;5;2m-----\x1b[0m \x1b[38;5;3;48;5;23m--\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2mHello\x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m12344342 \x1b[0m\n\x1b[48;5;2mThis is a test\x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m1234 \x1b[0m\n\x1b[48;5;2m-----\x1b[0m \x1b[38;5;3;48;5;23m--\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2m \x1b[0m \x1b[38;5;3;48;5;23m \x1b[0m \x1b[38;5;87m2030203.00\x1b[0m\n" + ) + else: + assert ( + result + == "\nCOL A COL B COL 3 \n----- -- ----------\nHello World 12344342 \nThis is a test World 1234 \n----- -- ----------\n 2030203.00\n" + ) + + +def test_colors_whole_table_with_single_alignment( + data, header, footer, fg_colors, bg_colors +): + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + aligns="r", + ) + if SUPPORTS_ANSI: + assert ( + result + == "\n\x1b[48;5;2m COL A\x1b[0m \x1b[38;5;3;48;5;23mCOL B\x1b[0m \x1b[38;5;87m COL 3\x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;3;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2m Hello\x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m 12344342\x1b[0m\n\x1b[48;5;2mThis is a test\x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m 1234\x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;3;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2m \x1b[0m \x1b[38;5;3;48;5;23m \x1b[0m \x1b[38;5;87m2030203.00\x1b[0m\n" + ) + else: + assert ( + result + == "\n COL A COL B COL 3\n-------------- ----- ----------\n Hello World 12344342\nThis is a test World 1234\n-------------- ----- ----------\n 2030203.00\n" + ) + + +def test_colors_whole_table_with_multiple_alignment( + data, header, footer, fg_colors, bg_colors +): + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + aligns=("c", "r", "l"), + ) + if SUPPORTS_ANSI: + assert ( + result + == "\n\x1b[48;5;2m COL A \x1b[0m \x1b[38;5;3;48;5;23mCOL B\x1b[0m \x1b[38;5;87mCOL 3 \x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;3;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2m Hello \x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m12344342 \x1b[0m\n\x1b[48;5;2mThis is a test\x1b[0m \x1b[38;5;3;48;5;23mWorld\x1b[0m \x1b[38;5;87m1234 \x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;3;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2m \x1b[0m \x1b[38;5;3;48;5;23m \x1b[0m \x1b[38;5;87m2030203.00\x1b[0m\n" + ) + else: + assert ( + result + == "\n COL A COL B COL 3 \n-------------- ----- ----------\n Hello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + + +def test_colors_whole_table_with_multiline(data, header, footer, fg_colors, bg_colors): + result = table( + data=((["Charles", "Quinton", "Murphy"], "my", "brother"), ("1", "2", "3")), + fg_colors=fg_colors, + bg_colors=bg_colors, + multiline=True, + ) + if SUPPORTS_ANSI: + assert ( + result + == "\n\x1b[48;5;2mCharles\x1b[0m \x1b[38;5;3;48;5;23mmy\x1b[0m \x1b[38;5;87mbrother\x1b[0m\n\x1b[48;5;2mQuinton\x1b[0m \x1b[38;5;3;48;5;23m \x1b[0m \x1b[38;5;87m \x1b[0m\n\x1b[48;5;2mMurphy \x1b[0m \x1b[38;5;3;48;5;23m \x1b[0m \x1b[38;5;87m \x1b[0m\n\x1b[48;5;2m \x1b[0m \x1b[38;5;3;48;5;23m \x1b[0m \x1b[38;5;87m \x1b[0m\n\x1b[48;5;2m1 \x1b[0m \x1b[38;5;3;48;5;23m2 \x1b[0m \x1b[38;5;87m3 \x1b[0m\n" + ) + else: + assert ( + result + == "\nCharles my brother\nQuinton \nMurphy \n \n1 2 3 \n" + ) + + +def test_colors_whole_table_log_friendly(data, header, footer, fg_colors, bg_colors): + ENV_LOG_FRIENDLY = "WASABI_LOG_FRIENDLY" + os.environ[ENV_LOG_FRIENDLY] = "True" + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + ) + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + del os.environ[ENV_LOG_FRIENDLY] + + +def test_colors_whole_table_log_friendly_prefix( + data, header, footer, fg_colors, bg_colors +): + ENV_LOG_FRIENDLY = "CUSTOM_LOG_FRIENDLY" + os.environ[ENV_LOG_FRIENDLY] = "True" + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + env_prefix="CUSTOM", + ) + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + del os.environ[ENV_LOG_FRIENDLY] + + +def test_colors_whole_table_supports_ansi_false( + data, header, footer, fg_colors, bg_colors +): + os.environ["ANSI_COLORS_DISABLED"] = "True" + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + ) + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) + del os.environ["ANSI_COLORS_DISABLED"] + + +def test_colors_whole_table_color_values(data, header, footer, fg_colors, bg_colors): + result = table( + data, + header=header, + footer=footer, + divider=True, + fg_colors=fg_colors, + bg_colors=bg_colors, + color_values={"yellow": 11}, + ) + if SUPPORTS_ANSI: + assert ( + result + == "\n\x1b[48;5;2mCOL A \x1b[0m \x1b[38;5;11;48;5;23mCOL B\x1b[0m \x1b[38;5;87mCOL 3 \x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;11;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2mHello \x1b[0m \x1b[38;5;11;48;5;23mWorld\x1b[0m \x1b[38;5;87m12344342 \x1b[0m\n\x1b[48;5;2mThis is a test\x1b[0m \x1b[38;5;11;48;5;23mWorld\x1b[0m \x1b[38;5;87m1234 \x1b[0m\n\x1b[48;5;2m--------------\x1b[0m \x1b[38;5;11;48;5;23m-----\x1b[0m \x1b[38;5;87m----------\x1b[0m\n\x1b[48;5;2m \x1b[0m \x1b[38;5;11;48;5;23m \x1b[0m \x1b[38;5;87m2030203.00\x1b[0m\n" + ) + else: + assert ( + result + == "\nCOL A COL B COL 3 \n-------------- ----- ----------\nHello World 12344342 \nThis is a test World 1234 \n-------------- ----- ----------\n 2030203.00\n" + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_traceback.py b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_traceback.py new file mode 100644 index 0000000000000000000000000000000000000000..687827a4ad2e1094e9c40000949d4143e42a1619 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_traceback.py @@ -0,0 +1,66 @@ +import traceback + +import pytest + +from wasabi.traceback_printer import TracebackPrinter + + +@pytest.fixture +def tb(): + return traceback.extract_stack() + + +def test_traceback_printer(tb): + tbp = TracebackPrinter(tb_base="wasabi") + msg = tbp("Hello world", "This is a test", tb=tb) + print(msg) + + +def test_traceback_printer_highlight(tb): + tbp = TracebackPrinter(tb_base="wasabi") + msg = tbp("Hello world", "This is a test", tb=tb, highlight="kwargs") + print(msg) + + +def test_traceback_printer_custom_colors(tb): + tbp = TracebackPrinter( + tb_base="wasabi", color_error="blue", color_highlight="green", color_tb="yellow" + ) + msg = tbp("Hello world", "This is a test", tb=tb, highlight="kwargs") + print(msg) + + +def test_traceback_printer_only_title(tb): + tbp = TracebackPrinter(tb_base="wasabi") + msg = tbp("Hello world", tb=tb) + print(msg) + + +def test_traceback_dot_relative_path_tb_base(tb): + tbp = TracebackPrinter(tb_base=".") + msg = tbp("Hello world", tb=tb) + print(msg) + + +def test_traceback_tb_base_none(tb): + tbp = TracebackPrinter() + msg = tbp("Hello world", tb=tb) + print(msg) + + +def test_traceback_printer_no_tb(): + tbp = TracebackPrinter(tb_base="wasabi") + msg = tbp("Hello world", "This is a test") + print(msg) + + +def test_traceback_printer_custom_tb_range(): + tbp = TracebackPrinter(tb_range_start=-10, tb_range_end=-3) + msg = tbp("Hello world", "This is a test") + print(msg) + + +def test_traceback_printer_custom_tb_range_start(): + tbp = TracebackPrinter(tb_range_start=-1) + msg = tbp("Hello world", "This is a test") + print(msg) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_util.py b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_util.py new file mode 100644 index 0000000000000000000000000000000000000000..b158a8433804a2dd15d0d21d653775180431e3d9 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/wasabi/tests/test_util.py @@ -0,0 +1,73 @@ +import pytest + +from wasabi.util import color, diff_strings, format_repr, locale_escape, wrap + + +def test_color(): + assert color("test", fg="green") == "\x1b[38;5;2mtest\x1b[0m" + assert color("test", fg=4) == "\x1b[38;5;4mtest\x1b[0m" + assert color("test", bold=True) == "\x1b[1mtest\x1b[0m" + assert color("test", fg="red", underline=True) == "\x1b[4;38;5;1mtest\x1b[0m" + assert ( + color("test", fg=7, bg="red", bold=True) == "\x1b[1;38;5;7;48;5;1mtest\x1b[0m" + ) + + +def test_wrap(): + text = "Hello world, this is a test." + assert wrap(text, indent=0) == text + assert wrap(text, indent=4) == " Hello world, this is a test." + assert wrap(text, wrap_max=10, indent=0) == "Hello\nworld,\nthis is a\ntest." + assert ( + wrap(text, wrap_max=5, indent=2) + == " Hello\n world,\n this\n is\n a\n test." + ) + + +def test_format_repr(): + obj = {"hello": "world", "test": 123} + formatted = format_repr(obj) + assert formatted.replace("u'", "'") in [ + "{'hello': 'world', 'test': 123}", + "{'test': 123, 'hello': 'world'}", + ] + formatted = format_repr(obj, max_len=10) + assert formatted.replace("u'", "'") in [ + "{'hel ... 123}", + "{'tes ... rld'}", + "{'te ... rld'}", + ] + formatted = format_repr(obj, max_len=10, ellipsis="[...]") + assert formatted.replace("u'", "'") in [ + "{'hel [...] 123}", + "{'tes [...] rld'}", + "{'te [...] rld'}", + ] + + +@pytest.mark.parametrize( + "text,non_ascii", + [ + ("abc", ["abc"]), + ("\u2714 abc", ["? abc"]), + ("👻", ["??", "?"]), # On Python 3 windows, this becomes "?" instead of "??" + ], +) +def test_locale_escape(text, non_ascii): + result = locale_escape(text) + assert result == text or result in non_ascii + print(result) + + +def test_diff_strings(): + a = "hello\nworld\nwide\nweb" + b = "yo\nwide\nworld\nweb" + expected = "\x1b[38;5;16;48;5;2myo\x1b[0m\n\x1b[38;5;16;48;5;2mwide\x1b[0m\n\x1b[38;5;16;48;5;1mhello\x1b[0m\nworld\n\x1b[38;5;16;48;5;1mwide\x1b[0m\nweb" + assert diff_strings(a, b) == expected + + +def test_diff_strings_with_symbols(): + a = "hello\nworld\nwide\nweb" + b = "yo\nwide\nworld\nweb" + expected = "\x1b[38;5;16;48;5;2m+ yo\x1b[0m\n\x1b[38;5;16;48;5;2m+ wide\x1b[0m\n\x1b[38;5;16;48;5;1m- hello\x1b[0m\nworld\n\x1b[38;5;16;48;5;1m- wide\x1b[0m\nweb" + assert diff_strings(a, b, add_symbols=True) == expected diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel-0.4.3.dist-info/licenses/LICENSE b/TTS/Kokoro/.venv/Lib/site-packages/weasel-0.4.3.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..40d04a05a583df6949d1a7449cf219aec744f541 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel-0.4.3.dist-info/licenses/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (C) 2022 ExplosionAI GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..37f7d21dae44fa064676ffd3e53dec558d583414 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/__main__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/__main__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c12cb00a9033044d05bddf4ad7ef62d2ab37a45 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/__main__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/about.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/about.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..54460dfdc09cedddd88c73e620ffc325d5d698bc Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/about.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/compat.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/compat.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c7c8d3faa213ad8d472f6b64f8e0e6cd6558a55 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/compat.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/errors.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/errors.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31cbee6801123b861c0a1d59a83a3e31467f238d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/errors.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/schemas.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/schemas.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..937b4be1aaf90581f3c0ee35ca7d04307ad9c7a6 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/__pycache__/schemas.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8561d7a319db2a6c5ccd238288bf2c76177ce0c0 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__init__.py @@ -0,0 +1,9 @@ +from .main import app # isort: skip + +from .assets import project_assets +from .clone import project_clone +from .document import project_document +from .dvc import project_update_dvc +from .pull import project_pull +from .push import project_push +from .run import project_run diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5b70a1f25a006e39a8357cbc94373f8f0cbd03d1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/assets.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/assets.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4500432454751f8cc2979d50f2309286bbab0cef Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/assets.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/clone.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/clone.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b215d6f365af40d8ddc009aafeb079be5ed2a5ab Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/clone.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/document.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/document.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e0ce10068b7fc7f999f0a3cdb509bdfdf352d5dd Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/document.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/dvc.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/dvc.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f172a3e6f0d693e3386f8785df10f50d0e57fd3a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/dvc.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/main.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/main.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b4ad6f15dee2fcee31b258e171177df5aa1771a1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/main.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/pull.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/pull.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..62289256d6b3b9631f2d549a8a60229091c288b2 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/pull.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/push.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/push.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f471040cd4b8571ed198d6682df0f684fdf6c199 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/push.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/remote_storage.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/remote_storage.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..01ba38357abe7ea86bd736d1c8fb6f2ce86c790d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/remote_storage.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/run.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/run.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c4ab01286248c5c9b4730fa7072d8ed6fd0d88c1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/__pycache__/run.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/assets.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/assets.py new file mode 100644 index 0000000000000000000000000000000000000000..adbc606e8d36da3c3c28a4203c4abdb1570e3949 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/assets.py @@ -0,0 +1,207 @@ +import os +import re +import shutil +from pathlib import Path +from typing import Any, Dict, Optional + +import requests +import typer +from wasabi import msg + +from ..util import SimpleFrozenDict, download_file, ensure_path, get_checksum +from ..util import get_git_version, git_checkout, load_project_config +from ..util import parse_config_overrides, working_dir +from .main import PROJECT_FILE, Arg, Opt, app + +# Whether assets are extra if `extra` is not set. +EXTRA_DEFAULT = False + + +@app.command( + "assets", + context_settings={"allow_extra_args": True, "ignore_unknown_options": True}, +) +def project_assets_cli( + # fmt: off + ctx: typer.Context, # This is only used to read additional arguments + project_dir: Path = Arg(Path.cwd(), help="Path to cloned project. Defaults to current working directory.", exists=True, file_okay=False), + sparse_checkout: bool = Opt(False, "--sparse", "-S", help="Use sparse checkout for assets provided via Git, to only check out and clone the files needed. Requires Git v22.2+."), + extra: bool = Opt(False, "--extra", "-e", help="Download all assets, including those marked as 'extra'.") + # fmt: on +): + """Fetch project assets like datasets and pretrained weights. Assets are + defined in the "assets" section of the project.yml. If a checksum is + provided in the project.yml, the file is only downloaded if no local file + with the same checksum exists. + + DOCS: https://github.com/explosion/weasel/tree/main/docs/tutorial/directory-and-assets.md + """ + overrides = parse_config_overrides(ctx.args) + project_assets( + project_dir, + overrides=overrides, + sparse_checkout=sparse_checkout, + extra=extra, + ) + + +def project_assets( + project_dir: Path, + *, + overrides: Dict[str, Any] = SimpleFrozenDict(), + sparse_checkout: bool = False, + extra: bool = False, +) -> None: + """Fetch assets for a project using DVC if possible. + + project_dir (Path): Path to project directory. + sparse_checkout (bool): Use sparse checkout for assets provided via Git, to only check out and clone the files + needed. + extra (bool): Whether to download all assets, including those marked as 'extra'. + """ + project_path = ensure_path(project_dir) + config = load_project_config(project_path, overrides=overrides) + assets = [ + asset + for asset in config.get("assets", []) + if extra or not asset.get("extra", EXTRA_DEFAULT) + ] + if not assets: + msg.warn( + f"No assets specified in {PROJECT_FILE} (if assets are marked as extra, download them with --extra)", + exits=0, + ) + msg.info(f"Fetching {len(assets)} asset(s)") + + for asset in assets: + dest = (project_dir / asset["dest"]).resolve() + checksum = asset.get("checksum") + if "git" in asset: + git_err = ( + "Cloning Weasel project templates requires Git and the 'git' command. " + "Make sure it's installed and that the executable is available." + ) + get_git_version(error=git_err) + if dest.exists(): + # If there's already a file, check for checksum + if checksum and checksum == get_checksum(dest): + msg.good( + f"Skipping download with matching checksum: {asset['dest']}" + ) + continue + else: + if dest.is_dir(): + shutil.rmtree(dest) + else: + dest.unlink() + if "repo" not in asset["git"] or asset["git"]["repo"] is None: + msg.fail( + "A git asset must include 'repo', the repository address.", exits=1 + ) + if "path" not in asset["git"] or asset["git"]["path"] is None: + msg.fail( + "A git asset must include 'path' - use \"\" to get the entire repository.", + exits=1, + ) + git_checkout( + asset["git"]["repo"], + asset["git"]["path"], + dest, + branch=asset["git"].get("branch"), + sparse=sparse_checkout, + ) + msg.good(f"Downloaded asset {dest}") + else: + url = asset.get("url") + if not url: + # project.yml defines asset without URL that the user has to place + check_private_asset(dest, checksum) + continue + fetch_asset(project_path, url, dest, checksum) + + +def check_private_asset(dest: Path, checksum: Optional[str] = None) -> None: + """Check and validate assets without a URL (private assets that the user + has to provide themselves) and give feedback about the checksum. + + dest (Path): Destination path of the asset. + checksum (Optional[str]): Optional checksum of the expected file. + """ + if not Path(dest).exists(): + err = f"No URL provided for asset. You need to add this file yourself: {dest}" + msg.warn(err) + else: + if not checksum: + msg.good(f"Asset already exists: {dest}") + elif checksum == get_checksum(dest): + msg.good(f"Asset exists with matching checksum: {dest}") + else: + msg.fail(f"Asset available but with incorrect checksum: {dest}") + + +def fetch_asset( + project_path: Path, url: str, dest: Path, checksum: Optional[str] = None +) -> None: + """Fetch an asset from a given URL or path. If a checksum is provided and a + local file exists, it's only re-downloaded if the checksum doesn't match. + + project_path (Path): Path to project directory. + url (str): URL or path to asset. + checksum (Optional[str]): Optional expected checksum of local file. + RETURNS (Optional[Path]): The path to the fetched asset or None if fetching + the asset failed. + """ + dest_path = (project_path / dest).resolve() + if dest_path.exists(): + # If there's already a file, check for checksum + if checksum: + if checksum == get_checksum(dest_path): + msg.good(f"Skipping download with matching checksum: {dest}") + return + else: + # If there's not a checksum, make sure the file is a possibly valid size + if os.path.getsize(dest_path) == 0: + msg.warn(f"Asset exists but with size of 0 bytes, deleting: {dest}") + os.remove(dest_path) + # We might as well support the user here and create parent directories in + # case the asset dir isn't listed as a dir to create in the project.yml + if not dest_path.parent.exists(): + dest_path.parent.mkdir(parents=True) + with working_dir(project_path): + url = convert_asset_url(url) + try: + download_file(url, dest_path) + msg.good(f"Downloaded asset {dest}") + except requests.exceptions.RequestException as e: + if Path(url).exists() and Path(url).is_file(): + # If it's a local file, copy to destination + shutil.copy(url, str(dest_path)) + msg.good(f"Copied local asset {dest}") + else: + msg.fail(f"Download failed: {dest}", e) + if checksum and checksum != get_checksum(dest_path): + msg.fail(f"Checksum doesn't match value defined in {PROJECT_FILE}: {dest}") + + +def convert_asset_url(url: str) -> str: + """Check and convert the asset URL if needed. + + url (str): The asset URL. + RETURNS (str): The converted URL. + """ + # If the asset URL is a regular GitHub URL it's likely a mistake + if ( + re.match(r"(http(s?)):\/\/github.com", url) + and "releases/download" not in url + and "/raw/" not in url + ): + converted = url.replace("github.com", "raw.githubusercontent.com") + converted = re.sub(r"/(tree|blob)/", "/", converted) + msg.warn( + "Downloading from a regular GitHub URL. This will only download " + "the source of the page, not the actual file. Converting the URL " + "to a raw URL.", + converted, + ) + return converted + return url diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/clone.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/clone.py new file mode 100644 index 0000000000000000000000000000000000000000..119627f892b568cf019a67604384d5d5a0c59b8b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/clone.py @@ -0,0 +1,126 @@ +import re +import subprocess +from pathlib import Path +from typing import Optional + +import typer +from wasabi import msg + +from .. import about +from ..util import ensure_path, get_git_version, git_checkout, git_repo_branch_exists +from .main import COMMAND, PROJECT_FILE, Arg, Opt, _get_parent_command, app + +DEFAULT_REPO = about.__projects__ +DEFAULT_PROJECTS_BRANCH = about.__projects_branch__ +DEFAULT_BRANCHES = ["main", "master"] + + +@app.command("clone") +def project_clone_cli( + # fmt: off + ctx: typer.Context, # This is only used to read the parent command + name: str = Arg(..., help="The name of the template to clone"), + dest: Optional[Path] = Arg(None, help="Where to clone the project. Defaults to current working directory", exists=False), + repo: str = Opt(DEFAULT_REPO, "--repo", "-r", help="The repository to clone from"), + branch: Optional[str] = Opt(None, "--branch", "-b", help=f"The branch to clone from. If not provided, will attempt {', '.join(DEFAULT_BRANCHES)}"), + sparse_checkout: bool = Opt(False, "--sparse", "-S", help="Use sparse Git checkout to only check out and clone the files needed. Requires Git v22.2+."), + # fmt: on +): + """Clone a project template from a repository. Calls into "git" and will + only download the files from the given subdirectory. The GitHub repo + defaults to the official Weasel template repo, but can be customized + (including using a private repo). + + DOCS: https://github.com/explosion/weasel/tree/main/docs/cli.md#clipboard-clone + """ + if dest is None: + dest = Path.cwd() / Path(name).parts[-1] + if repo == DEFAULT_REPO and branch is None: + branch = DEFAULT_PROJECTS_BRANCH + + if branch is None: + for default_branch in DEFAULT_BRANCHES: + if git_repo_branch_exists(repo, default_branch): + branch = default_branch + break + if branch is None: + default_branches_msg = ", ".join(f"'{b}'" for b in DEFAULT_BRANCHES) + msg.fail( + "No branch provided and attempted default " + f"branches {default_branches_msg} do not exist.", + exits=1, + ) + else: + if not git_repo_branch_exists(repo, branch): + msg.fail(f"repo: {repo} (branch: {branch}) does not exist.", exits=1) + assert isinstance(branch, str) + parent_command = _get_parent_command(ctx) + project_clone( + name, + dest, + repo=repo, + branch=branch, + sparse_checkout=sparse_checkout, + parent_command=parent_command, + ) + + +def project_clone( + name: str, + dest: Path, + *, + repo: str = about.__projects__, + branch: str = about.__projects_branch__, + sparse_checkout: bool = False, + parent_command: str = COMMAND, +) -> None: + """Clone a project template from a repository. + + name (str): Name of subdirectory to clone. + dest (Path): Destination path of cloned project. + repo (str): URL of Git repo containing project templates. + branch (str): The branch to clone from + """ + dest = ensure_path(dest) + check_clone(name, dest, repo) + project_dir = dest.resolve() + repo_name = re.sub(r"(http(s?)):\/\/github.com/", "", repo) + try: + git_checkout(repo, name, dest, branch=branch, sparse=sparse_checkout) + except subprocess.CalledProcessError: + err = f"Could not clone '{name}' from repo '{repo_name}' (branch '{branch}')" + msg.fail(err, exits=1) + msg.good(f"Cloned '{name}' from '{repo_name}' (branch '{branch}')", project_dir) + if not (project_dir / PROJECT_FILE).exists(): + msg.warn(f"No {PROJECT_FILE} found in directory") + else: + msg.good("Your project is now ready!") + print(f"To fetch the assets, run:\n{parent_command} assets {dest}") + + +def check_clone(name: str, dest: Path, repo: str) -> None: + """Check and validate that the destination path can be used to clone. Will + check that Git is available and that the destination path is suitable. + + name (str): Name of the directory to clone from the repo. + dest (Path): Local destination of cloned directory. + repo (str): URL of the repo to clone from. + """ + git_err = ( + f"Cloning Weasel project templates requires Git and the 'git' command. " + f"To clone a project without Git, copy the files from the '{name}' " + f"directory in the {repo} to {dest} manually." + ) + get_git_version(error=git_err) + if not dest: + msg.fail(f"Not a valid directory to clone project: {dest}", exits=1) + if dest.exists(): + # Directory already exists (not allowed, clone needs to create it) + msg.fail(f"Can't clone project, directory already exists: {dest}", exits=1) + if not dest.parent.exists(): + # We're not creating parents, parent dir should exist + msg.fail( + f"Can't clone project, parent directory doesn't exist: {dest.parent}. " + f"Create the necessary folder(s) first before continuing.", + exits=1, + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/document.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/document.py new file mode 100644 index 0000000000000000000000000000000000000000..3558f3d2ae1a0c07ec1c2fad23692ead0d0b30be --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/document.py @@ -0,0 +1,130 @@ +from pathlib import Path + +from wasabi import MarkdownRenderer, msg + +from ..util import load_project_config, working_dir +from .main import PROJECT_FILE, Arg, Opt, app + +DOCS_URL = "https://github.com/explosion/weasel" +INTRO_PROJECT = f"""The [`{PROJECT_FILE}`]({PROJECT_FILE}) defines the data assets required by the +project, as well as the available commands and workflows. For details, see the +[Weasel documentation]({DOCS_URL}).""" +INTRO_COMMANDS = f"""The following commands are defined by the project. They +can be executed using [`weasel run [name]`]({DOCS_URL}/tree/main/docs/cli.md#rocket-run). +Commands are only re-run if their inputs have changed.""" +INTRO_WORKFLOWS = f"""The following workflows are defined by the project. They +can be executed using [`weasel run [name]`]({DOCS_URL}/tree/main/docs/cli.md#rocket-run) +and will run the specified commands in order. Commands are only re-run if their +inputs have changed.""" +INTRO_ASSETS = f"""The following assets are defined by the project. They can +be fetched by running [`weasel assets`]({DOCS_URL}/tree/main/docs/cli.md#open_file_folder-assets) +in the project directory.""" +# These markers are added to the Markdown and can be used to update the file in +# place if it already exists. Only the auto-generated part will be replaced. +MARKER_TAGS = ("WEASEL", "SPACY PROJECT") +MARKER_START = "" +MARKER_END = "" +# If this marker is used in an existing README, it's ignored and not replaced +MARKER_IGNORE = "" + + +@app.command("document") +def project_document_cli( + # fmt: off + project_dir: Path = Arg(Path.cwd(), help="Path to cloned project. Defaults to current working directory.", exists=True, file_okay=False), + output_file: Path = Opt("-", "--output", "-o", help="Path to output Markdown file for output. Defaults to - for standard output"), + no_emoji: bool = Opt(False, "--no-emoji", "-NE", help="Don't use emoji") + # fmt: on +): + """ + Auto-generate a README.md for a project. If the content is saved to a file, + hidden markers are added so you can add custom content before or after the + auto-generated section and only the auto-generated docs will be replaced + when you re-run the command. + + DOCS: https://github.com/explosion/weasel/tree/main/docs/cli.md#closed_book-document + """ + project_document(project_dir, output_file, no_emoji=no_emoji) + + +def project_document( + project_dir: Path, output_file: Path, *, no_emoji: bool = False +) -> None: + is_stdout = str(output_file) == "-" + config = load_project_config(project_dir) + md = MarkdownRenderer(no_emoji=no_emoji) + md.add(MARKER_START.format(tag="WEASEL")) + title = config.get("title") + description = config.get("description") + md.add(md.title(1, f"Weasel Project{f': {title}' if title else ''}", "🪐")) + if description: + md.add(description) + md.add(md.title(2, PROJECT_FILE, "📋")) + md.add(INTRO_PROJECT) + # Commands + cmds = config.get("commands", []) + data = [(md.code(cmd["name"]), cmd.get("help", "")) for cmd in cmds] + if data: + md.add(md.title(3, "Commands", "⏯")) + md.add(INTRO_COMMANDS) + md.add(md.table(data, ["Command", "Description"])) + # Workflows + wfs = config.get("workflows", {}).items() + data = [(md.code(n), " → ".join(md.code(w) for w in stp)) for n, stp in wfs] + if data: + md.add(md.title(3, "Workflows", "⏭")) + md.add(INTRO_WORKFLOWS) + md.add(md.table(data, ["Workflow", "Steps"])) + # Assets + assets = config.get("assets", []) + data = [] + for a in assets: + source = "Git" if a.get("git") else "URL" if a.get("url") else "Local" + dest_path = a["dest"] + dest = md.code(dest_path) + if source == "Local": + # Only link assets if they're in the repo + with working_dir(project_dir) as p: + if (p / dest_path).exists(): + dest = md.link(dest, dest_path) + data.append((dest, source, a.get("description", ""))) + if data: + md.add(md.title(3, "Assets", "🗂")) + md.add(INTRO_ASSETS) + md.add(md.table(data, ["File", "Source", "Description"])) + md.add(MARKER_END.format(tag="WEASEL")) + # Output result + if is_stdout: + print(md.text) + else: + content = md.text + if output_file.exists(): + with output_file.open("r", encoding="utf8") as f: + existing = f.read() + + for marker_tag in MARKER_TAGS: + if MARKER_IGNORE.format(tag=marker_tag) in existing: + msg.warn( + "Found ignore marker in existing file: skipping", output_file + ) + return + + marker_tag_found = False + for marker_tag in MARKER_TAGS: + markers = { + "start": MARKER_START.format(tag=marker_tag), + "end": MARKER_END.format(tag=marker_tag), + } + if markers["start"] in existing and markers["end"] in existing: + marker_tag_found = True + msg.info("Found existing file: only replacing auto-generated docs") + before = existing.split(markers["start"])[0] + after = existing.split(markers["end"])[1] + content = f"{before}{content}{after}" + break + if not marker_tag_found: + msg.warn("Replacing existing file") + + with output_file.open("w", encoding="utf8") as f: + f.write(content) + msg.good("Saved project documentation", output_file) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/dvc.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/dvc.py new file mode 100644 index 0000000000000000000000000000000000000000..c6c468a5df945260ff1e02ca65e4828edfc46fcb --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/dvc.py @@ -0,0 +1,206 @@ +"""This module contains helpers and subcommands for integrating Weasel +with Data Version Control (DVC). https://dvc.org""" + +import subprocess +from pathlib import Path +from typing import Any, Dict, List, Optional + +from wasabi import msg + +from ..util import get_hash, join_command, load_project_config, run_command, working_dir +from .main import COMMAND, NAME, PROJECT_FILE, Arg, Opt, app + +DVC_CONFIG = "dvc.yaml" +DVC_DIR = ".dvc" +UPDATE_COMMAND = "dvc" +DVC_CONFIG_COMMENT = f"""# This file is auto-generated by Weasel based on your {PROJECT_FILE}. If you've +# edited your {PROJECT_FILE}, you can regenerate this file by running: +# {COMMAND} {UPDATE_COMMAND}""" + + +@app.command(UPDATE_COMMAND) +def project_update_dvc_cli( + # fmt: off + project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False), + workflow: Optional[str] = Arg(None, help=f"Name of workflow defined in {PROJECT_FILE}. Defaults to first workflow if not set."), + verbose: bool = Opt(False, "--verbose", "-V", help="Print more info"), + quiet: bool = Opt(False, "--quiet", "-q", help="Print less info"), + force: bool = Opt(False, "--force", "-F", help="Force update DVC config"), + # fmt: on +): + """Auto-generate Data Version Control (DVC) config. A DVC + project can only define one pipeline, so you need to specify one workflow + defined in the project.yml. If no workflow is specified, the first defined + workflow is used. The DVC config will only be updated if the project.yml + changed. + + DOCS: https://github.com/explosion/weasel/tree/main/docs/cli.md#repeat-dvc + """ + project_update_dvc(project_dir, workflow, verbose=verbose, quiet=quiet, force=force) + + +def project_update_dvc( + project_dir: Path, + workflow: Optional[str] = None, + *, + verbose: bool = False, + quiet: bool = False, + force: bool = False, +) -> None: + """Update the auto-generated Data Version Control (DVC) config file. A DVC + project can only define one pipeline, so you need to specify one workflow + defined in the project.yml. Will only update the file if the checksum changed. + + project_dir (Path): The project directory. + workflow (Optional[str]): Optional name of workflow defined in project.yml. + If not set, the first workflow will be used. + verbose (bool): Print more info. + quiet (bool): Print less info. + force (bool): Force update DVC config. + """ + config = load_project_config(project_dir) + updated = update_dvc_config( + project_dir, config, workflow, verbose=verbose, quiet=quiet, force=force + ) + help_msg = "To execute the workflow with DVC, run: dvc repro" + if updated: + msg.good(f"Updated DVC config from {PROJECT_FILE}", help_msg) + else: + msg.info(f"No changes found in {PROJECT_FILE}, no update needed", help_msg) + + +def update_dvc_config( + path: Path, + config: Dict[str, Any], + workflow: Optional[str] = None, + verbose: bool = False, + quiet: bool = False, + force: bool = False, +) -> bool: + """Re-run the DVC commands in dry mode and update dvc.yaml file in the + project directory. The file is auto-generated based on the config. The + first line of the auto-generated file specifies the hash of the config + dict, so if any of the config values change, the DVC config is regenerated. + + path (Path): The path to the project directory. + config (Dict[str, Any]): The loaded project.yml. + verbose (bool): Whether to print additional info (via DVC). + quiet (bool): Don't output anything (via DVC). + force (bool): Force update, even if hashes match. + RETURNS (bool): Whether the DVC config file was updated. + """ + ensure_dvc(path) + workflows = config.get("workflows", {}) + workflow_names = list(workflows.keys()) + check_workflows(workflow_names, workflow) + if not workflow: + workflow = workflow_names[0] + config_hash = get_hash(config) + path = path.resolve() + dvc_config_path = path / DVC_CONFIG + if dvc_config_path.exists(): + # Check if the file was generated using the current config, if not, redo + with dvc_config_path.open("r", encoding="utf8") as f: + ref_hash = f.readline().strip().replace("# ", "") + if ref_hash == config_hash and not force: + return False # Nothing has changed in project.yml, don't need to update + dvc_config_path.unlink() + dvc_commands = [] + config_commands = {cmd["name"]: cmd for cmd in config.get("commands", [])} + + # some flags that apply to every command + flags = [] + if verbose: + flags.append("--verbose") + if quiet: + flags.append("--quiet") + + for name in workflows[workflow]: + command = config_commands[name] + deps = command.get("deps", []) + outputs = command.get("outputs", []) + outputs_no_cache = command.get("outputs_no_cache", []) + if not deps and not outputs and not outputs_no_cache: + continue + # Default to the working dir as the project path since dvc.yaml is auto-generated + # and we don't want arbitrary paths in there + project_cmd = ["python", "-m", NAME, "project", "run", name] + deps_cmd = [c for cl in [["-d", p] for p in deps] for c in cl] + outputs_cmd = [c for cl in [["-o", p] for p in outputs] for c in cl] + outputs_nc_cmd = [c for cl in [["-O", p] for p in outputs_no_cache] for c in cl] + + dvc_cmd = ["run", *flags, "-n", name, "-w", str(path), "--no-exec"] + if command.get("no_skip"): + dvc_cmd.append("--always-changed") + full_cmd = [*dvc_cmd, *deps_cmd, *outputs_cmd, *outputs_nc_cmd, *project_cmd] + dvc_commands.append(join_command(full_cmd)) + + if not dvc_commands: + # If we don't check for this, then there will be an error when reading the + # config, since DVC wouldn't create it. + msg.fail( + "No usable commands for DVC found. This can happen if none of your " + "commands have dependencies or outputs.", + exits=1, + ) + + with working_dir(path): + for c in dvc_commands: + dvc_command = "dvc " + c + run_command(dvc_command) + with dvc_config_path.open("r+", encoding="utf8") as f: + content = f.read() + f.seek(0, 0) + f.write(f"# {config_hash}\n{DVC_CONFIG_COMMENT}\n{content}") + return True + + +def check_workflows(workflows: List[str], workflow: Optional[str] = None) -> None: + """Validate workflows provided in project.yml and check that a given + workflow can be used to generate a DVC config. + + workflows (List[str]): Names of the available workflows. + workflow (Optional[str]): The name of the workflow to convert. + """ + if not workflows: + msg.fail( + f"No workflows defined in {PROJECT_FILE}. To generate a DVC config, " + f"define at least one list of commands.", + exits=1, + ) + if workflow is not None and workflow not in workflows: + msg.fail( + f"Workflow '{workflow}' not defined in {PROJECT_FILE}. " + f"Available workflows: {', '.join(workflows)}", + exits=1, + ) + if not workflow: + msg.warn( + f"No workflow specified for DVC pipeline. Using the first workflow " + f"defined in {PROJECT_FILE}: '{workflows[0]}'" + ) + + +def ensure_dvc(project_dir: Path) -> None: + """Ensure that the "dvc" command is available and that the current project + directory is an initialized DVC project. + """ + try: + subprocess.run(["dvc", "--version"], stdout=subprocess.DEVNULL) + except Exception: + msg.fail( + "To use Weasel with DVC (Data Version Control), DVC needs " + "to be installed and the 'dvc' command needs to be available", + "You can install the Python package from pip (pip install dvc) or " + "conda (conda install -c conda-forge dvc). For more details, see the " + "documentation: https://dvc.org/doc/install", + exits=1, + ) + if not (project_dir / ".dvc").exists(): + msg.fail( + "Project not initialized as a DVC project", + "To initialize a DVC project, you can run 'dvc init' in the project " + "directory. For more details, see the documentation: " + "https://dvc.org/doc/command-reference/init", + exits=1, + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/main.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/main.py new file mode 100644 index 0000000000000000000000000000000000000000..3d19098e702161bdba0d3745848cca6b3d54ebb9 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/main.py @@ -0,0 +1,30 @@ +import typer + +COMMAND = "python -m weasel" +NAME = "weasel" +HELP = """weasel Command-line Interface + +DOCS: https://github.com/explosion/weasel +""" + +PROJECT_FILE = "project.yml" +PROJECT_LOCK = "project.lock" + +# Wrappers for Typer's annotations. Initially created to set defaults and to +# keep the names short, but not needed at the moment. +Arg = typer.Argument +Opt = typer.Option + +app = typer.Typer(name=NAME, help=HELP, no_args_is_help=True, add_completion=False) + + +def _get_parent_command(ctx: typer.Context) -> str: + parent_command = "" + ctx_parent = ctx.parent + while ctx_parent: + if ctx_parent.info_name: + parent_command = ctx_parent.info_name + " " + parent_command + ctx_parent = ctx_parent.parent + else: + return COMMAND + return parent_command.strip() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/pull.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/pull.py new file mode 100644 index 0000000000000000000000000000000000000000..612bf0393ed1eb9260233baba3f4facd53250c07 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/pull.py @@ -0,0 +1,68 @@ +from pathlib import Path + +from wasabi import msg + +from ..util import load_project_config, logger +from .main import Arg, app +from .remote_storage import RemoteStorage, get_command_hash +from .run import update_lockfile + + +@app.command("pull") +def project_pull_cli( + # fmt: off + remote: str = Arg("default", help="Name or path of remote storage"), + project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False), + # fmt: on +): + """Retrieve available precomputed outputs from a remote storage. + You can alias remotes in your project.yml by mapping them to storage paths. + A storage can be anything that the smart_open library can upload to, e.g. + AWS, Google Cloud Storage, SSH, local directories etc. + + DOCS: https://github.com/explosion/weasel/tree/main/docs/cli.md#arrow_down-push + """ + for url, output_path in project_pull(project_dir, remote): + if url is not None: + msg.good(f"Pulled {output_path} from {url}") + + +def project_pull(project_dir: Path, remote: str, *, verbose: bool = False): + # TODO: We don't have tests for this :(. It would take a bit of mockery to + # set up. I guess see if it breaks first? + config = load_project_config(project_dir) + if remote in config.get("remotes", {}): + remote = config["remotes"][remote] + storage = RemoteStorage(project_dir, remote) + commands = list(config.get("commands", [])) + # We use a while loop here because we don't know how the commands + # will be ordered. A command might need dependencies from one that's later + # in the list. + while commands: + for i, cmd in enumerate(list(commands)): + logger.debug("CMD: %s.", cmd["name"]) + deps = [project_dir / dep for dep in cmd.get("deps", [])] + if all(dep.exists() for dep in deps): + cmd_hash = get_command_hash("", "", deps, cmd["script"]) + for output_path in cmd.get("outputs", []): + url = storage.pull(output_path, command_hash=cmd_hash) + logger.debug( + "URL: %s for %s with command hash %s", + url, + output_path, + cmd_hash, + ) + yield url, output_path + + out_locs = [project_dir / out for out in cmd.get("outputs", [])] + if all(loc.exists() for loc in out_locs): + update_lockfile(project_dir, cmd) + # We remove the command from the list here, and break, so that + # we iterate over the loop again. + commands.pop(i) + break + else: + logger.debug("Dependency missing. Skipping %s outputs.", cmd["name"]) + else: + # If we didn't break the for loop, break the while loop. + break diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/push.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/push.py new file mode 100644 index 0000000000000000000000000000000000000000..76829255aa05c01c978a8922f5a79b8db933e9da --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/push.py @@ -0,0 +1,70 @@ +from pathlib import Path + +from wasabi import msg + +from ..util import load_project_config, logger +from .main import Arg, app +from .remote_storage import RemoteStorage, get_command_hash, get_content_hash + + +@app.command("push") +def project_push_cli( + # fmt: off + remote: str = Arg("default", help="Name or path of remote storage"), + project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False), + # fmt: on +): + """Persist outputs to a remote storage. You can alias remotes in your + project.yml by mapping them to storage paths. A storage can be anything that + the smart_open library can upload to, e.g. AWS, Google Cloud Storage, SSH, + local directories etc. + + DOCS: https://github.com/explosion/weasel/tree/main/docs/cli.md#arrow_up-push + """ + for output_path, url in project_push(project_dir, remote): + if url is None: + msg.info(f"Skipping {output_path}") + else: + msg.good(f"Pushed {output_path} to {url}") + + +def project_push(project_dir: Path, remote: str): + """Persist outputs to a remote storage. You can alias remotes in your project.yml + by mapping them to storage paths. A storage can be anything that the smart_open + library can upload to, e.g. gcs, aws, ssh, local directories etc + """ + config = load_project_config(project_dir) + if remote in config.get("remotes", {}): + remote = config["remotes"][remote] + storage = RemoteStorage(project_dir, remote) + for cmd in config.get("commands", []): + logger.debug("CMD: %s", cmd["name"]) + deps = [project_dir / dep for dep in cmd.get("deps", [])] + if any(not dep.exists() for dep in deps): + logger.debug("Dependency missing. Skipping %s outputs", cmd["name"]) + continue + cmd_hash = get_command_hash( + "", "", [project_dir / dep for dep in cmd.get("deps", [])], cmd["script"] + ) + logger.debug("CMD_HASH: %s", cmd_hash) + for output_path in cmd.get("outputs", []): + output_loc = project_dir / output_path + if output_loc.exists() and _is_not_empty_dir(output_loc): + url = storage.push( + output_path, + command_hash=cmd_hash, + content_hash=get_content_hash(output_loc), + ) + logger.debug( + "URL: %s for output %s with cmd_hash %s", url, output_path, cmd_hash + ) + yield output_path, url + + +def _is_not_empty_dir(loc: Path): + if not loc.is_dir(): + return True + elif any(_is_not_empty_dir(child) for child in loc.iterdir()): + return True + else: + return False diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/remote_storage.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/remote_storage.py new file mode 100644 index 0000000000000000000000000000000000000000..066b84b920f2b395081a2ac3f79c341b15db27ff --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/remote_storage.py @@ -0,0 +1,204 @@ +import hashlib +import os +import site +import sys +import tarfile +import urllib.parse +from pathlib import Path +from typing import TYPE_CHECKING, Dict, List, Optional + +from wasabi import msg + +from ..errors import Errors +from ..util import check_spacy_env_vars, download_file, ensure_pathy, get_checksum +from ..util import get_hash, make_tempdir, upload_file + +if TYPE_CHECKING: + from cloudpathlib import CloudPath + + +class RemoteStorage: + """Push and pull outputs to and from a remote file storage. + + Remotes can be anything that `smart_open` can support: AWS, GCS, file system, + ssh, etc. + """ + + def __init__(self, project_root: Path, url: str, *, compression="gz"): + self.root = project_root + self.url = ensure_pathy(url) + self.compression = compression + + def push(self, path: Path, command_hash: str, content_hash: str) -> "CloudPath": + """Compress a file or directory within a project and upload it to a remote + storage. If an object exists at the full URL, nothing is done. + + Within the remote storage, files are addressed by their project path + (url encoded) and two user-supplied hashes, representing their creation + context and their file contents. If the URL already exists, the data is + not uploaded. Paths are archived and compressed prior to upload. + """ + loc = self.root / path + if not loc.exists(): + raise IOError(f"Cannot push {loc}: does not exist.") + url = self.make_url(path, command_hash, content_hash) + if url.exists(): + return url + tmp: Path + with make_tempdir() as tmp: + tar_loc = tmp / self.encode_name(str(path)) + mode_string = f"w:{self.compression}" if self.compression else "w" + with tarfile.open(tar_loc, mode=mode_string) as tar_file: + tar_file.add(str(loc), arcname=str(path)) + upload_file(tar_loc, url) + return url + + def pull( + self, + path: Path, + *, + command_hash: Optional[str] = None, + content_hash: Optional[str] = None, + ) -> Optional["CloudPath"]: + """Retrieve a file from the remote cache. If the file already exists, + nothing is done. + + If the command_hash and/or content_hash are specified, only matching + results are returned. If no results are available, an error is raised. + """ + dest = self.root / path + if dest.exists(): + return None + url = self.find(path, command_hash=command_hash, content_hash=content_hash) + if url is None: + return url + else: + # Make sure the destination exists + if not dest.parent.exists(): + dest.parent.mkdir(parents=True) + tmp: Path + with make_tempdir() as tmp: + tar_loc = tmp / url.parts[-1] + download_file(url, tar_loc) + mode_string = f"r:{self.compression}" if self.compression else "r" + with tarfile.open(tar_loc, mode=mode_string) as tar_file: + # This requires that the path is added correctly, relative + # to root. This is how we set things up in push() + + # Disallow paths outside the current directory for the tar + # file (CVE-2007-4559, directory traversal vulnerability) + def is_within_directory(directory, target): + abs_directory = os.path.abspath(directory) + abs_target = os.path.abspath(target) + prefix = os.path.commonprefix([abs_directory, abs_target]) + return prefix == abs_directory + + def safe_extract(tar, path): + for member in tar.getmembers(): + member_path = os.path.join(path, member.name) + if not is_within_directory(path, member_path): + raise ValueError(Errors.E201) + if sys.version_info >= (3, 12): + tar.extractall(path, filter="data") + else: + tar.extractall(path) + + safe_extract(tar_file, self.root) + return url + + def find( + self, + path: Path, + *, + command_hash: Optional[str] = None, + content_hash: Optional[str] = None, + ) -> Optional["CloudPath"]: + """Find the best matching version of a file within the storage, + or `None` if no match can be found. If both the creation and content hash + are specified, only exact matches will be returned. Otherwise, the most + recent matching file is preferred. + """ + name = self.encode_name(str(path)) + urls = [] + if command_hash is not None and content_hash is not None: + url = self.url / name / command_hash / content_hash + urls = [url] if url.exists() else [] + elif command_hash is not None: + if (self.url / name / command_hash).exists(): + urls = list((self.url / name / command_hash).iterdir()) + else: + if (self.url / name).exists(): + for sub_dir in (self.url / name).iterdir(): + urls.extend(sub_dir.iterdir()) + if content_hash is not None: + urls = [url for url in urls if url.parts[-1] == content_hash] + if len(urls) >= 2: + try: + urls.sort(key=lambda x: x.stat().st_mtime) + except Exception: + msg.warn( + "Unable to sort remote files by last modified. The file(s) " + "pulled from the cache may not be the most recent." + ) + return urls[-1] if urls else None + + def make_url(self, path: Path, command_hash: str, content_hash: str) -> "CloudPath": + """Construct a URL from a subpath, a creation hash and a content hash.""" + return self.url / self.encode_name(str(path)) / command_hash / content_hash + + def encode_name(self, name: str) -> str: + """Encode a subpath into a URL-safe name.""" + return urllib.parse.quote_plus(name) + + +def get_content_hash(loc: Path) -> str: + return get_checksum(loc) + + +def get_command_hash( + site_hash: str, env_hash: str, deps: List[Path], cmd: List[str] +) -> str: + """Create a hash representing the execution of a command. This includes the + currently installed packages, whatever environment variables have been marked + as relevant, and the command. + """ + check_spacy_env_vars() + dep_checksums = [get_checksum(dep) for dep in sorted(deps)] + hashes = [site_hash, env_hash] + dep_checksums + hashes.extend(cmd) + creation_bytes = "".join(hashes).encode("utf8") + return hashlib.md5(creation_bytes).hexdigest() + + +def get_site_hash(): + """Hash the current Python environment's site-packages contents, including + the name and version of the libraries. The list we're hashing is what + `pip freeze` would output. + """ + site_dirs = site.getsitepackages() + if site.ENABLE_USER_SITE: + site_dirs.extend(site.getusersitepackages()) + packages = set() + for site_dir in site_dirs: + site_dir = Path(site_dir) + for subpath in site_dir.iterdir(): + if subpath.parts[-1].endswith("dist-info"): + packages.add(subpath.parts[-1].replace(".dist-info", "")) + package_bytes = "".join(sorted(packages)).encode("utf8") + return hashlib.md5sum(package_bytes).hexdigest() + + +def get_env_hash(env: Dict[str, str]) -> str: + """Construct a hash of the environment variables that will be passed into + the commands. + + Values in the env dict may be references to the current os.environ, using + the syntax $ENV_VAR to mean os.environ[ENV_VAR] + """ + env_vars = {} + for key, value in env.items(): + if value.startswith("$"): + env_vars[key] = os.environ.get(value[1:], "") + else: + env_vars[key] = value + return get_hash(env_vars) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/run.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/run.py new file mode 100644 index 0000000000000000000000000000000000000000..1372225c0f56a4517d43599fb6892ba6180b9510 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/cli/run.py @@ -0,0 +1,310 @@ +import sys +from pathlib import Path +from typing import Any, Dict, Iterable, List, Optional, Sequence + +import srsly +import typer +from wasabi import msg +from wasabi.util import locale_escape + +from ..util import SimpleFrozenDict, SimpleFrozenList, check_spacy_env_vars +from ..util import get_checksum, get_hash, is_cwd, join_command, load_project_config +from ..util import parse_config_overrides, run_command, split_command, working_dir +from .main import COMMAND, PROJECT_FILE, PROJECT_LOCK, Arg, Opt, _get_parent_command +from .main import app + + +@app.command( + "run", context_settings={"allow_extra_args": True, "ignore_unknown_options": True} +) +def project_run_cli( + # fmt: off + ctx: typer.Context, # This is only used to read additional arguments + subcommand: str = Arg(None, help=f"Name of command defined in the {PROJECT_FILE}"), + project_dir: Path = Arg(Path.cwd(), help="Location of project directory. Defaults to current working directory.", exists=True, file_okay=False), + force: bool = Opt(False, "--force", "-F", help="Force re-running steps, even if nothing changed"), + dry: bool = Opt(False, "--dry", "-D", help="Perform a dry run and don't execute scripts"), + show_help: bool = Opt(False, "--help", help="Show help message and available subcommands") + # fmt: on +): + """Run a named command or workflow defined in the project.yml. If a workflow + name is specified, all commands in the workflow are run, in order. If + commands define dependencies and/or outputs, they will only be re-run if + state has changed. + + DOCS: https://github.com/explosion/weasel/tree/main/docs/cli.md#rocket-run + """ + parent_command = _get_parent_command(ctx) + if show_help or not subcommand: + print_run_help(project_dir, subcommand, parent_command) + else: + overrides = parse_config_overrides(ctx.args) + project_run( + project_dir, + subcommand, + overrides=overrides, + force=force, + dry=dry, + parent_command=parent_command, + ) + + +def project_run( + project_dir: Path, + subcommand: str, + *, + overrides: Dict[str, Any] = SimpleFrozenDict(), + force: bool = False, + dry: bool = False, + capture: bool = False, + skip_requirements_check: bool = False, + parent_command: str = COMMAND, +) -> None: + """Run a named script defined in the project.yml. If the script is part + of the default pipeline (defined in the "run" section), DVC is used to + execute the command, so it can determine whether to rerun it. It then + calls into "exec" to execute it. + + project_dir (Path): Path to project directory. + subcommand (str): Name of command to run. + overrides (Dict[str, Any]): Optional config overrides. + force (bool): Force re-running, even if nothing changed. + dry (bool): Perform a dry run and don't execute commands. + capture (bool): Whether to capture the output and errors of individual commands. + If False, the stdout and stderr will not be redirected, and if there's an error, + sys.exit will be called with the return code. You should use capture=False + when you want to turn over execution to the command, and capture=True + when you want to run the command more like a function. + skip_requirements_check (bool): No longer used, deprecated. + """ + config = load_project_config(project_dir, overrides=overrides) + commands = {cmd["name"]: cmd for cmd in config.get("commands", [])} + workflows = config.get("workflows", {}) + validate_subcommand(list(commands.keys()), list(workflows.keys()), subcommand) + + if subcommand in workflows: + msg.info(f"Running workflow '{subcommand}'") + for cmd in workflows[subcommand]: + project_run( + project_dir, + cmd, + overrides=overrides, + force=force, + dry=dry, + capture=capture, + ) + else: + cmd = commands[subcommand] + for dep in cmd.get("deps", []): + if not (project_dir / dep).exists(): + err = f"Missing dependency specified by command '{subcommand}': {dep}" + err_help = "Maybe you forgot to run the 'weasel assets' command or a previous step?" + err_exits = 1 if not dry else None + msg.fail(err, err_help, exits=err_exits) + check_spacy_env_vars() + with working_dir(project_dir) as current_dir: + msg.divider(subcommand) + rerun = check_rerun(current_dir, cmd) + if not rerun and not force: + msg.info(f"Skipping '{cmd['name']}': nothing changed") + else: + run_commands(cmd["script"], dry=dry, capture=capture) + if not dry: + update_lockfile(current_dir, cmd) + + +def print_run_help( + project_dir: Path, subcommand: Optional[str] = None, parent_command: str = COMMAND +) -> None: + """Simulate a CLI help prompt using the info available in the project.yml. + + project_dir (Path): The project directory. + subcommand (Optional[str]): The subcommand or None. If a subcommand is + provided, the subcommand help is shown. Otherwise, the top-level help + and a list of available commands is printed. + """ + config = load_project_config(project_dir) + config_commands = config.get("commands", []) + commands = {cmd["name"]: cmd for cmd in config_commands} + workflows = config.get("workflows", {}) + project_loc = "" if is_cwd(project_dir) else project_dir + if subcommand: + validate_subcommand(list(commands.keys()), list(workflows.keys()), subcommand) + print(f"Usage: {parent_command} run {subcommand} {project_loc}") + if subcommand in commands: + help_text = commands[subcommand].get("help") + if help_text: + print(f"\n{help_text}\n") + elif subcommand in workflows: + steps = workflows[subcommand] + print(f"\nWorkflow consisting of {len(steps)} commands:") + steps_data = [ + (f"{i + 1}. {step}", commands[step].get("help", "")) + for i, step in enumerate(steps) + ] + msg.table(steps_data) + help_cmd = f"{parent_command} run [COMMAND] {project_loc} --help" + print(f"For command details, run: {help_cmd}") + else: + print("") + title = config.get("title") + if title: + print(f"{locale_escape(title)}\n") + if config_commands: + print(f"Available commands in {PROJECT_FILE}") + print(f"Usage: {parent_command} run [COMMAND] {project_loc}") + msg.table([(cmd["name"], cmd.get("help", "")) for cmd in config_commands]) + if workflows: + print(f"Available workflows in {PROJECT_FILE}") + print(f"Usage: {parent_command} run [WORKFLOW] {project_loc}") + msg.table([(name, " -> ".join(steps)) for name, steps in workflows.items()]) + + +def run_commands( + commands: Iterable[str] = SimpleFrozenList(), + silent: bool = False, + dry: bool = False, + capture: bool = False, +) -> None: + """Run a sequence of commands in a subprocess, in order. + + commands (List[str]): The string commands. + silent (bool): Don't print the commands. + dry (bool): Perform a dry run and don't execut anything. + capture (bool): Whether to capture the output and errors of individual commands. + If False, the stdout and stderr will not be redirected, and if there's an error, + sys.exit will be called with the return code. You should use capture=False + when you want to turn over execution to the command, and capture=True + when you want to run the command more like a function. + """ + for c in commands: + command = split_command(c) + # Not sure if this is needed or a good idea. Motivation: users may often + # use commands in their config that reference "python" and we want to + # make sure that it's always executing the same Python that Weasel is + # executed with and the pip in the same env, not some other Python/pip. + # Also ensures cross-compatibility if user 1 writes "python3" (because + # that's how it's set up on their system), and user 2 without the + # shortcut tries to re-run the command. + if len(command) and command[0] in ("python", "python3"): + command[0] = sys.executable + elif len(command) and command[0] in ("pip", "pip3"): + command = [sys.executable, "-m", "pip", *command[1:]] + if not silent: + print(f"Running command: {join_command(command)}") + if not dry: + run_command(command, capture=capture) + + +def validate_subcommand( + commands: Sequence[str], workflows: Sequence[str], subcommand: str +) -> None: + """Check that a subcommand is valid and defined. Raises an error otherwise. + + commands (Sequence[str]): The available commands. + subcommand (str): The subcommand. + """ + if not commands and not workflows: + msg.fail(f"No commands or workflows defined in {PROJECT_FILE}", exits=1) + if subcommand not in commands and subcommand not in workflows: + help_msg = [] + if subcommand in ["assets", "asset"]: + help_msg.append("Did you mean to run: python -m weasel assets?") + if commands: + help_msg.append(f"Available commands: {', '.join(commands)}") + if workflows: + help_msg.append(f"Available workflows: {', '.join(workflows)}") + msg.fail( + f"Can't find command or workflow '{subcommand}' in {PROJECT_FILE}", + ". ".join(help_msg), + exits=1, + ) + + +def check_rerun( + project_dir: Path, + command: Dict[str, Any], +) -> bool: + """Check if a command should be rerun because its settings or inputs/outputs + changed. + + project_dir (Path): The current project directory. + command (Dict[str, Any]): The command, as defined in the project.yml. + strict_version (bool): + RETURNS (bool): Whether to re-run the command. + """ + # Always rerun if no-skip is set + if command.get("no_skip", False): + return True + lock_path = project_dir / PROJECT_LOCK + if not lock_path.exists(): # We don't have a lockfile, run command + return True + data = srsly.read_yaml(lock_path) + if command["name"] not in data: # We don't have info about this command + return True + entry = data[command["name"]] + # Always run commands with no outputs (otherwise they'd always be skipped) + if not entry.get("outs", []): + return True + # If the entry in the lockfile matches the lockfile entry that would be + # generated from the current command, we don't rerun because it means that + # all inputs/outputs, hashes and scripts are the same and nothing changed + lock_entry = get_lock_entry(project_dir, command) + return get_hash(lock_entry) != get_hash(entry) + + +def update_lockfile(project_dir: Path, command: Dict[str, Any]) -> None: + """Update the lockfile after running a command. Will create a lockfile if + it doesn't yet exist and will add an entry for the current command, its + script and dependencies/outputs. + + project_dir (Path): The current project directory. + command (Dict[str, Any]): The command, as defined in the project.yml. + """ + lock_path = project_dir / PROJECT_LOCK + if not lock_path.exists(): + srsly.write_yaml(lock_path, {}) + data = {} + else: + data = srsly.read_yaml(lock_path) + data[command["name"]] = get_lock_entry(project_dir, command) + srsly.write_yaml(lock_path, data) + + +def get_lock_entry( + project_dir: Path, command: Dict[str, Any], *, parent_command: str = COMMAND +) -> Dict[str, Any]: + """Get a lockfile entry for a given command. An entry includes the command, + the script (command steps) and a list of dependencies and outputs with + their paths and file hashes, if available. The format is based on the + dvc.lock files, to keep things consistent. + + project_dir (Path): The current project directory. + command (Dict[str, Any]): The command, as defined in the project.yml. + RETURNS (Dict[str, Any]): The lockfile entry. + """ + deps = get_fileinfo(project_dir, command.get("deps", [])) + outs = get_fileinfo(project_dir, command.get("outputs", [])) + outs_nc = get_fileinfo(project_dir, command.get("outputs_no_cache", [])) + return { + "cmd": f"{parent_command} run {command['name']}", + "script": command["script"], + "deps": deps, + "outs": [*outs, *outs_nc], + } + + +def get_fileinfo(project_dir: Path, paths: List[str]) -> List[Dict[str, Optional[str]]]: + """Generate the file information for a list of paths (dependencies, outputs). + Includes the file path and the file's checksum. + + project_dir (Path): The current project directory. + paths (List[str]): The file paths. + RETURNS (List[Dict[str, str]]): The lockfile entry for a file. + """ + data = [] + for path in paths: + file_path = project_dir / path + md5 = get_checksum(file_path) if file_path.exists() else None + data.append({"path": path, "md5": md5}) + return data diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..001f898975aa8cce47d080dc858f35b91a5f30df Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/test_schemas.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/test_schemas.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a8a66533843efdd5f57ee416770491864ff5acc0 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/test_schemas.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/test_validation.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/test_validation.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8e9513ead2ae8b6d961d745aed5297834c5ad7bd Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/test_validation.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/util.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/util.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..db6baf1c848daa9809e9500c46d51d8c3902320a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/__pycache__/util.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dfd333b7a52c63be93b7e22f036b78ab6d132c80 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_cli.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_cli.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..27a040cefe9ae1c799c9232cd535021206596762 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_cli.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_cli_app.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_cli_app.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b1a64e05b7bdbe066751d6d6ae9e78538933e19 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_cli_app.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_document.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_document.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..49a5621d300c5140d9c53a7c3514918907211785 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_document.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_remote.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_remote.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1b4f5a9134b894b7926be7ee43cbe58e13a6a591 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/__pycache__/test_remote.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_cli.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_cli.py new file mode 100644 index 0000000000000000000000000000000000000000..666649062c58f1de23227670e558ad3e73d6b4c6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_cli.py @@ -0,0 +1,193 @@ +import os +import time +from pathlib import Path + +import pytest +import srsly + +from weasel.cli.remote_storage import RemoteStorage +from weasel.schemas import ProjectConfigSchema, validate +from weasel.util import git_checkout, is_subpath_of, load_project_config, make_tempdir +from weasel.util import validate_project_commands + + +def test_issue11235(): + """ + Test that the cli handles interpolation in the directory names correctly when loading project config. + """ + lang_var = "en" + variables = {"lang": lang_var} + commands = [{"name": "x", "script": ["hello ${vars.lang}"]}] + directories = ["cfg", "${vars.lang}_model"] + project = {"commands": commands, "vars": variables, "directories": directories} + with make_tempdir() as d: + srsly.write_yaml(d / "project.yml", project) + cfg = load_project_config(d) + # Check that the directories are interpolated and created correctly + assert os.path.exists(d / "cfg") + assert os.path.exists(d / f"{lang_var}_model") + assert cfg["commands"][0]["script"][0] == f"hello {lang_var}" + + +def test_project_config_validation_full(): + config = { + "vars": {"some_var": 20}, + "directories": ["assets", "configs", "corpus", "scripts", "training"], + "assets": [ + { + "dest": "x", + "extra": True, + "url": "https://example.com", + "checksum": "63373dd656daa1fd3043ce166a59474c", + }, + { + "dest": "y", + "git": { + "repo": "https://github.com/example/repo", + "branch": "develop", + "path": "y", + }, + }, + { + "dest": "z", + "extra": False, + "url": "https://example.com", + "checksum": "63373dd656daa1fd3043ce166a59474c", + }, + ], + "commands": [ + { + "name": "train", + "help": "Train a model", + "script": ["python -m spacy train config.cfg -o training"], + "deps": ["config.cfg", "corpus/training.spcy"], + "outputs": ["training/model-best"], + }, + {"name": "test", "script": ["pytest", "custom.py"], "no_skip": True}, + ], + "workflows": {"all": ["train", "test"], "train": ["train"]}, + } + errors = validate(ProjectConfigSchema, config) + assert not errors + + +@pytest.mark.parametrize( + "config", + [ + {"commands": [{"name": "a"}, {"name": "a"}]}, + {"commands": [{"name": "a"}], "workflows": {"a": []}}, + {"commands": [{"name": "a"}], "workflows": {"b": ["c"]}}, + ], +) +def test_project_config_validation1(config): + with pytest.raises(SystemExit): + validate_project_commands(config) + + +@pytest.mark.parametrize( + "config,n_errors", + [ + ({"commands": {"a": []}}, 1), + ({"commands": [{"help": "..."}]}, 1), + ({"commands": [{"name": "a", "extra": "b"}]}, 1), + ({"commands": [{"extra": "b"}]}, 2), + ({"commands": [{"name": "a", "deps": [123]}]}, 1), + ], +) +def test_project_config_validation2(config, n_errors): + errors = validate(ProjectConfigSchema, config) + assert len(errors) == n_errors + + +@pytest.mark.parametrize( + "parent,child,expected", + [ + ("/tmp", "/tmp", True), + ("/tmp", "/", False), + ("/tmp", "/tmp/subdir", True), + ("/tmp", "/tmpdir", False), + ("/tmp", "/tmp/subdir/..", True), + ("/tmp", "/tmp/..", False), + ], +) +def test_is_subpath_of(parent, child, expected): + assert is_subpath_of(parent, child) == expected + + +def test_local_remote_storage(): + with make_tempdir() as d: + filename = Path("a.txt") + + content_hashes = ("aaaa", "cccc", "bbbb") + for i, content_hash in enumerate(content_hashes): + # make sure that each subsequent file has a later timestamp + if i > 0: + time.sleep(1) + content = f"{content_hash} content" + loc_file = d / "root" / filename + if not loc_file.parent.exists(): + loc_file.parent.mkdir(parents=True) + with loc_file.open(mode="w") as file_: + file_.write(content) + + # push first version to remote storage + remote = RemoteStorage(d / "root", str(d / "remote")) + remote.push(filename, "aaaa", content_hash) + + # retrieve with full hashes + loc_file.unlink() + remote.pull(filename, command_hash="aaaa", content_hash=content_hash) + with loc_file.open(mode="r") as file_: + assert file_.read() == content + + # retrieve with command hash + loc_file.unlink() + remote.pull(filename, command_hash="aaaa") + with loc_file.open(mode="r") as file_: + assert file_.read() == content + + # retrieve with content hash + loc_file.unlink() + remote.pull(filename, content_hash=content_hash) + with loc_file.open(mode="r") as file_: + assert file_.read() == content + + # retrieve with no hashes + loc_file.unlink() + remote.pull(filename) + with loc_file.open(mode="r") as file_: + assert file_.read() == content + + +def test_local_remote_storage_pull_missing(): + # pulling from a non-existent remote pulls nothing gracefully + with make_tempdir() as d: + filename = Path("a.txt") + remote = RemoteStorage(d / "root", str(d / "remote")) + assert remote.pull(filename, command_hash="aaaa") is None + assert remote.pull(filename) is None + + +def test_project_git_dir_asset(): + with make_tempdir() as d: + # Use a very small repo. + git_checkout( + "https://github.com/explosion/os-signpost.git", + "os_signpost", + d / "signpost", + branch="v0.0.3", + ) + assert os.path.isdir(d / "signpost") + + +@pytest.mark.issue(66) +def test_project_git_file_asset(): + with make_tempdir() as d: + # Use a very small repo. + git_checkout( + "https://github.com/explosion/os-signpost.git", + "README.md", + d / "readme.md", + branch="v0.0.3", + ) + assert os.path.isfile(d / "readme.md") diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_cli_app.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_cli_app.py new file mode 100644 index 0000000000000000000000000000000000000000..bd983e237236a0898b25bcb0c1846ef922949c88 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_cli_app.py @@ -0,0 +1,191 @@ +from pathlib import Path +from typing import Any, Dict + +import pytest +import srsly +from typer.testing import CliRunner + +from weasel import app +from weasel.cli.main import HELP +from weasel.util import get_git_version + +runner = CliRunner() + + +@pytest.mark.parametrize("cmd", ["--help"]) +def test_show_help(cmd): + """Basic test to confirm help text appears""" + # This test used to exercise the no-args help as well but + # it no longer seems to work in typer-slim. Maybe I'm doing it wrong? + result = runner.invoke(app, [cmd]) + for line in HELP.splitlines(): + assert line in result.stdout + + +def has_git(): + try: + get_git_version() + return True + except RuntimeError: + return False + + +SAMPLE_PROJECT: Dict[str, Any] = { + "title": "Sample project", + "description": "This is a project for testing", + "assets": [ + { + "dest": "assets/weasel-readme.md", + "url": "https://github.com/explosion/weasel/raw/9a3632862b47069d2f9033b773e814d4c4e09c83/README.md", + "checksum": "65f4c426a9b153b7683738c92d0d20f9", + }, + { + "dest": "assets/pyproject.toml", + "url": "https://github.com/explosion/weasel/raw/9a3632862b47069d2f9033b773e814d4c4e09c83/pyproject.toml", + "checksum": "1e2da3a3030d6611520952d5322cd94e", + "extra": True, + }, + ], + "commands": [ + { + "name": "ok", + "help": "print ok", + "script": ["python -c \"print('okokok')\""], + }, + { + "name": "create", + "help": "make a file", + "script": ["touch abc.txt"], + "outputs": ["abc.txt"], + }, + { + "name": "clean", + "help": "remove test file", + "script": ["rm abc.txt"], + }, + ], +} + +SAMPLE_PROJECT_TEXT = srsly.yaml_dumps(SAMPLE_PROJECT) + + +@pytest.fixture +def project_dir(tmp_path: Path): + path = tmp_path / "project" + path.mkdir() + (path / "project.yml").write_text(SAMPLE_PROJECT_TEXT) + yield path + + +def test_project_document(project_dir: Path): + readme_path = project_dir / "README.md" + assert not readme_path.exists(), "README already exists" + result = CliRunner().invoke( + app, ["document", str(project_dir), "-o", str(readme_path)] + ) + assert result.exit_code == 0 + assert readme_path.is_file() + text = readme_path.read_text("utf-8") + assert SAMPLE_PROJECT["description"] in text + + +def test_project_assets(project_dir: Path): + asset_dir = project_dir / "assets" + assert not asset_dir.exists(), "Assets dir is already present" + result = CliRunner().invoke(app, ["assets", str(project_dir)]) + assert result.exit_code == 0 + assert (asset_dir / "weasel-readme.md").is_file(), "Assets not downloaded" + # check that extras work + result = CliRunner().invoke(app, ["assets", "--extra", str(project_dir)]) + assert result.exit_code == 0 + assert (asset_dir / "pyproject.toml").is_file(), "Extras not downloaded" + + +def test_project_run(project_dir: Path): + # make sure dry run works + test_file = project_dir / "abc.txt" + result = CliRunner().invoke(app, ["run", "--dry", "create", str(project_dir)]) + assert result.exit_code == 0 + assert not test_file.is_file() + result = CliRunner().invoke(app, ["run", "create", str(project_dir)]) + assert result.exit_code == 0 + assert test_file.is_file() + result = CliRunner().invoke(app, ["run", "ok", str(project_dir)]) + assert result.exit_code == 0 + assert "okokok" in result.stdout + + +def test_check_spacy_env_vars(project_dir: Path, monkeypatch: pytest.MonkeyPatch): + # make sure dry run works + project_dir / "abc.txt" + + result = CliRunner().invoke(app, ["run", "--dry", "create", str(project_dir)]) + assert result.exit_code == 0 + assert ( + "You've set a `SPACY_CONFIG_OVERRIDES` environment variable" + not in result.output + ) + assert ( + "You've set a `SPACY_PROJECT_USE_GIT_VERSION` environment variable" + not in result.output + ) + + monkeypatch.setenv("SPACY_CONFIG_OVERRIDES", "test") + monkeypatch.setenv("SPACY_PROJECT_USE_GIT_VERSION", "false") + + result = CliRunner().invoke(app, ["run", "--dry", "create", str(project_dir)]) + assert result.exit_code == 0 + + assert "You've set a `SPACY_CONFIG_OVERRIDES` environment variable" in result.output + assert ( + "You've set a `SPACY_PROJECT_USE_GIT_VERSION` environment variable" + in result.output + ) + + +@pytest.mark.skipif(not has_git(), reason="git not installed") +@pytest.mark.parametrize( + "options_string", + [ + "", + # "--sparse", + "--branch v3", + "--repo https://github.com/explosion/projects --branch v3", + ], +) +def test_project_clone(tmp_path: Path, options_string: str): + out = tmp_path / "project_clone" + target = "benchmarks/ner_conll03" + if not options_string: + options = [] + else: + options = options_string.split() + result = CliRunner().invoke(app, ["clone", target, *options, str(out)]) + assert result.exit_code == 0 + assert "weasel assets" in result.output + assert (out / "README.md").is_file() + + +def test_project_push_pull(tmp_path: Path, project_dir: Path): + proj = dict(SAMPLE_PROJECT) + remote = "xyz" + + remote_dir = tmp_path / "remote" + remote_dir.mkdir() + + proj["remotes"] = {remote: str(remote_dir)} + proj_text = srsly.yaml_dumps(proj) + (project_dir / "project.yml").write_text(proj_text) + + test_file = project_dir / "abc.txt" + result = CliRunner().invoke(app, ["run", "create", str(project_dir)]) + assert result.exit_code == 0 + assert test_file.is_file() + result = CliRunner().invoke(app, ["push", remote, str(project_dir)]) + assert result.exit_code == 0 + result = CliRunner().invoke(app, ["run", "clean", str(project_dir)]) + assert result.exit_code == 0 + assert not test_file.exists() + result = CliRunner().invoke(app, ["pull", remote, str(project_dir)]) + assert result.exit_code == 0 + assert test_file.is_file() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_document.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_document.py new file mode 100644 index 0000000000000000000000000000000000000000..696cbd432e86adfda1dc8836705a63715dbce4b6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_document.py @@ -0,0 +1,105 @@ +from pathlib import Path +from typing import Any, Dict + +import pytest +import srsly +from typer.testing import CliRunner + +from weasel import app +from weasel.cli.document import MARKER_END, MARKER_IGNORE, MARKER_START, MARKER_TAGS + +runner = CliRunner() + +SAMPLE_PROJECT: Dict[str, Any] = { + "title": "Sample project", + "description": "This is a project for testing", + "assets": [ + { + "dest": "assets/weasel-readme.md", + "url": "https://github.com/explosion/weasel/raw/9a3632862b47069d2f9033b773e814d4c4e09c83/README.md", + "checksum": "65f4c426a9b153b7683738c92d0d20f9", + }, + { + "dest": "assets/pyproject.toml", + "url": "https://github.com/explosion/weasel/raw/9a3632862b47069d2f9033b773e814d4c4e09c83/pyproject.toml", + "checksum": "1e2da3a3030d6611520952d5322cd94e", + "extra": True, + }, + ], + "commands": [ + { + "name": "ok", + "help": "print ok", + "script": ["python -c \"print('okokok')\""], + }, + { + "name": "create", + "help": "make a file", + "script": ["touch abc.txt"], + "outputs": ["abc.txt"], + }, + { + "name": "clean", + "help": "remove test file", + "script": ["rm abc.txt"], + }, + ], +} + + +@pytest.fixture(scope="function") +def project_yaml_file( + tmp_path_factory: pytest.TempPathFactory, +): + test_dir = tmp_path_factory.mktemp("project") + path = test_dir / "project.yml" + path.write_text(srsly.yaml_dumps(SAMPLE_PROJECT)) + return path + + +def test_create_docs(project_yaml_file: Path): + result = runner.invoke(app, ["document", str(project_yaml_file.parent)]) + conf_data = srsly.read_yaml(project_yaml_file) + assert result.exit_code == 0 + assert conf_data["title"] in result.stdout + + +def test_raise_error_no_config(): + result = runner.invoke(app, ["document"]) + assert result.exit_code == 1 + + +@pytest.mark.parametrize("marker", MARKER_TAGS) +def test_markers(tmp_path_factory: pytest.TempPathFactory, marker: str): + """Weasel should be able to handle both 'SPACY PROJECT' and 'WEASEL' markers.""" + project: Dict[str, Any] = { + "title": "Awesome project", + "description": "Project using spacy projects and gets migrated to weasel.", + } + additional_text = ( + "\n\n## Some additional information\n\nHere is some additional information about this project " + "that is not autogenerated from the [`project.yml`](project.yml)." + ) + + # Create project file. + test_dir = tmp_path_factory.mktemp("project") + path = test_dir / "project.yml" + path.write_text(srsly.yaml_dumps(project)) + + # Store readme with additional information. + # runner.invoke(app, ["document", str(path.parent), "--output", test_dir / "readme.md"]) + with open(test_dir / "readme.md", "w+", encoding="utf-8") as file: + readme = runner.invoke(app, ["document", str(path.parent)]).output + for to_replace in (MARKER_START, MARKER_END, MARKER_IGNORE): + readme = readme.replace( + to_replace.format(tag="WEASEL"), to_replace.format(tag=marker) + ) + file.writelines(readme) + file.writelines(additional_text) + + # Run `document` again on existing readme file. Ensure additional information is still there. + runner.invoke( + app, ["document", str(path.parent), "--output", str(test_dir / "readme.md")] + ) + with open(test_dir / "readme.md", "r", encoding="utf-8") as file: + assert additional_text in "".join(file.readlines()) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_remote.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_remote.py new file mode 100644 index 0000000000000000000000000000000000000000..b351b9069d2f349bcc831815d4e842ac24cd7a2d --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/cli/test_remote.py @@ -0,0 +1,79 @@ +from pathlib import Path + +import pytest +from typer.testing import CliRunner + +from weasel import app + +from .test_cli_app import has_git + +runner = CliRunner() + + +@pytest.fixture +def project_dir(tmp_path_factory: pytest.TempPathFactory): + # a working directory for the session + base = tmp_path_factory.mktemp("project") + return base / "project" + + +@pytest.fixture +def remote_url(tmp_path_factory: pytest.TempPathFactory): + # a "remote" for testing + base = tmp_path_factory.mktemp("remote") + return base / "remote" + + +@pytest.fixture +def clone(project_dir: Path): + """Cloning shouldn't fail""" + repo = "https://github.com/explosion/weasel" + branch = "main" + result = runner.invoke( + app, + [ + "clone", + "--repo", + repo, + "--branch", + branch, + "weasel/tests/demo_project", + str(project_dir), + ], + ) + + assert result.exit_code == 0 + assert (project_dir / "project.yml").exists() + + +@pytest.fixture(autouse=True) +def assets(clone, project_dir: Path): + result = runner.invoke(app, ["assets", str(project_dir)]) + + print(result.stdout) + assert result.exit_code == 0 + assert (project_dir / "assets/README.md").exists() + + +@pytest.mark.skipif(not has_git(), reason="git not installed") +def test_remote(project_dir: Path, remote_url: Path): + result = runner.invoke(app, ["assets", str(project_dir)]) + assert result.exit_code == 0 + assert (project_dir / "assets/README.md").exists() + + result = runner.invoke(app, ["run", "prep", str(project_dir)]) + assert result.exit_code == 0 + + # append remote to the file + with open(project_dir / "project.yml", "a") as project_file: + project_file.write(f"\nremotes:\n default: {remote_url}\n") + + result = runner.invoke(app, ["push", "default", str(project_dir)]) + assert result.exit_code == 0 + + # delete a file, and make sure pull restores it + (project_dir / "corpus/stuff.txt").unlink() + + result = runner.invoke(app, ["pull", "default", str(project_dir)]) + assert result.exit_code == 0 + assert (project_dir / "corpus/stuff.txt").exists() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/test_schemas.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/test_schemas.py new file mode 100644 index 0000000000000000000000000000000000000000..61fa23d3f6a2ac86c08b57548838ee80e3cbc092 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/test_schemas.py @@ -0,0 +1,34 @@ +from pathlib import Path + +import pytest +import srsly +from typer.testing import CliRunner + +from weasel import app + +EXAMPLES = [ + (dict(title="Test"), False), + (dict(title="Test", spacy_version=""), True), + (dict(title="Test", spacy_version="3.4.1"), True), +] + + +@pytest.fixture +def project_dir(tmp_path: Path): + path = tmp_path / "project" + path.mkdir() + yield path + + +@pytest.mark.parametrize("conf,should_warn", EXAMPLES) +def test_project_document(project_dir: Path, conf, should_warn): + config = srsly.yaml_dumps(conf) + + (project_dir / "project.yml").write_text(config) + + result = CliRunner().invoke(app, ["document", str(project_dir)]) + assert result.exit_code == 0 + assert ( + "Your project configuration file includes a `spacy_version` key, " + in result.output + ) is should_warn diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/test_validation.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/test_validation.py new file mode 100644 index 0000000000000000000000000000000000000000..f23ca97ad2e5c1b033eb449917aa5e951e402e9b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/test_validation.py @@ -0,0 +1,156 @@ +import pytest +import srsly +from confection import ConfigValidationError + +from weasel.schemas import ProjectConfigSchema, validate +from weasel.util import is_subpath_of, load_project_config, make_tempdir +from weasel.util import substitute_project_variables, validate_project_commands + + +@pytest.mark.parametrize( + "parent,child,expected", + [ + ("/tmp", "/tmp", True), + ("/tmp", "/", False), + ("/tmp", "/tmp/subdir", True), + ("/tmp", "/tmpdir", False), + ("/tmp", "/tmp/subdir/..", True), + ("/tmp", "/tmp/..", False), + ], +) +def test_is_subpath_of(parent, child, expected): + assert is_subpath_of(parent, child) == expected + + +def test_project_config_validation_full(): + config = { + "vars": {"some_var": 20}, + "directories": ["assets", "configs", "corpus", "scripts", "training"], + "assets": [ + { + "dest": "x", + "extra": True, + "url": "https://example.com", + "checksum": "63373dd656daa1fd3043ce166a59474c", + }, + { + "dest": "y", + "git": { + "repo": "https://github.com/example/repo", + "branch": "develop", + "path": "y", + }, + }, + { + "dest": "z", + "extra": False, + "url": "https://example.com", + "checksum": "63373dd656daa1fd3043ce166a59474c", + }, + ], + "commands": [ + { + "name": "train", + "help": "Train a model", + "script": ["python -m spacy train config.cfg -o training"], + "deps": ["config.cfg", "corpus/training.spcy"], + "outputs": ["training/model-best"], + }, + {"name": "test", "script": ["pytest", "custom.py"], "no_skip": True}, + ], + "workflows": {"all": ["train", "test"], "train": ["train"]}, + } + errors = validate(ProjectConfigSchema, config) + assert not errors + + +@pytest.mark.parametrize( + "config", + [ + {"commands": [{"name": "a"}, {"name": "a"}]}, + {"commands": [{"name": "a"}], "workflows": {"a": []}}, + {"commands": [{"name": "a"}], "workflows": {"b": ["c"]}}, + ], +) +def test_project_config_validation1(config): + with pytest.raises(SystemExit): + validate_project_commands(config) + + +@pytest.mark.parametrize( + "config,n_errors", + [ + ({"commands": {"a": []}}, 1), + ({"commands": [{"help": "..."}]}, 1), + ({"commands": [{"name": "a", "extra": "b"}]}, 1), + ({"commands": [{"extra": "b"}]}, 2), + ({"commands": [{"name": "a", "deps": [123]}]}, 1), + ], +) +def test_project_config_validation2(config, n_errors): + errors = validate(ProjectConfigSchema, config) + assert len(errors) == n_errors + + +@pytest.mark.parametrize( + "int_value", + [10, pytest.param("10", marks=pytest.mark.xfail)], +) +def test_project_config_interpolation(int_value): + variables = {"a": int_value, "b": {"c": "foo", "d": True}} + commands = [ + {"name": "x", "script": ["hello ${vars.a} ${vars.b.c}"]}, + {"name": "y", "script": ["${vars.b.c} ${vars.b.d}"]}, + ] + project = {"commands": commands, "vars": variables} + with make_tempdir() as d: + srsly.write_yaml(d / "project.yml", project) + cfg = load_project_config(d) + assert type(cfg) == dict + assert type(cfg["commands"]) == list + assert cfg["commands"][0]["script"][0] == "hello 10 foo" + assert cfg["commands"][1]["script"][0] == "foo true" + commands = [{"name": "x", "script": ["hello ${vars.a} ${vars.b.e}"]}] + project = {"commands": commands, "vars": variables} + with pytest.raises(ConfigValidationError): + substitute_project_variables(project) + + +@pytest.mark.parametrize( + "greeting", + [342, "everyone", "tout le monde", pytest.param("42", marks=pytest.mark.xfail)], +) +def test_project_config_interpolation_override(greeting): + variables = {"a": "world"} + commands = [ + {"name": "x", "script": ["hello ${vars.a}"]}, + ] + overrides = {"vars.a": greeting} + project = {"commands": commands, "vars": variables} + with make_tempdir() as d: + srsly.write_yaml(d / "project.yml", project) + cfg = load_project_config(d, overrides=overrides) + assert type(cfg) == dict + assert type(cfg["commands"]) == list + assert cfg["commands"][0]["script"][0] == f"hello {greeting}" + + +def test_project_config_interpolation_env(monkeypatch: pytest.MonkeyPatch): + variables = {"a": 10} + env_var = "SPACY_TEST_FOO" + + env_vars = {"foo": env_var} + commands = [{"name": "x", "script": ["hello ${vars.a} ${env.foo}"]}] + project = {"commands": commands, "vars": variables, "env": env_vars} + + with make_tempdir() as d: + srsly.write_yaml(d / "project.yml", project) + cfg = load_project_config(d) + assert cfg["commands"][0]["script"][0] == "hello 10 " + + monkeypatch.setenv(env_var, "123") + + with make_tempdir() as d: + srsly.write_yaml(d / "project.yml", project) + cfg = load_project_config(d) + assert cfg["commands"][0]["script"][0] == "hello 10 123" diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/util.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/util.py new file mode 100644 index 0000000000000000000000000000000000000000..9d56b9de7f9e940e264e1015ce33bc3cc2d8429b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/tests/util.py @@ -0,0 +1,26 @@ +import contextlib +import re +import tempfile + +import srsly + + +@contextlib.contextmanager +def make_tempfile(mode="r"): + f = tempfile.TemporaryFile(mode=mode) + yield f + f.close() + + +def assert_packed_msg_equal(b1, b2): + """Assert that two packed msgpack messages are equal.""" + msg1 = srsly.msgpack_loads(b1) + msg2 = srsly.msgpack_loads(b2) + assert sorted(msg1.keys()) == sorted(msg2.keys()) + for (k1, v1), (k2, v2) in zip(sorted(msg1.items()), sorted(msg2.items())): + assert k1 == k2 + assert v1 == v2 + + +def normalize_whitespace(s): + return re.sub(r"\s+", " ", s) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__init__.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5b01ad8d632ab52d56e990adb3419c2864c11ab6 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__init__.py @@ -0,0 +1,15 @@ +from .commands import join_command, run_command, split_command +from .config import load_project_config, parse_config_overrides +from .config import substitute_project_variables +from .environment import ENV_VARS, check_bool_env_var, check_spacy_env_vars +from .filesystem import ensure_path, ensure_pathy, is_cwd, is_subpath_of, make_tempdir +from .filesystem import working_dir +from .frozen import SimpleFrozenDict, SimpleFrozenList +from .git import _http_to_git, get_git_version, git_checkout, git_repo_branch_exists +from .git import git_sparse_checkout +from .hashing import get_checksum, get_hash +from .logging import logger +from .modules import import_file +from .remote import download_file, upload_file +from .validation import validate_project_commands +from .versions import get_minor_version, is_compatible_version, is_minor_version_match diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..063f02d36f02093b834f039b7d5dd3d64bc316ba Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/commands.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/commands.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..179b631d6712d678e37014640879302da7a6c7f1 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/commands.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/config.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/config.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..88c918e422ff82317604d4a1dc4a81e7bb31f7e0 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/config.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/environment.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/environment.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3ece292be00a8c58c775ac6ba18ca86814e6586c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/environment.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/filesystem.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/filesystem.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..40cd5ef53f8b087525d45de26d176290acfdda8f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/filesystem.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/frozen.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/frozen.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..830866ebbf8396b2b1f2a6eeb6504441a6af99c9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/frozen.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/git.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/git.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b59b92622538d1508d6d46d86bd8fe8f2b79a510 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/git.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/hashing.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/hashing.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ffe979d80af1817609f7a030905ddc088bf442b3 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/hashing.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/logging.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/logging.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..613c0d5b96baa2c26c8d3fda5f8b3ae36cff92b0 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/logging.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/modules.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/modules.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4fb7d970bb79617ca6f084fa4a35631de09737fd Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/modules.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/remote.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/remote.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..95b59e33439746822f7cb3a010e13c9a397f85d6 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/remote.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/validation.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/validation.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..39ee68833f21afdbcd46bbf7ed5f08749c002180 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/validation.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/versions.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/versions.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4a5ce779affda8f8a79ef032b3904b1200b6e05f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/__pycache__/versions.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/commands.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/commands.py new file mode 100644 index 0000000000000000000000000000000000000000..73696173b9a566bea65235d8ff635186f3c37a2a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/commands.py @@ -0,0 +1,83 @@ +import os +import shlex +import subprocess +import sys +from typing import Any, List, Optional, Union + +from ..compat import is_windows +from ..errors import Errors + + +def split_command(command: str) -> List[str]: + """Split a string command using shlex. Handles platform compatibility. + + command (str) : The command to split + RETURNS (List[str]): The split command. + """ + return shlex.split(command, posix=not is_windows) + + +def join_command(command: List[str]) -> str: + """Join a command using shlex. shlex.join is only available for Python 3.8+, + so we're using a workaround here. + + command (List[str]): The command to join. + RETURNS (str): The joined command + """ + return " ".join(shlex.quote(cmd) for cmd in command) + + +def run_command( + command: Union[str, List[str]], + *, + stdin: Optional[Any] = None, + capture: bool = False, +) -> subprocess.CompletedProcess: + """Run a command on the command line as a subprocess. If the subprocess + returns a non-zero exit code, a system exit is performed. + + command (str / List[str]): The command. If provided as a string, the + string will be split using shlex.split. + stdin (Optional[Any]): stdin to read from or None. + capture (bool): Whether to capture the output and errors. If False, + the stdout and stderr will not be redirected, and if there's an error, + sys.exit will be called with the return code. You should use capture=False + when you want to turn over execution to the command, and capture=True + when you want to run the command more like a function. + RETURNS (Optional[CompletedProcess]): The process object. + """ + if isinstance(command, str): + cmd_list = split_command(command) + cmd_str = command + else: + cmd_list = command + cmd_str = " ".join(command) + try: + ret = subprocess.run( + cmd_list, + env=os.environ.copy(), + input=stdin, + encoding="utf8", + check=False, + stdout=subprocess.PIPE if capture else None, + stderr=subprocess.STDOUT if capture else None, + ) + except FileNotFoundError: + # Indicates the *command* wasn't found, it's an error before the command + # is run. + raise FileNotFoundError( + Errors.E501.format(str_command=cmd_str, tool=cmd_list[0]) + ) from None + if ret.returncode != 0 and capture: + message = f"Error running command:\n\n{cmd_str}\n\n" + message += f"Subprocess exited with status {ret.returncode}" + if ret.stdout is not None: + message += "\n\nProcess log (stdout and stderr):\n\n" + message += ret.stdout + error = subprocess.SubprocessError(message) + error.ret = ret # type: ignore[attr-defined] + error.command = cmd_str # type: ignore[attr-defined] + raise error + elif ret.returncode != 0: + sys.exit(ret.returncode) + return ret diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/config.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/config.py new file mode 100644 index 0000000000000000000000000000000000000000..9c132d1794f45e5888f8df9be707070b392a8f0b --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/config.py @@ -0,0 +1,143 @@ +import os +import sys +from pathlib import Path +from typing import Any, Dict, List, Optional + +import srsly +from click import NoSuchOption +from click.shell_completion import split_arg_string +from confection import Config +from wasabi import msg + +from ..cli.main import PROJECT_FILE +from ..schemas import ProjectConfigSchema, validate +from .environment import ENV_VARS +from .frozen import SimpleFrozenDict +from .logging import logger +from .validation import show_validation_error, validate_project_commands + + +def parse_config_overrides( + args: List[str], env_var: Optional[str] = ENV_VARS.CONFIG_OVERRIDES +) -> Dict[str, Any]: + """Generate a dictionary of config overrides based on the extra arguments + provided on the CLI, e.g. --training.batch_size to override + "training.batch_size". Arguments without a "." are considered invalid, + since the config only allows top-level sections to exist. + + env_vars (Optional[str]): Optional environment variable to read from. + RETURNS (Dict[str, Any]): The parsed dict, keyed by nested config setting. + """ + env_string = os.environ.get(env_var, "") if env_var else "" + env_overrides = _parse_overrides(split_arg_string(env_string)) + cli_overrides = _parse_overrides(args, is_cli=True) + if cli_overrides: + keys = [k for k in cli_overrides if k not in env_overrides] + logger.debug("Config overrides from CLI: %s", keys) + if env_overrides: + logger.debug("Config overrides from env variables: %s", list(env_overrides)) + return {**cli_overrides, **env_overrides} + + +def _parse_overrides(args: List[str], is_cli: bool = False) -> Dict[str, Any]: + result = {} + while args: + opt = args.pop(0) + err = f"Invalid config override '{opt}'" + if opt.startswith("--"): # new argument + orig_opt = opt + opt = opt.replace("--", "") + if "." not in opt: + if is_cli: + raise NoSuchOption(orig_opt) + else: + msg.fail(f"{err}: can't override top-level sections", exits=1) + if "=" in opt: # we have --opt=value + opt, value = opt.split("=", 1) + opt = opt.replace("-", "_") + else: + if not args or args[0].startswith("--"): # flag with no value + value = "true" + else: + value = args.pop(0) + result[opt] = _parse_override(value) + else: + msg.fail(f"{err}: name should start with --", exits=1) + return result + + +def _parse_override(value: Any) -> Any: + # Just like we do in the config, we're calling json.loads on the + # values. But since they come from the CLI, it'd be unintuitive to + # explicitly mark strings with escaped quotes. So we're working + # around that here by falling back to a string if parsing fails. + # TODO: improve logic to handle simple types like list of strings? + try: + return srsly.json_loads(value) + except ValueError: + return str(value) + + +def load_project_config( + path: Path, interpolate: bool = True, overrides: Dict[str, Any] = SimpleFrozenDict() +) -> Dict[str, Any]: + """Load the project.yml file from a directory and validate it. Also make + sure that all directories defined in the config exist. + + path (Path): The path to the project directory. + interpolate (bool): Whether to substitute project variables. + overrides (Dict[str, Any]): Optional config overrides. + RETURNS (Dict[str, Any]): The loaded project.yml. + """ + config_path = path / PROJECT_FILE + if not config_path.exists(): + msg.fail(f"Can't find {PROJECT_FILE}", config_path, exits=1) + invalid_err = f"Invalid {PROJECT_FILE}. Double-check that the YAML is correct." + try: + config = srsly.read_yaml(config_path) + except ValueError as e: + msg.fail(invalid_err, e, exits=1) + errors = validate(ProjectConfigSchema, config) + if errors: + msg.fail(invalid_err) + print("\n".join(errors)) + sys.exit(1) + validate_project_commands(config) + if interpolate: + err = f"{PROJECT_FILE} validation error" + with show_validation_error(title=err, hint_fill=False): + config = substitute_project_variables(config, overrides) + # Make sure directories defined in config exist + for subdir in config.get("directories", []): + dir_path = path / subdir + if not dir_path.exists(): + dir_path.mkdir(parents=True) + return config + + +def substitute_project_variables( + config: Dict[str, Any], + overrides: Dict[str, Any] = SimpleFrozenDict(), + key: str = "vars", + env_key: str = "env", +) -> Dict[str, Any]: + """Interpolate variables in the project file using the config system. + + config (Dict[str, Any]): The project config. + overrides (Dict[str, Any]): Optional config overrides. + key (str): Key containing variables in project config. + env_key (str): Key containing environment variable mapping in project config. + RETURNS (Dict[str, Any]): The interpolated project config. + """ + config.setdefault(key, {}) + config.setdefault(env_key, {}) + # Substitute references to env vars with their values + for config_var, env_var in config[env_key].items(): + config[env_key][config_var] = _parse_override(os.environ.get(env_var, "")) + # Need to put variables in the top scope again so we can have a top-level + # section "project" (otherwise, a list of commands in the top scope wouldn't) + # be allowed by Thinc's config system + cfg = Config({"project": config, key: config[key], env_key: config[env_key]}) + cfg = Config().from_str(cfg.to_str(), overrides=overrides) + interpolated = cfg.interpolate() + return dict(interpolated["project"]) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/environment.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/environment.py new file mode 100644 index 0000000000000000000000000000000000000000..b651abca9c8fd42f7bea654015a17c02b28d830c --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/environment.py @@ -0,0 +1,34 @@ +import os + +from wasabi import msg + + +class ENV_VARS: + CONFIG_OVERRIDES = "WEASEL_CONFIG_OVERRIDES" + + +def check_spacy_env_vars(): + if "SPACY_CONFIG_OVERRIDES" in os.environ: + msg.warn( + "You've set a `SPACY_CONFIG_OVERRIDES` environment variable, " + "which is now deprecated. Weasel will not use it. " + "You can use `WEASEL_CONFIG_OVERRIDES` instead." + ) + if "SPACY_PROJECT_USE_GIT_VERSION" in os.environ: + msg.warn( + "You've set a `SPACY_PROJECT_USE_GIT_VERSION` environment variable, " + "which is now deprecated. Weasel will not use it." + ) + + +def check_bool_env_var(env_var: str) -> bool: + """Convert the value of an environment variable to a boolean. Add special + check for "0" (falsy) and consider everything else truthy, except unset. + + env_var (str): The name of the environment variable to check. + RETURNS (bool): Its boolean value. + """ + value = os.environ.get(env_var, False) + if value == "0": + return False + return bool(value) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/filesystem.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/filesystem.py new file mode 100644 index 0000000000000000000000000000000000000000..edc6b42887acd2c446f3000bc01b1f6c6059f7d2 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/filesystem.py @@ -0,0 +1,97 @@ +import os +import shutil +import stat +import sys +import tempfile +import warnings +from contextlib import contextmanager +from pathlib import Path +from typing import Any, Generator, Iterator, Union + +from ..errors import Warnings + + +@contextmanager +def working_dir(path: Union[str, Path]) -> Iterator[Path]: + """Change current working directory and returns to previous on exit. + + path (str / Path): The directory to navigate to. + YIELDS (Path): The absolute path to the current working directory. This + should be used if the block needs to perform actions within the working + directory, to prevent mismatches with relative paths. + """ + prev_cwd = Path.cwd() + current = Path(path).resolve() + os.chdir(str(current)) + try: + yield current + finally: + os.chdir(str(prev_cwd)) + + +@contextmanager +def make_tempdir() -> Generator[Path, None, None]: + """Execute a block in a temporary directory and remove the directory and + its contents at the end of the with block. + + YIELDS (Path): The path of the temp directory. + """ + d = Path(tempfile.mkdtemp()) + yield d + + # On Windows, git clones use read-only files, which cause permission errors + # when being deleted. This forcibly fixes permissions. + def force_remove(rmfunc, path, ex): + os.chmod(path, stat.S_IWRITE) + rmfunc(path) + + try: + if sys.version_info >= (3, 12): + shutil.rmtree(str(d), onexc=force_remove) + else: + shutil.rmtree(str(d), onerror=force_remove) + except PermissionError as e: + warnings.warn(Warnings.W801.format(dir=d, msg=e)) + + +def is_cwd(path: Union[Path, str]) -> bool: + """Check whether a path is the current working directory. + + path (Union[Path, str]): The directory path. + RETURNS (bool): Whether the path is the current working directory. + """ + return str(Path(path).resolve()).lower() == str(Path.cwd().resolve()).lower() + + +def ensure_path(path: Any) -> Any: + """Ensure string is converted to a Path. + + path (Any): Anything. If string, it's converted to Path. + RETURNS: Path or original argument. + """ + if isinstance(path, str): + return Path(path) + else: + return path + + +def ensure_pathy(path): + """Temporary helper to prevent importing cloudpathlib globally (which was + originally added due to a slow and annoying Google Cloud warning with + Pathy)""" + from cloudpathlib import AnyPath # noqa: F811 + + return AnyPath(path) + + +def is_subpath_of(parent, child): + """ + Check whether `child` is a path contained within `parent`. + """ + # Based on https://stackoverflow.com/a/37095733 . + + # In Python 3.9, the `Path.is_relative_to()` method will supplant this, so + # we can stop using crusty old os.path functions. + parent_realpath = os.path.realpath(parent) + child_realpath = os.path.realpath(child) + return os.path.commonpath([parent_realpath, child_realpath]) == parent_realpath diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/frozen.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/frozen.py new file mode 100644 index 0000000000000000000000000000000000000000..08aec9479c5459618ed0ba619705cc731efc9eff --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/frozen.py @@ -0,0 +1,67 @@ +from ..errors import Errors + + +class SimpleFrozenDict(dict): + """Simplified implementation of a frozen dict, mainly used as default + function or method argument (for arguments that should default to empty + dictionary). Will raise an error if user or Weasel attempts to add to dict. + """ + + def __init__(self, *args, error: str = Errors.E001, **kwargs) -> None: + """Initialize the frozen dict. Can be initialized with pre-defined + values. + + error (str): The error message when user tries to assign to dict. + """ + super().__init__(*args, **kwargs) + self.error = error + + def __setitem__(self, key, value): + raise NotImplementedError(self.error) + + def pop(self, key, default=None): + raise NotImplementedError(self.error) + + def update(self, other): + raise NotImplementedError(self.error) + + +class SimpleFrozenList(list): + """Wrapper class around a list that lets us raise custom errors if certain + attributes/methods are accessed. Mostly used for properties like + Language.pipeline that return an immutable list (and that we don't want to + convert to a tuple to not break too much backwards compatibility). If a user + accidentally calls nlp.pipeline.append(), we can raise a more helpful error. + """ + + def __init__(self, *args, error: str = Errors.E002) -> None: + """Initialize the frozen list. + + error (str): The error message when user tries to mutate the list. + """ + self.error = error + super().__init__(*args) + + def append(self, *args, **kwargs): + raise NotImplementedError(self.error) + + def clear(self, *args, **kwargs): + raise NotImplementedError(self.error) + + def extend(self, *args, **kwargs): + raise NotImplementedError(self.error) + + def insert(self, *args, **kwargs): + raise NotImplementedError(self.error) + + def pop(self, *args, **kwargs): + raise NotImplementedError(self.error) + + def remove(self, *args, **kwargs): + raise NotImplementedError(self.error) + + def reverse(self, *args, **kwargs): + raise NotImplementedError(self.error) + + def sort(self, *args, **kwargs): + raise NotImplementedError(self.error) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/git.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/git.py new file mode 100644 index 0000000000000000000000000000000000000000..401d73ad4e39782afdafaf66a7721932d79964aa --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/git.py @@ -0,0 +1,151 @@ +import os +import shutil +from pathlib import Path +from typing import Tuple + +from wasabi import msg + +from .commands import run_command +from .filesystem import is_subpath_of, make_tempdir + + +def git_checkout( + repo: str, subpath: str, dest: Path, *, branch: str = "master", sparse: bool = False +): + git_version = get_git_version() + if dest.exists(): + msg.fail("Destination of checkout must not exist", exits=1) + if not dest.parent.exists(): + msg.fail("Parent of destination of checkout must exist", exits=1) + if sparse and git_version >= (2, 22): + return git_sparse_checkout(repo, subpath, dest, branch) + elif sparse: + # Only show warnings if the user explicitly wants sparse checkout but + # the Git version doesn't support it + err_old = ( + f"You're running an old version of Git (v{git_version[0]}.{git_version[1]}) " + f"that doesn't fully support sparse checkout yet." + ) + err_unk = "You're running an unknown version of Git, so sparse checkout has been disabled." + msg.warn( + f"{err_unk if git_version == (0, 0) else err_old} " + f"This means that more files than necessary may be downloaded " + f"temporarily. To only download the files needed, make sure " + f"you're using Git v2.22 or above." + ) + with make_tempdir() as tmp_dir: + cmd = f"git -C {tmp_dir} clone {repo} . -b {branch}" + run_command(cmd, capture=True) + # We need Path(name) to make sure we also support subdirectories + try: + source_path = tmp_dir / Path(subpath) + if not is_subpath_of(tmp_dir, source_path): + err = f"'{subpath}' is a path outside of the cloned repository." + msg.fail(err, repo, exits=1) + if os.path.isdir(source_path): + shutil.copytree(source_path, dest) + else: + shutil.copyfile(source_path, dest) + except FileNotFoundError: + err = f"Can't clone {subpath}. Make sure the directory exists in the repo (branch '{branch}')" + msg.fail(err, repo, exits=1) + + +def git_sparse_checkout(repo, subpath, dest, branch): + # We're using Git, partial clone and sparse checkout to + # only clone the files we need + # This ends up being RIDICULOUS. omg. + # So, every tutorial and SO post talks about 'sparse checkout'...But they + # go and *clone* the whole repo. Worthless. And cloning part of a repo + # turns out to be completely broken. The only way to specify a "path" is.. + # a path *on the server*? The contents of which, specifies the paths. Wat. + # Obviously this is hopelessly broken and insecure, because you can query + # arbitrary paths on the server! So nobody enables this. + # What we have to do is disable *all* files. We could then just checkout + # the path, and it'd "work", but be hopelessly slow...Because it goes and + # transfers every missing object one-by-one. So the final piece is that we + # need to use some weird git internals to fetch the missings in bulk, and + # *that* we can do by path. + # We're using Git and sparse checkout to only clone the files we need + with make_tempdir() as tmp_dir: + # This is the "clone, but don't download anything" part. + cmd = ( + f"git clone {repo} {tmp_dir} --no-checkout --depth 1 " + f"-b {branch} --filter=blob:none" + ) + run_command(cmd) + # Now we need to find the missing filenames for the subpath we want. + # Looking for this 'rev-list' command in the git --help? Hah. + cmd = f"git -C {tmp_dir} rev-list --objects --all --missing=print -- {subpath}" + ret = run_command(cmd, capture=True) + git_repo = _http_to_git(repo) + # Now pass those missings into another bit of git internals + missings = " ".join([x[1:] for x in ret.stdout.split() if x.startswith("?")]) + if not missings: + err = ( + f"Could not find any relevant files for '{subpath}'. " + f"Did you specify a correct and complete path within repo '{repo}' " + f"and branch {branch}?" + ) + msg.fail(err, exits=1) + cmd = f"git -C {tmp_dir} fetch-pack {git_repo} {missings}" + run_command(cmd, capture=True) + # And finally, we can checkout our subpath + cmd = f"git -C {tmp_dir} checkout {branch} {subpath}" + run_command(cmd, capture=True) + + # Get a subdirectory of the cloned path, if appropriate + source_path = tmp_dir / Path(subpath) + if not is_subpath_of(tmp_dir, source_path): + err = f"'{subpath}' is a path outside of the cloned repository." + msg.fail(err, repo, exits=1) + + shutil.move(str(source_path), str(dest)) + + +def git_repo_branch_exists(repo: str, branch: str) -> bool: + """Uses 'git ls-remote' to check if a repository and branch exists + + repo (str): URL to get repo. + branch (str): Branch on repo to check. + RETURNS (bool): True if repo:branch exists. + """ + get_git_version() + cmd = f"git ls-remote {repo} {branch}" + # We might be tempted to use `--exit-code` with `git ls-remote`, but + # `run_command` handles the `returncode` for us, so we'll rely on + # the fact that stdout returns '' if the requested branch doesn't exist + ret = run_command(cmd, capture=True) + exists = ret.stdout != "" + return exists + + +def get_git_version( + error: str = "Could not run 'git'. Make sure it's installed and the executable is available.", +) -> Tuple[int, int]: + """Get the version of git and raise an error if calling 'git --version' fails. + + error (str): The error message to show. + RETURNS (Tuple[int, int]): The version as a (major, minor) tuple. Returns + (0, 0) if the version couldn't be determined. + """ + try: + ret = run_command("git --version", capture=True) + except Exception: + raise RuntimeError(error) + stdout = ret.stdout.strip() + if not stdout or not stdout.startswith("git version"): + return 0, 0 + version = stdout[11:].strip().split(".") + return int(version[0]), int(version[1]) + + +def _http_to_git(repo: str) -> str: + if repo.startswith("http://"): + repo = repo.replace(r"http://", r"https://") + if repo.startswith(r"https://"): + repo = repo.replace("https://", "git@").replace("/", ":", 1) + if repo.endswith("/"): + repo = repo[:-1] + repo = f"{repo}.git" + return repo diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/hashing.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/hashing.py new file mode 100644 index 0000000000000000000000000000000000000000..554885022b34ba462a1e26b389dcc890aaff7126 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/hashing.py @@ -0,0 +1,39 @@ +import hashlib +from pathlib import Path +from typing import Iterable, Union + +import srsly +from wasabi import msg + + +def get_hash(data, exclude: Iterable[str] = tuple()) -> str: + """Get the hash for a JSON-serializable object. + + data: The data to hash. + exclude (Iterable[str]): Top-level keys to exclude if data is a dict. + RETURNS (str): The hash. + """ + if isinstance(data, dict): + data = {k: v for k, v in data.items() if k not in exclude} + data_str = srsly.json_dumps(data, sort_keys=True).encode("utf8") + return hashlib.md5(data_str).hexdigest() + + +def get_checksum(path: Union[Path, str]) -> str: + """Get the checksum for a file or directory given its file path. If a + directory path is provided, this uses all files in that directory. + + path (Union[Path, str]): The file or directory path. + RETURNS (str): The checksum. + """ + path = Path(path) + if not (path.is_file() or path.is_dir()): + msg.fail(f"Can't get checksum for {path}: not a file or directory", exits=1) + if path.is_file(): + return hashlib.md5(Path(path).read_bytes()).hexdigest() + else: + # TODO: this is currently pretty slow + dir_checksum = hashlib.md5() + for sub_file in sorted(fp for fp in path.rglob("*") if fp.is_file()): + dir_checksum.update(sub_file.read_bytes()) + return dir_checksum.hexdigest() diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/logging.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/logging.py new file mode 100644 index 0000000000000000000000000000000000000000..ddb47cc32d319d4c3286b3a6a51d61569726d4ba --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/logging.py @@ -0,0 +1,8 @@ +import logging + +logger = logging.getLogger("weasel") +logger_stream_handler = logging.StreamHandler() +logger_stream_handler.setFormatter( + logging.Formatter("[%(asctime)s] [%(levelname)s] %(message)s") +) +logger.addHandler(logger_stream_handler) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/modules.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/modules.py new file mode 100644 index 0000000000000000000000000000000000000000..bf3e0d77f131ef6416e332b0002e3f59f8478b08 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/modules.py @@ -0,0 +1,17 @@ +import importlib +from pathlib import Path +from types import ModuleType +from typing import Union + + +def import_file(name: str, loc: Union[str, Path]) -> ModuleType: + """Import module from a file. Used to load models from a directory. + + name (str): Name of module to load. + loc (str / Path): Path to the file. + RETURNS: The loaded module. + """ + spec = importlib.util.spec_from_file_location(name, str(loc)) # type: ignore + module = importlib.util.module_from_spec(spec) # type: ignore + spec.loader.exec_module(module) # type: ignore[union-attr] + return module diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/remote.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/remote.py new file mode 100644 index 0000000000000000000000000000000000000000..724f2956d46d5af8d20dfcbb4d129c5a73347664 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/remote.py @@ -0,0 +1,74 @@ +import os +import shutil +import sys +from pathlib import Path +from typing import TYPE_CHECKING, Any, Dict, Optional, Union + +from wasabi import msg + +if TYPE_CHECKING: + from cloudpathlib import CloudPath + + +def upload_file(src: Path, dest: Union[str, "CloudPath"]) -> None: + """Upload a file. + + src (Path): The source path. + url (str): The destination URL to upload to. + """ + import smart_open + + # Create parent directories for local paths + if isinstance(dest, Path): + if not dest.parent.exists(): + dest.parent.mkdir(parents=True) + + dest = str(dest) + if dest.startswith("az://"): + dest = dest.replace("az", "azure", 1) + transport_params = _transport_params(dest) + with smart_open.open( + dest, mode="wb", transport_params=transport_params + ) as output_file: + with src.open(mode="rb") as input_file: + output_file.write(input_file.read()) + + +def download_file( + src: Union[str, "CloudPath"], dest: Path, *, force: bool = False +) -> None: + """Download a file using smart_open. + + url (str): The URL of the file. + dest (Path): The destination path. + force (bool): Whether to force download even if file exists. + If False, the download will be skipped. + """ + import smart_open + + if dest.exists() and not force: + return None + src = str(src) + if src.startswith("az://"): + src = src.replace("az", "azure", 1) + transport_params = _transport_params(src) + with smart_open.open( + src, mode="rb", compression="disable", transport_params=transport_params + ) as input_file: + with dest.open(mode="wb") as output_file: + shutil.copyfileobj(input_file, output_file) + + +def _transport_params(url: str) -> Optional[Dict[str, Any]]: + if url.startswith("azure://"): + connection_string = os.environ.get("AZURE_STORAGE_CONNECTION_STRING") + if not connection_string: + msg.fail( + "Azure storage requires a connection string, which was not provided.", + "Assign it to the environment variable AZURE_STORAGE_CONNECTION_STRING.", + ) + sys.exit(1) + from azure.storage.blob import BlobServiceClient + + return {"client": BlobServiceClient.from_connection_string(connection_string)} + return None diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/validation.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/validation.py new file mode 100644 index 0000000000000000000000000000000000000000..0d218eadc0ef2fdb943609c7b8b7b149e43d8f4a --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/validation.py @@ -0,0 +1,83 @@ +import sys +from configparser import InterpolationError +from contextlib import contextmanager +from pathlib import Path +from typing import TYPE_CHECKING, Any, Dict, Optional, Union + +from confection import ConfigValidationError +from wasabi import msg + +from ..cli.main import PROJECT_FILE + +if TYPE_CHECKING: + pass + + +@contextmanager +def show_validation_error( + file_path: Optional[Union[str, Path]] = None, + *, + title: Optional[str] = None, + desc: str = "", + show_config: Optional[bool] = None, + hint_fill: bool = True, +): + """Helper to show custom config validation errors on the CLI. + + file_path (str / Path): Optional file path of config file, used in hints. + title (str): Override title of custom formatted error. + desc (str): Override description of custom formatted error. + show_config (bool): Whether to output the config the error refers to. + hint_fill (bool): Show hint about filling config. + """ + try: + yield + except ConfigValidationError as e: + title = title if title is not None else e.title + if e.desc: + desc = f"{e.desc}" if not desc else f"{e.desc}\n\n{desc}" + # Re-generate a new error object with overrides + err = e.from_error(e, title="", desc=desc, show_config=show_config) + msg.fail(title) + print(err.text.strip()) + if hint_fill and "value_error.missing" in err.error_types: + config_path = ( + file_path + if file_path is not None and str(file_path) != "-" + else "config.cfg" + ) + msg.text( + "If your config contains missing values, you can run the 'init " + "fill-config' command to fill in all the defaults, if possible:", + spaced=True, + ) + print(f"python -m spacy init fill-config {config_path} {config_path} \n") + sys.exit(1) + except InterpolationError as e: + msg.fail("Config validation error", e, exits=1) + + +def validate_project_commands(config: Dict[str, Any]) -> None: + """Check that project commands and workflows are valid, don't contain + duplicates, don't clash and only refer to commands that exist. + + config (Dict[str, Any]): The loaded config. + """ + command_names = [cmd["name"] for cmd in config.get("commands", [])] + workflows = config.get("workflows", {}) + duplicates = set([cmd for cmd in command_names if command_names.count(cmd) > 1]) + if duplicates: + err = f"Duplicate commands defined in {PROJECT_FILE}: {', '.join(duplicates)}" + msg.fail(err, exits=1) + for workflow_name, workflow_steps in workflows.items(): + if workflow_name in command_names: + err = f"Can't use workflow name '{workflow_name}': name already exists as a command" + msg.fail(err, exits=1) + for step in workflow_steps: + if step not in command_names: + msg.fail( + f"Unknown command specified in workflow '{workflow_name}': {step}", + f"Workflows can only refer to commands defined in the 'commands' " + f"section of the {PROJECT_FILE}.", + exits=1, + ) diff --git a/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/versions.py b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/versions.py new file mode 100644 index 0000000000000000000000000000000000000000..1d8d799eebe7fe5221feb6828c7483abccb3f322 --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/weasel/util/versions.py @@ -0,0 +1,57 @@ +from typing import Optional + +from packaging.specifiers import InvalidSpecifier, SpecifierSet +from packaging.version import InvalidVersion, Version + + +def is_compatible_version( + version: str, constraint: str, prereleases: bool = True +) -> Optional[bool]: + """Check if a version (e.g. "2.0.0") is compatible given a version + constraint (e.g. ">=1.9.0,<2.2.1"). If the constraint is a specific version, + it's interpreted as =={version}. + + version (str): The version to check. + constraint (str): The constraint string. + prereleases (bool): Whether to allow prereleases. If set to False, + prerelease versions will be considered incompatible. + RETURNS (bool / None): Whether the version is compatible, or None if the + version or constraint are invalid. + """ + # Handle cases where exact version is provided as constraint + if constraint[0].isdigit(): + constraint = f"=={constraint}" + try: + spec = SpecifierSet(constraint) + version = Version(version) # type: ignore[assignment] + except (InvalidSpecifier, InvalidVersion): + return None + spec.prereleases = prereleases + return version in spec + + +def get_minor_version(version: str) -> Optional[str]: + """Get the major + minor version (without patch or prerelease identifiers). + + version (str): The version. + RETURNS (str): The major + minor version or None if version is invalid. + """ + try: + v = Version(version) + except (TypeError, InvalidVersion): + return None + return f"{v.major}.{v.minor}" + + +def is_minor_version_match(version_a: str, version_b: str) -> bool: + """Compare two versions and check if they match in major and minor, without + patch or prerelease identifiers. Used internally for compatibility checks + that should be insensitive to patch releases. + + version_a (str): The first version + version_b (str): The second version. + RETURNS (bool): Whether the versions match. + """ + a = get_minor_version(version_a) + b = get_minor_version(version_b) + return a is not None and b is not None and a == b diff --git a/TTS/Kokoro/.venv/Lib/site-packages/win32_setctime/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/win32_setctime/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f000944d64bc1226d799d14e6b27735e80b37f3c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/win32_setctime/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/win32_setctime/__pycache__/_setctime.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/win32_setctime/__pycache__/_setctime.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cdb649c3b219b54230233f70ef5d31693920ac68 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/win32_setctime/__pycache__/_setctime.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt-2.1.1.dist-info/licenses/LICENSE b/TTS/Kokoro/.venv/Lib/site-packages/wrapt-2.1.1.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..23a8cd4bb3900ba119fde79d97b4b94b01cf5eeb --- /dev/null +++ b/TTS/Kokoro/.venv/Lib/site-packages/wrapt-2.1.1.dist-info/licenses/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2013-2026, Graham Dumpleton +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a040a638661900cea91b63bae743f8db82ca4c35 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/__wrapt__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/__wrapt__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8a63a183cdc914ee0809f72261b01d24797f3ed3 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/__wrapt__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/arguments.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/arguments.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..803210b4ef6faf6f0c8b833564b366cb0a11eea0 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/arguments.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/decorators.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/decorators.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..40299bdc8398ddc927c0810979e295f3deda041d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/decorators.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/importer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/importer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0ba9e741ce9923509b6be5854842210429ab265e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/importer.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/patches.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/patches.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..36378ee7527b26823138bb1ca9e7cd20069838e3 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/patches.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/proxies.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/proxies.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..429bbc211df458e39ca143095a87e400268e912e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/proxies.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/weakrefs.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/weakrefs.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6ebee371e85b004d80442dc4b2c41ba5bccc26f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/weakrefs.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/wrappers.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/wrappers.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..175f5902dd0c402a6d09fe4762f4fd4dc3c15d57 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/wrapt/__pycache__/wrappers.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/__init__.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5ee0c827c6edf330ecdc821a21d9e7fe27cd2c31 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/__init__.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/composer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/composer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90038739bd01e30a3c935ee883f8108af26dcb1e Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/composer.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/constructor.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/constructor.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2fc85807ea288ee97df297da8b3920e9e002d858 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/constructor.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/cyaml.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/cyaml.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa7c819114ed496a69e136f42016c17ba6767a9d Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/cyaml.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/dumper.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/dumper.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..512d39d036a28d60b43c0497d1321b9e1c38390c Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/dumper.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/emitter.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/emitter.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..60692105dd23962b54504ae436ebb7015abd1262 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/emitter.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/error.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/error.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e531e7645c3ec88f8eddb25c76c96285a57ee326 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/error.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/events.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/events.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e287a4bbbfea14cec891f8328920c4bc754a02b9 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/events.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/loader.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/loader.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d0f87289d7d6f9c4f9cadf5611691e58ec57e199 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/loader.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/nodes.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/nodes.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..53b91569158ce4c17d9d0a8f73738bf69690828f Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/nodes.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/parser.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/parser.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0446fcedb3afe3ae2e6fde2c4d7f86c9b5e0bb25 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/parser.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/reader.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/reader.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d9f79091a83362a394c14a90156c07bb8c88e0cf Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/reader.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/representer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/representer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a678ae781bf7d8b23d981d226b243edab3080af Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/representer.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/resolver.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/resolver.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46c885e31d0b212283af443b965b4edbba3baf6a Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/resolver.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/scanner.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/scanner.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bd1d5c956b32a6bedcbdc8a9ba0be24db6b27c79 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/scanner.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/serializer.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/serializer.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ca249cdf0bed6d8b62787a5c997f80b922b2f7f7 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/serializer.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/tokens.cpython-312.pyc b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/tokens.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b39ce91107a2e264601499689393366113c66dc6 Binary files /dev/null and b/TTS/Kokoro/.venv/Lib/site-packages/yaml/__pycache__/tokens.cpython-312.pyc differ diff --git a/TTS/Kokoro/.venv/share/man/man1/isympy.1 b/TTS/Kokoro/.venv/share/man/man1/isympy.1 new file mode 100644 index 0000000000000000000000000000000000000000..0ff966158a28c5ad1a6cd954e454842b25fdd999 --- /dev/null +++ b/TTS/Kokoro/.venv/share/man/man1/isympy.1 @@ -0,0 +1,188 @@ +'\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH isympy 1 2007-10-8 "" "" +.SH NAME +isympy \- interactive shell for SymPy +.SH SYNOPSIS +'nh +.fi +.ad l +\fBisympy\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ +-- | PYTHONOPTIONS] +'in \n(.iu-\nxu +.ad b +'hy +'nh +.fi +.ad l +\fBisympy\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[ +{\fB-h\fR | \fB--help\fR} +| +{\fB-v\fR | \fB--version\fR} +] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +isympy is a Python shell for SymPy. It is just a normal python shell +(ipython shell if you have the ipython package installed) that executes +the following commands so that you don't have to: +.PP +.nf +\*(T< +>>> from __future__ import division +>>> from sympy import * +>>> x, y, z = symbols("x,y,z") +>>> k, m, n = symbols("k,m,n", integer=True) + \*(T> +.fi +.PP +So starting isympy is equivalent to starting python (or ipython) and +executing the above commands by hand. It is intended for easy and quick +experimentation with SymPy. For more complicated programs, it is recommended +to write a script and import things explicitly (using the "from sympy +import sin, log, Symbol, ..." idiom). +.SH OPTIONS +.TP +\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR +Use the specified shell (python or ipython) as +console backend instead of the default one (ipython +if present or python otherwise). + +Example: isympy -c python + +\fISHELL\fR could be either +\&'ipython' or 'python' +.TP +\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR +Setup pretty printing in SymPy. By default, the most pretty, unicode +printing is enabled (if the terminal supports it). You can use less +pretty ASCII printing instead or no pretty printing at all. + +Example: isympy -p no + +\fIENCODING\fR must be one of 'unicode', +\&'ascii' or 'no'. +.TP +\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR +Setup the ground types for the polys. By default, gmpy ground types +are used if gmpy2 or gmpy is installed, otherwise it falls back to python +ground types, which are a little bit slower. You can manually +choose python ground types even if gmpy is installed (e.g., for testing purposes). + +Note that sympy ground types are not supported, and should be used +only for experimental purposes. + +Note that the gmpy1 ground type is primarily intended for testing; it the +use of gmpy even if gmpy2 is available. + +This is the same as setting the environment variable +SYMPY_GROUND_TYPES to the given ground type (e.g., +SYMPY_GROUND_TYPES='gmpy') + +The ground types can be determined interactively from the variable +sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. + +Example: isympy -t python + +\fITYPE\fR must be one of 'gmpy', +\&'gmpy1' or 'python'. +.TP +\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR +Setup the ordering of terms for printing. The default is lex, which +orders terms lexicographically (e.g., x**2 + x + 1). You can choose +other orderings, such as rev-lex, which will use reverse +lexicographic ordering (e.g., 1 + x + x**2). + +Note that for very large expressions, ORDER='none' may speed up +printing considerably, with the tradeoff that the order of the terms +in the printed expression will have no canonical order + +Example: isympy -o rev-lax + +\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', +\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. +.TP +\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> +Print only Python's and SymPy's versions to stdout at startup, and nothing else. +.TP +\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> +Use the same format that should be used for doctests. This is +equivalent to '\fIisympy -c python -p no\fR'. +.TP +\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> +Disable the caching mechanism. Disabling the cache may slow certain +operations down considerably. This is useful for testing the cache, +or for benchmarking, as the cache can result in deceptive benchmark timings. + +This is the same as setting the environment variable SYMPY_USE_CACHE +to 'no'. +.TP +\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> +Automatically create missing symbols. Normally, typing a name of a +Symbol that has not been instantiated first would raise NameError, +but with this option enabled, any undefined name will be +automatically created as a Symbol. This only works in IPython 0.11. + +Note that this is intended only for interactive, calculator style +usage. In a script that uses SymPy, Symbols should be instantiated +at the top, so that it's clear what they are. + +This will not override any names that are already defined, which +includes the single character letters represented by the mnemonic +QCOSINE (see the "Gotchas and Pitfalls" document in the +documentation). You can delete existing names by executing "del +name" in the shell itself. You can see if a name is defined by typing +"'name' in globals()". + +The Symbols that are created using this have default assumptions. +If you want to place assumptions on symbols, you should create them +using symbols() or var(). + +Finally, this only works in the top level namespace. So, for +example, if you define a function in isympy with an undefined +Symbol, it will not work. +.TP +\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> +Enable debugging output. This is the same as setting the +environment variable SYMPY_DEBUG to 'True'. The debug status is set +in the variable SYMPY_DEBUG within isympy. +.TP +-- \fIPYTHONOPTIONS\fR +These options will be passed on to \fIipython (1)\fR shell. +Only supported when ipython is being used (standard python shell not supported). + +Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR +from the other isympy options. + +For example, to run iSymPy without startup banner and colors: + +isympy -q -c ipython -- --colors=NoColor +.TP +\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> +Print help output and exit. +.TP +\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> +Print isympy version information and exit. +.SH FILES +.TP +\*(T<\fI${HOME}/.sympy\-history\fR\*(T> +Saves the history of commands when using the python +shell as backend. +.SH BUGS +The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra +Please report all bugs that you find in there, this will help improve +the overall quality of SymPy. +.SH "SEE ALSO" +\fBipython\fR(1), \fBpython\fR(1) diff --git a/TTS/Piper/Voices/pt_BR-cadu-medium.onnx b/TTS/Piper/Voices/pt_BR-cadu-medium.onnx new file mode 100644 index 0000000000000000000000000000000000000000..fd682dcd73dda12dff1fd680b50612d881248152 --- /dev/null +++ b/TTS/Piper/Voices/pt_BR-cadu-medium.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:765f0809a6ea9035d4a6d0d008dbf8876e68b2dd32029312672fa8f405bdb535 +size 62950044 diff --git a/TTS/Piper/Voices/pt_BR-cadu-medium.onnx.json b/TTS/Piper/Voices/pt_BR-cadu-medium.onnx.json new file mode 100644 index 0000000000000000000000000000000000000000..fedd776ac88886d2924880b2115511bbfe38f552 --- /dev/null +++ b/TTS/Piper/Voices/pt_BR-cadu-medium.onnx.json @@ -0,0 +1,512 @@ +{ + "audio": { + "sample_rate": 22050, + "quality": "medium" + }, + "espeak": { + "voice": "pt-br" + }, + "phoneme_type": "espeak", + "piper_version": "1.3.0", + "num_symbols": 256, + "num_speakers": 1, + "inference": { + "noise_scale": 0.667, + "length_scale": 1.0, + "noise_w": 0.8 + }, + "phoneme_id_map": { + "_": [ + 0 + ], + "^": [ + 1 + ], + "$": [ + 2 + ], + " ": [ + 3 + ], + "!": [ + 4 + ], + "'": [ + 5 + ], + "(": [ + 6 + ], + ")": [ + 7 + ], + ",": [ + 8 + ], + "-": [ + 9 + ], + ".": [ + 10 + ], + ":": [ + 11 + ], + ";": [ + 12 + ], + "?": [ + 13 + ], + "a": [ + 14 + ], + "b": [ + 15 + ], + "c": [ + 16 + ], + "d": [ + 17 + ], + "e": [ + 18 + ], + "f": [ + 19 + ], + "h": [ + 20 + ], + "i": [ + 21 + ], + "j": [ + 22 + ], + "k": [ + 23 + ], + "l": [ + 24 + ], + "m": [ + 25 + ], + "n": [ + 26 + ], + "o": [ + 27 + ], + "p": [ + 28 + ], + "q": [ + 29 + ], + "r": [ + 30 + ], + "s": [ + 31 + ], + "t": [ + 32 + ], + "u": [ + 33 + ], + "v": [ + 34 + ], + "w": [ + 35 + ], + "x": [ + 36 + ], + "y": [ + 37 + ], + "z": [ + 38 + ], + "æ": [ + 39 + ], + "ç": [ + 40 + ], + "ð": [ + 41 + ], + "ø": [ + 42 + ], + "ħ": [ + 43 + ], + "ŋ": [ + 44 + ], + "œ": [ + 45 + ], + "ǀ": [ + 46 + ], + "ǁ": [ + 47 + ], + "ǂ": [ + 48 + ], + "ǃ": [ + 49 + ], + "ɐ": [ + 50 + ], + "ɑ": [ + 51 + ], + "ɒ": [ + 52 + ], + "ɓ": [ + 53 + ], + "ɔ": [ + 54 + ], + "ɕ": [ + 55 + ], + "ɖ": [ + 56 + ], + "ɗ": [ + 57 + ], + "ɘ": [ + 58 + ], + "ə": [ + 59 + ], + "ɚ": [ + 60 + ], + "ɛ": [ + 61 + ], + "ɜ": [ + 62 + ], + "ɞ": [ + 63 + ], + "ɟ": [ + 64 + ], + "ɠ": [ + 65 + ], + "ɡ": [ + 66 + ], + "ɢ": [ + 67 + ], + "ɣ": [ + 68 + ], + "ɤ": [ + 69 + ], + "ɥ": [ + 70 + ], + "ɦ": [ + 71 + ], + "ɧ": [ + 72 + ], + "ɨ": [ + 73 + ], + "ɪ": [ + 74 + ], + "ɫ": [ + 75 + ], + "ɬ": [ + 76 + ], + "ɭ": [ + 77 + ], + "ɮ": [ + 78 + ], + "ɯ": [ + 79 + ], + "ɰ": [ + 80 + ], + "ɱ": [ + 81 + ], + "ɲ": [ + 82 + ], + "ɳ": [ + 83 + ], + "ɴ": [ + 84 + ], + "ɵ": [ + 85 + ], + "ɶ": [ + 86 + ], + "ɸ": [ + 87 + ], + "ɹ": [ + 88 + ], + "ɺ": [ + 89 + ], + "ɻ": [ + 90 + ], + "ɽ": [ + 91 + ], + "ɾ": [ + 92 + ], + "ʀ": [ + 93 + ], + "ʁ": [ + 94 + ], + "ʂ": [ + 95 + ], + "ʃ": [ + 96 + ], + "ʄ": [ + 97 + ], + "ʈ": [ + 98 + ], + "ʉ": [ + 99 + ], + "ʊ": [ + 100 + ], + "ʋ": [ + 101 + ], + "ʌ": [ + 102 + ], + "ʍ": [ + 103 + ], + "ʎ": [ + 104 + ], + "ʏ": [ + 105 + ], + "ʐ": [ + 106 + ], + "ʑ": [ + 107 + ], + "ʒ": [ + 108 + ], + "ʔ": [ + 109 + ], + "ʕ": [ + 110 + ], + "ʘ": [ + 111 + ], + "ʙ": [ + 112 + ], + "ʛ": [ + 113 + ], + "ʜ": [ + 114 + ], + "ʝ": [ + 115 + ], + "ʟ": [ + 116 + ], + "ʡ": [ + 117 + ], + "ʢ": [ + 118 + ], + "ʲ": [ + 119 + ], + "ˈ": [ + 120 + ], + "ˌ": [ + 121 + ], + "ː": [ + 122 + ], + "ˑ": [ + 123 + ], + "˞": [ + 124 + ], + "β": [ + 125 + ], + "θ": [ + 126 + ], + "χ": [ + 127 + ], + "ᵻ": [ + 128 + ], + "ⱱ": [ + 129 + ], + "0": [ + 130 + ], + "1": [ + 131 + ], + "2": [ + 132 + ], + "3": [ + 133 + ], + "4": [ + 134 + ], + "5": [ + 135 + ], + "6": [ + 136 + ], + "7": [ + 137 + ], + "8": [ + 138 + ], + "9": [ + 139 + ], + "̧": [ + 140 + ], + "̃": [ + 141 + ], + "̪": [ + 142 + ], + "̯": [ + 143 + ], + "̩": [ + 144 + ], + "ʰ": [ + 145 + ], + "ˤ": [ + 146 + ], + "ε": [ + 147 + ], + "↓": [ + 148 + ], + "#": [ + 149 + ], + "\"": [ + 150 + ], + "↑": [ + 151 + ], + "̺": [ + 152 + ], + "̻": [ + 153 + ], + "g": [ + 154 + ], + "ʦ": [ + 155 + ], + "X": [ + 156 + ], + "̝": [ + 157 + ], + "̊": [ + 158 + ], + "ɝ": [ + 159 + ], + "ʷ": [ + 160 + ] + }, + "language": { + "code": "pt_BR", + "family": "pt", + "region": "BR", + "name_native": "Português", + "name_english": "Portuguese", + "country_english": "Brazil" + }, + "dataset": "cadu" +} \ No newline at end of file diff --git a/TTS/Piper/Voices/pt_BR-edresson-low.onnx b/TTS/Piper/Voices/pt_BR-edresson-low.onnx new file mode 100644 index 0000000000000000000000000000000000000000..d7807968b6dae66e14eea4dfacdb46683f548327 --- /dev/null +++ b/TTS/Piper/Voices/pt_BR-edresson-low.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de4cecee38b30bb1a6378a337af605d59f0c377df702c6a6752870db8991cd84 +size 63104526 diff --git a/TTS/Piper/Voices/pt_BR-edresson-low.onnx.json b/TTS/Piper/Voices/pt_BR-edresson-low.onnx.json new file mode 100644 index 0000000000000000000000000000000000000000..43925b4324e3b25a96298d4b8a7d907ac9867937 --- /dev/null +++ b/TTS/Piper/Voices/pt_BR-edresson-low.onnx.json @@ -0,0 +1,420 @@ +{ + "audio": { + "sample_rate": 16000, + "quality": "low" + }, + "espeak": { + "voice": "pt-br" + }, + "inference": { + "noise_scale": 0.667, + "length_scale": 1, + "noise_w": 0.8 + }, + "phoneme_map": {}, + "phoneme_id_map": { + "_": [ + 0 + ], + "^": [ + 1 + ], + "$": [ + 2 + ], + " ": [ + 3 + ], + "!": [ + 4 + ], + "'": [ + 5 + ], + "(": [ + 6 + ], + ")": [ + 7 + ], + ",": [ + 8 + ], + "-": [ + 9 + ], + ".": [ + 10 + ], + ":": [ + 11 + ], + ";": [ + 12 + ], + "?": [ + 13 + ], + "a": [ + 14 + ], + "b": [ + 15 + ], + "c": [ + 16 + ], + "d": [ + 17 + ], + "e": [ + 18 + ], + "f": [ + 19 + ], + "h": [ + 20 + ], + "i": [ + 21 + ], + "j": [ + 22 + ], + "k": [ + 23 + ], + "l": [ + 24 + ], + "m": [ + 25 + ], + "n": [ + 26 + ], + "o": [ + 27 + ], + "p": [ + 28 + ], + "q": [ + 29 + ], + "r": [ + 30 + ], + "s": [ + 31 + ], + "t": [ + 32 + ], + "u": [ + 33 + ], + "v": [ + 34 + ], + "w": [ + 35 + ], + "x": [ + 36 + ], + "y": [ + 37 + ], + "z": [ + 38 + ], + "æ": [ + 39 + ], + "ç": [ + 40 + ], + "ð": [ + 41 + ], + "ø": [ + 42 + ], + "ħ": [ + 43 + ], + "ŋ": [ + 44 + ], + "œ": [ + 45 + ], + "ǀ": [ + 46 + ], + "ǁ": [ + 47 + ], + "ǂ": [ + 48 + ], + "ǃ": [ + 49 + ], + "ɐ": [ + 50 + ], + "ɑ": [ + 51 + ], + "ɒ": [ + 52 + ], + "ɓ": [ + 53 + ], + "ɔ": [ + 54 + ], + "ɕ": [ + 55 + ], + "ɖ": [ + 56 + ], + "ɗ": [ + 57 + ], + "ɘ": [ + 58 + ], + "ə": [ + 59 + ], + "ɚ": [ + 60 + ], + "ɛ": [ + 61 + ], + "ɜ": [ + 62 + ], + "ɞ": [ + 63 + ], + "ɟ": [ + 64 + ], + "ɠ": [ + 65 + ], + "ɡ": [ + 66 + ], + "ɢ": [ + 67 + ], + "ɣ": [ + 68 + ], + "ɤ": [ + 69 + ], + "ɥ": [ + 70 + ], + "ɦ": [ + 71 + ], + "ɧ": [ + 72 + ], + "ɨ": [ + 73 + ], + "ɪ": [ + 74 + ], + "ɫ": [ + 75 + ], + "ɬ": [ + 76 + ], + "ɭ": [ + 77 + ], + "ɮ": [ + 78 + ], + "ɯ": [ + 79 + ], + "ɰ": [ + 80 + ], + "ɱ": [ + 81 + ], + "ɲ": [ + 82 + ], + "ɳ": [ + 83 + ], + "ɴ": [ + 84 + ], + "ɵ": [ + 85 + ], + "ɶ": [ + 86 + ], + "ɸ": [ + 87 + ], + "ɹ": [ + 88 + ], + "ɺ": [ + 89 + ], + "ɻ": [ + 90 + ], + "ɽ": [ + 91 + ], + "ɾ": [ + 92 + ], + "ʀ": [ + 93 + ], + "ʁ": [ + 94 + ], + "ʂ": [ + 95 + ], + "ʃ": [ + 96 + ], + "ʄ": [ + 97 + ], + "ʈ": [ + 98 + ], + "ʉ": [ + 99 + ], + "ʊ": [ + 100 + ], + "ʋ": [ + 101 + ], + "ʌ": [ + 102 + ], + "ʍ": [ + 103 + ], + "ʎ": [ + 104 + ], + "ʏ": [ + 105 + ], + "ʐ": [ + 106 + ], + "ʑ": [ + 107 + ], + "ʒ": [ + 108 + ], + "ʔ": [ + 109 + ], + "ʕ": [ + 110 + ], + "ʘ": [ + 111 + ], + "ʙ": [ + 112 + ], + "ʛ": [ + 113 + ], + "ʜ": [ + 114 + ], + "ʝ": [ + 115 + ], + "ʟ": [ + 116 + ], + "ʡ": [ + 117 + ], + "ʢ": [ + 118 + ], + "ʲ": [ + 119 + ], + "ˈ": [ + 120 + ], + "ˌ": [ + 121 + ], + "ː": [ + 122 + ], + "ˑ": [ + 123 + ], + "˞": [ + 124 + ], + "β": [ + 125 + ], + "θ": [ + 126 + ], + "χ": [ + 127 + ], + "ᵻ": [ + 128 + ], + "ⱱ": [ + 129 + ] + }, + "num_symbols": 130, + "num_speakers": 1, + "speaker_id_map": {}, + "piper_version": "0.2.0", + "language": { + "code": "pt_BR", + "family": "pt", + "region": "BR", + "name_native": "Português", + "name_english": "Portuguese", + "country_english": "Brazil" + }, + "dataset": "edresson" +} \ No newline at end of file diff --git a/TTS/Piper/Voices/pt_BR-faber-medium.onnx b/TTS/Piper/Voices/pt_BR-faber-medium.onnx new file mode 100644 index 0000000000000000000000000000000000000000..324a5f23579ef280c7aa0f5c32a0ac301a2f765a --- /dev/null +++ b/TTS/Piper/Voices/pt_BR-faber-medium.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:858555e3a064209c57088fe6bd70c4c3dc54d03eaa00c45d5ecaf43a33f95aa7 +size 63201294 diff --git a/TTS/Piper/Voices/pt_BR-faber-medium.onnx.json b/TTS/Piper/Voices/pt_BR-faber-medium.onnx.json new file mode 100644 index 0000000000000000000000000000000000000000..b0206c81d70e6e4468b94d36491b4c17fac531b7 --- /dev/null +++ b/TTS/Piper/Voices/pt_BR-faber-medium.onnx.json @@ -0,0 +1,491 @@ +{ + "audio": { + "sample_rate": 22050, + "quality": "medium" + }, + "espeak": { + "voice": "pt-br" + }, + "inference": { + "noise_scale": 0.667, + "length_scale": 1, + "noise_w": 0.8 + }, + "phoneme_type": "espeak", + "phoneme_map": { + "c": [ + "k" + ] + }, + "phoneme_id_map": { + "_": [ + 0 + ], + "^": [ + 1 + ], + "$": [ + 2 + ], + " ": [ + 3 + ], + "!": [ + 4 + ], + "'": [ + 5 + ], + "(": [ + 6 + ], + ")": [ + 7 + ], + ",": [ + 8 + ], + "-": [ + 9 + ], + ".": [ + 10 + ], + ":": [ + 11 + ], + ";": [ + 12 + ], + "?": [ + 13 + ], + "a": [ + 14 + ], + "b": [ + 15 + ], + "c": [ + 16 + ], + "d": [ + 17 + ], + "e": [ + 18 + ], + "f": [ + 19 + ], + "h": [ + 20 + ], + "i": [ + 21 + ], + "j": [ + 22 + ], + "k": [ + 23 + ], + "l": [ + 24 + ], + "m": [ + 25 + ], + "n": [ + 26 + ], + "o": [ + 27 + ], + "p": [ + 28 + ], + "q": [ + 29 + ], + "r": [ + 30 + ], + "s": [ + 31 + ], + "t": [ + 32 + ], + "u": [ + 33 + ], + "v": [ + 34 + ], + "w": [ + 35 + ], + "x": [ + 36 + ], + "y": [ + 37 + ], + "z": [ + 38 + ], + "æ": [ + 39 + ], + "ç": [ + 40 + ], + "ð": [ + 41 + ], + "ø": [ + 42 + ], + "ħ": [ + 43 + ], + "ŋ": [ + 44 + ], + "œ": [ + 45 + ], + "ǀ": [ + 46 + ], + "ǁ": [ + 47 + ], + "ǂ": [ + 48 + ], + "ǃ": [ + 49 + ], + "ɐ": [ + 50 + ], + "ɑ": [ + 51 + ], + "ɒ": [ + 52 + ], + "ɓ": [ + 53 + ], + "ɔ": [ + 54 + ], + "ɕ": [ + 55 + ], + "ɖ": [ + 56 + ], + "ɗ": [ + 57 + ], + "ɘ": [ + 58 + ], + "ə": [ + 59 + ], + "ɚ": [ + 60 + ], + "ɛ": [ + 61 + ], + "ɜ": [ + 62 + ], + "ɞ": [ + 63 + ], + "ɟ": [ + 64 + ], + "ɠ": [ + 65 + ], + "ɡ": [ + 66 + ], + "ɢ": [ + 67 + ], + "ɣ": [ + 68 + ], + "ɤ": [ + 69 + ], + "ɥ": [ + 70 + ], + "ɦ": [ + 71 + ], + "ɧ": [ + 72 + ], + "ɨ": [ + 73 + ], + "ɪ": [ + 74 + ], + "ɫ": [ + 75 + ], + "ɬ": [ + 76 + ], + "ɭ": [ + 77 + ], + "ɮ": [ + 78 + ], + "ɯ": [ + 79 + ], + "ɰ": [ + 80 + ], + "ɱ": [ + 81 + ], + "ɲ": [ + 82 + ], + "ɳ": [ + 83 + ], + "ɴ": [ + 84 + ], + "ɵ": [ + 85 + ], + "ɶ": [ + 86 + ], + "ɸ": [ + 87 + ], + "ɹ": [ + 88 + ], + "ɺ": [ + 89 + ], + "ɻ": [ + 90 + ], + "ɽ": [ + 91 + ], + "ɾ": [ + 92 + ], + "ʀ": [ + 93 + ], + "ʁ": [ + 94 + ], + "ʂ": [ + 95 + ], + "ʃ": [ + 96 + ], + "ʄ": [ + 97 + ], + "ʈ": [ + 98 + ], + "ʉ": [ + 99 + ], + "ʊ": [ + 100 + ], + "ʋ": [ + 101 + ], + "ʌ": [ + 102 + ], + "ʍ": [ + 103 + ], + "ʎ": [ + 104 + ], + "ʏ": [ + 105 + ], + "ʐ": [ + 106 + ], + "ʑ": [ + 107 + ], + "ʒ": [ + 108 + ], + "ʔ": [ + 109 + ], + "ʕ": [ + 110 + ], + "ʘ": [ + 111 + ], + "ʙ": [ + 112 + ], + "ʛ": [ + 113 + ], + "ʜ": [ + 114 + ], + "ʝ": [ + 115 + ], + "ʟ": [ + 116 + ], + "ʡ": [ + 117 + ], + "ʢ": [ + 118 + ], + "ʲ": [ + 119 + ], + "ˈ": [ + 120 + ], + "ˌ": [ + 121 + ], + "ː": [ + 122 + ], + "ˑ": [ + 123 + ], + "˞": [ + 124 + ], + "β": [ + 125 + ], + "θ": [ + 126 + ], + "χ": [ + 127 + ], + "ᵻ": [ + 128 + ], + "ⱱ": [ + 129 + ], + "0": [ + 130 + ], + "1": [ + 131 + ], + "2": [ + 132 + ], + "3": [ + 133 + ], + "4": [ + 134 + ], + "5": [ + 135 + ], + "6": [ + 136 + ], + "7": [ + 137 + ], + "8": [ + 138 + ], + "9": [ + 139 + ], + "̧": [ + 140 + ], + "̃": [ + 141 + ], + "̪": [ + 142 + ], + "̯": [ + 143 + ], + "̩": [ + 144 + ], + "ʰ": [ + 145 + ], + "ˤ": [ + 146 + ], + "ε": [ + 147 + ], + "↓": [ + 148 + ], + "#": [ + 149 + ], + "\"": [ + 150 + ], + "↑": [ + 151 + ] + }, + "num_symbols": 256, + "num_speakers": 1, + "speaker_id_map": {}, + "piper_version": "1.0.0", + "language": { + "code": "pt_BR", + "family": "pt", + "region": "BR", + "name_native": "Português", + "name_english": "Portuguese", + "country_english": "Brazil" + }, + "dataset": "faber" +} \ No newline at end of file diff --git a/TTS/Piper/Voices/pt_BR-jeff-medium.onnx b/TTS/Piper/Voices/pt_BR-jeff-medium.onnx new file mode 100644 index 0000000000000000000000000000000000000000..ea9ae1816fd174c092f6584a42ff715d9c0c39e1 --- /dev/null +++ b/TTS/Piper/Voices/pt_BR-jeff-medium.onnx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a6f4c46355813c2b7bbc4d16b6d13d60ed72074b952a393baace82a7d0c94b5 +size 62950044 diff --git a/TTS/Piper/Voices/pt_BR-jeff-medium.onnx.json b/TTS/Piper/Voices/pt_BR-jeff-medium.onnx.json new file mode 100644 index 0000000000000000000000000000000000000000..822b04e6c34bd75920d493a72eb63af827d83f79 --- /dev/null +++ b/TTS/Piper/Voices/pt_BR-jeff-medium.onnx.json @@ -0,0 +1,512 @@ +{ + "audio": { + "sample_rate": 22050, + "quality": "medium" + }, + "espeak": { + "voice": "pt-br" + }, + "phoneme_type": "espeak", + "piper_version": "1.3.0", + "num_symbols": 256, + "num_speakers": 1, + "inference": { + "noise_scale": 0.667, + "length_scale": 1.0, + "noise_w": 0.8 + }, + "phoneme_id_map": { + "_": [ + 0 + ], + "^": [ + 1 + ], + "$": [ + 2 + ], + " ": [ + 3 + ], + "!": [ + 4 + ], + "'": [ + 5 + ], + "(": [ + 6 + ], + ")": [ + 7 + ], + ",": [ + 8 + ], + "-": [ + 9 + ], + ".": [ + 10 + ], + ":": [ + 11 + ], + ";": [ + 12 + ], + "?": [ + 13 + ], + "a": [ + 14 + ], + "b": [ + 15 + ], + "c": [ + 16 + ], + "d": [ + 17 + ], + "e": [ + 18 + ], + "f": [ + 19 + ], + "h": [ + 20 + ], + "i": [ + 21 + ], + "j": [ + 22 + ], + "k": [ + 23 + ], + "l": [ + 24 + ], + "m": [ + 25 + ], + "n": [ + 26 + ], + "o": [ + 27 + ], + "p": [ + 28 + ], + "q": [ + 29 + ], + "r": [ + 30 + ], + "s": [ + 31 + ], + "t": [ + 32 + ], + "u": [ + 33 + ], + "v": [ + 34 + ], + "w": [ + 35 + ], + "x": [ + 36 + ], + "y": [ + 37 + ], + "z": [ + 38 + ], + "æ": [ + 39 + ], + "ç": [ + 40 + ], + "ð": [ + 41 + ], + "ø": [ + 42 + ], + "ħ": [ + 43 + ], + "ŋ": [ + 44 + ], + "œ": [ + 45 + ], + "ǀ": [ + 46 + ], + "ǁ": [ + 47 + ], + "ǂ": [ + 48 + ], + "ǃ": [ + 49 + ], + "ɐ": [ + 50 + ], + "ɑ": [ + 51 + ], + "ɒ": [ + 52 + ], + "ɓ": [ + 53 + ], + "ɔ": [ + 54 + ], + "ɕ": [ + 55 + ], + "ɖ": [ + 56 + ], + "ɗ": [ + 57 + ], + "ɘ": [ + 58 + ], + "ə": [ + 59 + ], + "ɚ": [ + 60 + ], + "ɛ": [ + 61 + ], + "ɜ": [ + 62 + ], + "ɞ": [ + 63 + ], + "ɟ": [ + 64 + ], + "ɠ": [ + 65 + ], + "ɡ": [ + 66 + ], + "ɢ": [ + 67 + ], + "ɣ": [ + 68 + ], + "ɤ": [ + 69 + ], + "ɥ": [ + 70 + ], + "ɦ": [ + 71 + ], + "ɧ": [ + 72 + ], + "ɨ": [ + 73 + ], + "ɪ": [ + 74 + ], + "ɫ": [ + 75 + ], + "ɬ": [ + 76 + ], + "ɭ": [ + 77 + ], + "ɮ": [ + 78 + ], + "ɯ": [ + 79 + ], + "ɰ": [ + 80 + ], + "ɱ": [ + 81 + ], + "ɲ": [ + 82 + ], + "ɳ": [ + 83 + ], + "ɴ": [ + 84 + ], + "ɵ": [ + 85 + ], + "ɶ": [ + 86 + ], + "ɸ": [ + 87 + ], + "ɹ": [ + 88 + ], + "ɺ": [ + 89 + ], + "ɻ": [ + 90 + ], + "ɽ": [ + 91 + ], + "ɾ": [ + 92 + ], + "ʀ": [ + 93 + ], + "ʁ": [ + 94 + ], + "ʂ": [ + 95 + ], + "ʃ": [ + 96 + ], + "ʄ": [ + 97 + ], + "ʈ": [ + 98 + ], + "ʉ": [ + 99 + ], + "ʊ": [ + 100 + ], + "ʋ": [ + 101 + ], + "ʌ": [ + 102 + ], + "ʍ": [ + 103 + ], + "ʎ": [ + 104 + ], + "ʏ": [ + 105 + ], + "ʐ": [ + 106 + ], + "ʑ": [ + 107 + ], + "ʒ": [ + 108 + ], + "ʔ": [ + 109 + ], + "ʕ": [ + 110 + ], + "ʘ": [ + 111 + ], + "ʙ": [ + 112 + ], + "ʛ": [ + 113 + ], + "ʜ": [ + 114 + ], + "ʝ": [ + 115 + ], + "ʟ": [ + 116 + ], + "ʡ": [ + 117 + ], + "ʢ": [ + 118 + ], + "ʲ": [ + 119 + ], + "ˈ": [ + 120 + ], + "ˌ": [ + 121 + ], + "ː": [ + 122 + ], + "ˑ": [ + 123 + ], + "˞": [ + 124 + ], + "β": [ + 125 + ], + "θ": [ + 126 + ], + "χ": [ + 127 + ], + "ᵻ": [ + 128 + ], + "ⱱ": [ + 129 + ], + "0": [ + 130 + ], + "1": [ + 131 + ], + "2": [ + 132 + ], + "3": [ + 133 + ], + "4": [ + 134 + ], + "5": [ + 135 + ], + "6": [ + 136 + ], + "7": [ + 137 + ], + "8": [ + 138 + ], + "9": [ + 139 + ], + "̧": [ + 140 + ], + "̃": [ + 141 + ], + "̪": [ + 142 + ], + "̯": [ + 143 + ], + "̩": [ + 144 + ], + "ʰ": [ + 145 + ], + "ˤ": [ + 146 + ], + "ε": [ + 147 + ], + "↓": [ + 148 + ], + "#": [ + 149 + ], + "\"": [ + 150 + ], + "↑": [ + 151 + ], + "̺": [ + 152 + ], + "̻": [ + 153 + ], + "g": [ + 154 + ], + "ʦ": [ + 155 + ], + "X": [ + 156 + ], + "̝": [ + 157 + ], + "̊": [ + 158 + ], + "ɝ": [ + 159 + ], + "ʷ": [ + 160 + ] + }, + "language": { + "code": "pt_BR", + "family": "pt", + "region": "BR", + "name_native": "Português", + "name_english": "Portuguese", + "country_english": "Brazil" + }, + "dataset": "jeff" +} diff --git a/TTS/Piper/espeak-ng-data/af_dict b/TTS/Piper/espeak-ng-data/af_dict new file mode 100644 index 0000000000000000000000000000000000000000..f4fd630b6e89a96a346c7ceadec2e193a540e56b --- /dev/null +++ b/TTS/Piper/espeak-ng-data/af_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25729d3bf4c4a0f08da60aea9eb5a0cf352630f83fab1ab0c3955b7740da1776 +size 121473 diff --git a/TTS/Piper/espeak-ng-data/am_dict b/TTS/Piper/espeak-ng-data/am_dict new file mode 100644 index 0000000000000000000000000000000000000000..b2b04422e020d8705bc1a9932ff8eee4b6961789 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/am_dict differ diff --git a/TTS/Piper/espeak-ng-data/an_dict b/TTS/Piper/espeak-ng-data/an_dict new file mode 100644 index 0000000000000000000000000000000000000000..d10d32cefb100a3c4ddbcd232cf2eb22639f6b63 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/an_dict differ diff --git a/TTS/Piper/espeak-ng-data/ar_dict b/TTS/Piper/espeak-ng-data/ar_dict new file mode 100644 index 0000000000000000000000000000000000000000..18b4482684c459947794b9de8773759770e4c984 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/ar_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72316426e797777fe4df9420935a3b6a79b37d7e3f3948537ba71cd7b21b2541 +size 478165 diff --git a/TTS/Piper/espeak-ng-data/as_dict b/TTS/Piper/espeak-ng-data/as_dict new file mode 100644 index 0000000000000000000000000000000000000000..6bd0e60e13e1f56de3ce5135009c3d6acfaac11a Binary files /dev/null and b/TTS/Piper/espeak-ng-data/as_dict differ diff --git a/TTS/Piper/espeak-ng-data/az_dict b/TTS/Piper/espeak-ng-data/az_dict new file mode 100644 index 0000000000000000000000000000000000000000..77ca0917d2e22701f96bdbef5e6ebacb2e3dd673 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/az_dict differ diff --git a/TTS/Piper/espeak-ng-data/ba_dict b/TTS/Piper/espeak-ng-data/ba_dict new file mode 100644 index 0000000000000000000000000000000000000000..f175c683436a0e725b399702f4b3fd206ef4817f Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ba_dict differ diff --git a/TTS/Piper/espeak-ng-data/be_dict b/TTS/Piper/espeak-ng-data/be_dict new file mode 100644 index 0000000000000000000000000000000000000000..39d7434e784cad1cdce9bbd432fa11e223e4c526 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/be_dict differ diff --git a/TTS/Piper/espeak-ng-data/bg_dict b/TTS/Piper/espeak-ng-data/bg_dict new file mode 100644 index 0000000000000000000000000000000000000000..ecd7f4a8dfa69fd2fcf4746ba58337e00b7afbd5 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/bg_dict differ diff --git a/TTS/Piper/espeak-ng-data/bn_dict b/TTS/Piper/espeak-ng-data/bn_dict new file mode 100644 index 0000000000000000000000000000000000000000..627f13ecb8c98ca43087b8ac0a6d305185097176 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/bn_dict differ diff --git a/TTS/Piper/espeak-ng-data/bpy_dict b/TTS/Piper/espeak-ng-data/bpy_dict new file mode 100644 index 0000000000000000000000000000000000000000..735496ff2f0de96af6bf9f3cc504b34369ba7b08 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/bpy_dict differ diff --git a/TTS/Piper/espeak-ng-data/bs_dict b/TTS/Piper/espeak-ng-data/bs_dict new file mode 100644 index 0000000000000000000000000000000000000000..71a38939fcc52f3af0b7d821b4c7556f65db8f23 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/bs_dict differ diff --git a/TTS/Piper/espeak-ng-data/ca_dict b/TTS/Piper/espeak-ng-data/ca_dict new file mode 100644 index 0000000000000000000000000000000000000000..f134d4e865516475926501642d31e42d3ca92a05 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ca_dict differ diff --git a/TTS/Piper/espeak-ng-data/chr_dict b/TTS/Piper/espeak-ng-data/chr_dict new file mode 100644 index 0000000000000000000000000000000000000000..489aa57b5121f50d20291d550222fce87cc37aa0 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/chr_dict differ diff --git a/TTS/Piper/espeak-ng-data/cmn_dict b/TTS/Piper/espeak-ng-data/cmn_dict new file mode 100644 index 0000000000000000000000000000000000000000..79f64f8ac6211ccc069dbeedeefd8102511ad1c5 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/cmn_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:109aaa7708d3727382acb3ae41d8e2094a7e2bb9f651a81835be22a6f08071fe +size 1566335 diff --git a/TTS/Piper/espeak-ng-data/cs_dict b/TTS/Piper/espeak-ng-data/cs_dict new file mode 100644 index 0000000000000000000000000000000000000000..cf916dab388320d9ccb9f699041c72bc3753b594 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/cs_dict differ diff --git a/TTS/Piper/espeak-ng-data/cv_dict b/TTS/Piper/espeak-ng-data/cv_dict new file mode 100644 index 0000000000000000000000000000000000000000..79311d995e9e29fb255207d628944e1ddab389ea Binary files /dev/null and b/TTS/Piper/espeak-ng-data/cv_dict differ diff --git a/TTS/Piper/espeak-ng-data/cy_dict b/TTS/Piper/espeak-ng-data/cy_dict new file mode 100644 index 0000000000000000000000000000000000000000..c4f738b51ddf72da4e07b6a00208fd8ac958c1c3 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/cy_dict differ diff --git a/TTS/Piper/espeak-ng-data/da_dict b/TTS/Piper/espeak-ng-data/da_dict new file mode 100644 index 0000000000000000000000000000000000000000..517c0eb86f01108b3020bfbff7eea1252c0121c1 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/da_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae6c2dd4f0f4d38342918a776a9e2c46d919572f02336c864f843ff7b262caf8 +size 245287 diff --git a/TTS/Piper/espeak-ng-data/de_dict b/TTS/Piper/espeak-ng-data/de_dict new file mode 100644 index 0000000000000000000000000000000000000000..6f7697c737b3715a1f42222c811a8d8a92f1baf7 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/de_dict differ diff --git a/TTS/Piper/espeak-ng-data/el_dict b/TTS/Piper/espeak-ng-data/el_dict new file mode 100644 index 0000000000000000000000000000000000000000..e6831f06bf823412350c657779ded7618424f353 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/el_dict differ diff --git a/TTS/Piper/espeak-ng-data/en_dict b/TTS/Piper/espeak-ng-data/en_dict new file mode 100644 index 0000000000000000000000000000000000000000..c465c3e1035699658d561b925d5baf89ebe876ab --- /dev/null +++ b/TTS/Piper/espeak-ng-data/en_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71bd330ba8a2e3e8076e631508208ef49449d6147c17b7bd2b4b1e1468292e35 +size 166944 diff --git a/TTS/Piper/espeak-ng-data/eo_dict b/TTS/Piper/espeak-ng-data/eo_dict new file mode 100644 index 0000000000000000000000000000000000000000..4ea54fe3ea595beb2b12e32cde9cb4c26ee358c9 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/eo_dict differ diff --git a/TTS/Piper/espeak-ng-data/es_dict b/TTS/Piper/espeak-ng-data/es_dict new file mode 100644 index 0000000000000000000000000000000000000000..c810ac740686e2dbdbb882f0cf3b2eb6b0fef6f1 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/es_dict differ diff --git a/TTS/Piper/espeak-ng-data/et_dict b/TTS/Piper/espeak-ng-data/et_dict new file mode 100644 index 0000000000000000000000000000000000000000..f336d145bfbfc07088e3985ffea1aac780717aca Binary files /dev/null and b/TTS/Piper/espeak-ng-data/et_dict differ diff --git a/TTS/Piper/espeak-ng-data/eu_dict b/TTS/Piper/espeak-ng-data/eu_dict new file mode 100644 index 0000000000000000000000000000000000000000..ff71e0503760c9ca582634382d0ee23d34772ab7 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/eu_dict differ diff --git a/TTS/Piper/espeak-ng-data/fa_dict b/TTS/Piper/espeak-ng-data/fa_dict new file mode 100644 index 0000000000000000000000000000000000000000..8113ebbc799eb88f9f3760d085f13b3bc9a76d09 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/fa_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f92f35ce7eb1d97360016617d97786412a94af55b776a18f1c280dab4f43befd +size 292423 diff --git a/TTS/Piper/espeak-ng-data/fi_dict b/TTS/Piper/espeak-ng-data/fi_dict new file mode 100644 index 0000000000000000000000000000000000000000..a6028472fa331aa6ccd3f058339fd7d202cf1b97 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/fi_dict differ diff --git a/TTS/Piper/espeak-ng-data/fr_dict b/TTS/Piper/espeak-ng-data/fr_dict new file mode 100644 index 0000000000000000000000000000000000000000..560a8c6fe9ce9a692ece627375a3315c66a78298 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/fr_dict differ diff --git a/TTS/Piper/espeak-ng-data/ga_dict b/TTS/Piper/espeak-ng-data/ga_dict new file mode 100644 index 0000000000000000000000000000000000000000..65338e22252665f524cc8978a4919f7a0f4da3b6 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ga_dict differ diff --git a/TTS/Piper/espeak-ng-data/gd_dict b/TTS/Piper/espeak-ng-data/gd_dict new file mode 100644 index 0000000000000000000000000000000000000000..3ce4b954ff1511957e5f9efd61e8bd4334bc6668 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/gd_dict differ diff --git a/TTS/Piper/espeak-ng-data/gn_dict b/TTS/Piper/espeak-ng-data/gn_dict new file mode 100644 index 0000000000000000000000000000000000000000..ee7fa4b406cf308a8da6730d2738c96fe73531d7 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/gn_dict differ diff --git a/TTS/Piper/espeak-ng-data/grc_dict b/TTS/Piper/espeak-ng-data/grc_dict new file mode 100644 index 0000000000000000000000000000000000000000..1d9f3742c317fe8fec3fd1dbb50907a6111fb148 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/grc_dict differ diff --git a/TTS/Piper/espeak-ng-data/gu_dict b/TTS/Piper/espeak-ng-data/gu_dict new file mode 100644 index 0000000000000000000000000000000000000000..245afbb4773e89bba9436b300182615035bfdda6 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/gu_dict differ diff --git a/TTS/Piper/espeak-ng-data/hak_dict b/TTS/Piper/espeak-ng-data/hak_dict new file mode 100644 index 0000000000000000000000000000000000000000..38adf87ece01f89ebce7c9b184ef6d3114478683 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/hak_dict differ diff --git a/TTS/Piper/espeak-ng-data/haw_dict b/TTS/Piper/espeak-ng-data/haw_dict new file mode 100644 index 0000000000000000000000000000000000000000..a78245c2cc3c86163411ef6a9c25cee51b2ceece Binary files /dev/null and b/TTS/Piper/espeak-ng-data/haw_dict differ diff --git a/TTS/Piper/espeak-ng-data/he_dict b/TTS/Piper/espeak-ng-data/he_dict new file mode 100644 index 0000000000000000000000000000000000000000..e1037a6951d6e8181ae12f6bc0ba7217d6d397bd Binary files /dev/null and b/TTS/Piper/espeak-ng-data/he_dict differ diff --git a/TTS/Piper/espeak-ng-data/hi_dict b/TTS/Piper/espeak-ng-data/hi_dict new file mode 100644 index 0000000000000000000000000000000000000000..c612100bc5a6a59e0d6d00341093a9ddc7dd1d88 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/hi_dict differ diff --git a/TTS/Piper/espeak-ng-data/hr_dict b/TTS/Piper/espeak-ng-data/hr_dict new file mode 100644 index 0000000000000000000000000000000000000000..0ecec2df23ea541523645310f5cc85bd579bf81e Binary files /dev/null and b/TTS/Piper/espeak-ng-data/hr_dict differ diff --git a/TTS/Piper/espeak-ng-data/ht_dict b/TTS/Piper/espeak-ng-data/ht_dict new file mode 100644 index 0000000000000000000000000000000000000000..ada2b70587abdf581e62c6c5ed022ec4c470e63e Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ht_dict differ diff --git a/TTS/Piper/espeak-ng-data/hu_dict b/TTS/Piper/espeak-ng-data/hu_dict new file mode 100644 index 0000000000000000000000000000000000000000..710f8c36f20f46f26cb136cd213c5d24c64fc62e --- /dev/null +++ b/TTS/Piper/espeak-ng-data/hu_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:055d563b839d599db40be5b1cc2af9d31793795b328eb8d4f389ec7d38fe7e81 +size 153785 diff --git a/TTS/Piper/espeak-ng-data/hy_dict b/TTS/Piper/espeak-ng-data/hy_dict new file mode 100644 index 0000000000000000000000000000000000000000..7fb0fe31e706bc80bcddbf690d49ac43fe580769 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/hy_dict differ diff --git a/TTS/Piper/espeak-ng-data/ia_dict b/TTS/Piper/espeak-ng-data/ia_dict new file mode 100644 index 0000000000000000000000000000000000000000..9a88d50438dd3781e24afd46bf34be432dc70617 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/ia_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c665603a82beb81e0cef2878c9b44642ae6d519e301fbbd06326e03325febf3 +size 331275 diff --git a/TTS/Piper/espeak-ng-data/id_dict b/TTS/Piper/espeak-ng-data/id_dict new file mode 100644 index 0000000000000000000000000000000000000000..6e71d720cf83326b61d572f00b31e955c1c82e4a Binary files /dev/null and b/TTS/Piper/espeak-ng-data/id_dict differ diff --git a/TTS/Piper/espeak-ng-data/intonations b/TTS/Piper/espeak-ng-data/intonations new file mode 100644 index 0000000000000000000000000000000000000000..ca2d4b362c3dc1dac7b5da760c33f7ad9c96047a Binary files /dev/null and b/TTS/Piper/espeak-ng-data/intonations differ diff --git a/TTS/Piper/espeak-ng-data/io_dict b/TTS/Piper/espeak-ng-data/io_dict new file mode 100644 index 0000000000000000000000000000000000000000..e690ae89dd5cb5513c97d7b71d5341d780cb33b0 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/io_dict differ diff --git a/TTS/Piper/espeak-ng-data/is_dict b/TTS/Piper/espeak-ng-data/is_dict new file mode 100644 index 0000000000000000000000000000000000000000..935799a4aa1358944a215b665c5c1b02892bc600 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/is_dict differ diff --git a/TTS/Piper/espeak-ng-data/it_dict b/TTS/Piper/espeak-ng-data/it_dict new file mode 100644 index 0000000000000000000000000000000000000000..fc0ffa8ed82e7e7e4b9da9df524274d233ae0aee --- /dev/null +++ b/TTS/Piper/espeak-ng-data/it_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:111f968359c9ebe36b107a2565ba9f258bab337d3cbe37e44871980a8f21ce6b +size 152889 diff --git a/TTS/Piper/espeak-ng-data/ja_dict b/TTS/Piper/espeak-ng-data/ja_dict new file mode 100644 index 0000000000000000000000000000000000000000..19c63a3f5a522b307cb84a008edd4b462dde89e9 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ja_dict differ diff --git a/TTS/Piper/espeak-ng-data/jbo_dict b/TTS/Piper/espeak-ng-data/jbo_dict new file mode 100644 index 0000000000000000000000000000000000000000..938b323a35b15f1d902b37894b01ee481d0096c8 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/jbo_dict differ diff --git a/TTS/Piper/espeak-ng-data/ka_dict b/TTS/Piper/espeak-ng-data/ka_dict new file mode 100644 index 0000000000000000000000000000000000000000..a43848b2e3d8364fbf706e2cb740d7bb4dfabf2b Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ka_dict differ diff --git a/TTS/Piper/espeak-ng-data/kk_dict b/TTS/Piper/espeak-ng-data/kk_dict new file mode 100644 index 0000000000000000000000000000000000000000..7e02e2202a8713461d6f5b1613c70a3039e2534e Binary files /dev/null and b/TTS/Piper/espeak-ng-data/kk_dict differ diff --git a/TTS/Piper/espeak-ng-data/kl_dict b/TTS/Piper/espeak-ng-data/kl_dict new file mode 100644 index 0000000000000000000000000000000000000000..10a0566cd496eec1dbe425c7f03f578a5236edd4 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/kl_dict differ diff --git a/TTS/Piper/espeak-ng-data/kn_dict b/TTS/Piper/espeak-ng-data/kn_dict new file mode 100644 index 0000000000000000000000000000000000000000..6a41a8d58fc258e79eeea9e8e6d0e9bddfe98906 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/kn_dict differ diff --git a/TTS/Piper/espeak-ng-data/ko_dict b/TTS/Piper/espeak-ng-data/ko_dict new file mode 100644 index 0000000000000000000000000000000000000000..296dffbb4c7016b96cedc0a39941461f860f3c93 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ko_dict differ diff --git a/TTS/Piper/espeak-ng-data/kok_dict b/TTS/Piper/espeak-ng-data/kok_dict new file mode 100644 index 0000000000000000000000000000000000000000..1f2813c40cb2812655488d9cf1514b3f79761bc2 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/kok_dict differ diff --git a/TTS/Piper/espeak-ng-data/ku_dict b/TTS/Piper/espeak-ng-data/ku_dict new file mode 100644 index 0000000000000000000000000000000000000000..bf3d745cc3af42222a44828ef41bf2a78f33ac22 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ku_dict differ diff --git a/TTS/Piper/espeak-ng-data/ky_dict b/TTS/Piper/espeak-ng-data/ky_dict new file mode 100644 index 0000000000000000000000000000000000000000..3ea39d99d53010e3a2f37fe6fd7d7df8e858ba44 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ky_dict differ diff --git a/TTS/Piper/espeak-ng-data/la_dict b/TTS/Piper/espeak-ng-data/la_dict new file mode 100644 index 0000000000000000000000000000000000000000..3f30fd3fb492ef5b376188ff270709bc37de4184 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/la_dict differ diff --git a/TTS/Piper/espeak-ng-data/lang/aav/vi b/TTS/Piper/espeak-ng-data/lang/aav/vi new file mode 100644 index 0000000000000000000000000000000000000000..7808128d708fb0dcdf0d0b7f87efa4eabad6fd51 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/aav/vi @@ -0,0 +1,8 @@ +name Vietnamese (Northern) +language vi + +words 1 2 +pitch 95 175 + + +tone 100 225 800 100 2000 50 5400 75 8000 200 diff --git a/TTS/Piper/espeak-ng-data/lang/aav/vi-VN-x-central b/TTS/Piper/espeak-ng-data/lang/aav/vi-VN-x-central new file mode 100644 index 0000000000000000000000000000000000000000..0defacaa6e3e0412f44adcd0a0404f73d4b4f6d8 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/aav/vi-VN-x-central @@ -0,0 +1,9 @@ +name Vietnamese (Central) +language vi-vn-x-central +phonemes vi-hue +dictrules 1 + +words 1 +pitch 82 118 //80 118 + voicing 90 //18 + flutter 20 diff --git a/TTS/Piper/espeak-ng-data/lang/aav/vi-VN-x-south b/TTS/Piper/espeak-ng-data/lang/aav/vi-VN-x-south new file mode 100644 index 0000000000000000000000000000000000000000..4c32561d6b95b9715753bc50a1d6570bfd887a8d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/aav/vi-VN-x-south @@ -0,0 +1,9 @@ +name Vietnamese (Southern) +language vi-vn-x-south +phonemes vi-sgn +dictrules 2 + +words 1 +pitch 82 118 //80 118 + voicing 90 //18 + flutter 20 diff --git a/TTS/Piper/espeak-ng-data/lang/art/eo b/TTS/Piper/espeak-ng-data/lang/art/eo new file mode 100644 index 0000000000000000000000000000000000000000..e47501faef940e2f935350084f8d49b6a4ff6a32 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/eo @@ -0,0 +1,4 @@ +name Esperanto +language eo + +apostrophe 2 diff --git a/TTS/Piper/espeak-ng-data/lang/art/ia b/TTS/Piper/espeak-ng-data/lang/art/ia new file mode 100644 index 0000000000000000000000000000000000000000..6a14728771b428773f11afd28036e82ace24d0b1 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/ia @@ -0,0 +1,2 @@ +name Interlingua +language ia diff --git a/TTS/Piper/espeak-ng-data/lang/art/io b/TTS/Piper/espeak-ng-data/lang/art/io new file mode 100644 index 0000000000000000000000000000000000000000..c50f9fabaff626a538020de2a85000907fba4913 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/io @@ -0,0 +1,5 @@ +name Ido +language io +phonemes eo +status testing + diff --git a/TTS/Piper/espeak-ng-data/lang/art/jbo b/TTS/Piper/espeak-ng-data/lang/art/jbo new file mode 100644 index 0000000000000000000000000000000000000000..9cf2f3098dcfc611ce96feb498e4b8e82e0305eb --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/jbo @@ -0,0 +1,4 @@ +name Lojban +language jbo + +speed 80 // speed adjustment, percentage diff --git a/TTS/Piper/espeak-ng-data/lang/art/lfn b/TTS/Piper/espeak-ng-data/lang/art/lfn new file mode 100644 index 0000000000000000000000000000000000000000..d5e43871e3e19da947d7564b4efa59fc52d46585 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/lfn @@ -0,0 +1,8 @@ +name Lingua Franca Nova +language lfn + +phonemes base2 +l_unpronouncable 0 +numbers 2 3 + +stressLength 150 140 180 180 0 0 200 200 diff --git a/TTS/Piper/espeak-ng-data/lang/art/piqd b/TTS/Piper/espeak-ng-data/lang/art/piqd new file mode 100644 index 0000000000000000000000000000000000000000..49367cd84d5f92fb3a1b3af582eb4d1b510f5a72 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/piqd @@ -0,0 +1,5 @@ +name Klingon +language piqd +status testing +stressRule 3 + diff --git a/TTS/Piper/espeak-ng-data/lang/art/py b/TTS/Piper/espeak-ng-data/lang/art/py new file mode 100644 index 0000000000000000000000000000000000000000..850a34e870bfc384c85c509314dee96fd1529c13 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/py @@ -0,0 +1,7 @@ +name Pyash +language py +maintainer Logan Streondj +status testing + +speed 80 // speed adjustment, percentage +stressRule 0 diff --git a/TTS/Piper/espeak-ng-data/lang/art/qdb b/TTS/Piper/espeak-ng-data/lang/art/qdb new file mode 100644 index 0000000000000000000000000000000000000000..eb5ea363bd721d08bbb157f60390c55db556adc7 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/qdb @@ -0,0 +1,6 @@ +name Lang Belta +language qdb + +numbers 4 3 + +replace 1 t ? diff --git a/TTS/Piper/espeak-ng-data/lang/art/qya b/TTS/Piper/espeak-ng-data/lang/art/qya new file mode 100644 index 0000000000000000000000000000000000000000..2b515813b48ce99fab0a72ac81bc022f1988615d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/qya @@ -0,0 +1,4 @@ +name Quenya +language qya +stressRule 2 +// rule=penultimate, with qya_rules for light penultimate syllables to move primary stress to the preceding (antepenultimate) syllable diff --git a/TTS/Piper/espeak-ng-data/lang/art/sjn b/TTS/Piper/espeak-ng-data/lang/art/sjn new file mode 100644 index 0000000000000000000000000000000000000000..f927bc93b8729011a0e4bae90c79e9b2bb554e7d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/art/sjn @@ -0,0 +1,4 @@ +name Sindarin +language sjn +stressRule 2 +// rule=penultimate, with sjn_rules for light penultimate syllables to move primary stress to the preceding (antepenultimate) syllable diff --git a/TTS/Piper/espeak-ng-data/lang/azc/nci b/TTS/Piper/espeak-ng-data/lang/azc/nci new file mode 100644 index 0000000000000000000000000000000000000000..f1896379e0d0fe63a325d9e49138066d97479a70 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/azc/nci @@ -0,0 +1,6 @@ +name Nahuatl (Classical) +language nci + +intonation 3 +stressRule 2 +stressLength 190 190 200 200 0 0 220 240 diff --git a/TTS/Piper/espeak-ng-data/lang/bat/lt b/TTS/Piper/espeak-ng-data/lang/bat/lt new file mode 100644 index 0000000000000000000000000000000000000000..7cdb1930f20db7a2ed80b4f0adfe41d2821dcbe8 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/bat/lt @@ -0,0 +1,2 @@ +name Lithuanian +language lt diff --git a/TTS/Piper/espeak-ng-data/lang/bat/ltg b/TTS/Piper/espeak-ng-data/lang/bat/ltg new file mode 100644 index 0000000000000000000000000000000000000000..1041d9e3bb94d68595b5962ea78805bf5eb66b8b --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/bat/ltg @@ -0,0 +1,12 @@ +name Latgalian +language ltg +maintainer Valdis Vitolins +status testing +phonemes lv +dictionary lv +dictrules 2 // Setting for Latgalian pronunciation +words 0 2 +pitch 64 118 +tone 60 150 204 100 400 255 700 10 3000 255 +stressAmp 12 10 8 8 0 0 15 16 +stressLength 160 140 200 140 0 0 240 160 diff --git a/TTS/Piper/espeak-ng-data/lang/bat/lv b/TTS/Piper/espeak-ng-data/lang/bat/lv new file mode 100644 index 0000000000000000000000000000000000000000..70eb61dcb5ab1c303f66f3588375d0db0a87e3c8 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/bat/lv @@ -0,0 +1,9 @@ +name Latvian +language lv +maintainer Valdis Vitolins +status mature +words 0 2 +pitch 67 123 +tone 60 150 204 100 400 255 700 10 3000 255 +stressAmp 11 8 11 9 0 0 14 12 +stressLength 160 120 200 130 0 0 230 180 diff --git a/TTS/Piper/espeak-ng-data/lang/bnt/sw b/TTS/Piper/espeak-ng-data/lang/bnt/sw new file mode 100644 index 0000000000000000000000000000000000000000..d1a4db33cc76a2aa53e6cbdef185475706e6b46f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/bnt/sw @@ -0,0 +1,4 @@ +name Swahili +language sw + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/bnt/tn b/TTS/Piper/espeak-ng-data/lang/bnt/tn new file mode 100644 index 0000000000000000000000000000000000000000..8b484e43647227abd923fb22711f5792c95ecf29 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/bnt/tn @@ -0,0 +1,4 @@ +name Setswana +language tn + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/ccs/ka b/TTS/Piper/espeak-ng-data/lang/ccs/ka new file mode 100644 index 0000000000000000000000000000000000000000..2a789b3c60ebf8b08193926c8d99559836645f09 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/ccs/ka @@ -0,0 +1,3 @@ +name Georgian +language ka +lowercaseSentence // A period followed by a lowercase letter is considered a sentence (mkhedruli) diff --git a/TTS/Piper/espeak-ng-data/lang/cel/cy b/TTS/Piper/espeak-ng-data/lang/cel/cy new file mode 100644 index 0000000000000000000000000000000000000000..6d0213294bcbee353b58a90ab6fd21926386dfee --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/cel/cy @@ -0,0 +1,4 @@ +name Welsh +language cy + +intonation 4 diff --git a/TTS/Piper/espeak-ng-data/lang/cel/ga b/TTS/Piper/espeak-ng-data/lang/cel/ga new file mode 100644 index 0000000000000000000000000000000000000000..9fea2ae7dd02a65fe819286022bbdf32b3afa1a4 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/cel/ga @@ -0,0 +1,4 @@ +name Gaelic (Irish) +language ga + +dictrules 1 // fix for eclipsis diff --git a/TTS/Piper/espeak-ng-data/lang/cel/gd b/TTS/Piper/espeak-ng-data/lang/cel/gd new file mode 100644 index 0000000000000000000000000000000000000000..e416f6fa36def26fe7645e65de200c637b75418b --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/cel/gd @@ -0,0 +1,4 @@ +name Gaelic (Scottish) +language gd + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/cus/om b/TTS/Piper/espeak-ng-data/lang/cus/om new file mode 100644 index 0000000000000000000000000000000000000000..1d6b396defd28e39a093a234c62d2d5aae29e2f0 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/cus/om @@ -0,0 +1,4 @@ +name Oromo +language om + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/dra/kn b/TTS/Piper/espeak-ng-data/lang/dra/kn new file mode 100644 index 0000000000000000000000000000000000000000..a32732c4551286acc9203506d6651d2b12a93c46 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/dra/kn @@ -0,0 +1,5 @@ +name Kannada +language kn + +intonation 2 +//consonants 80 diff --git a/TTS/Piper/espeak-ng-data/lang/dra/ml b/TTS/Piper/espeak-ng-data/lang/dra/ml new file mode 100644 index 0000000000000000000000000000000000000000..92394bbcb29dcfa4f010467b9f7df9c46678380f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/dra/ml @@ -0,0 +1,5 @@ +name Malayalam +language ml + +intonation 2 +//consonants 80 diff --git a/TTS/Piper/espeak-ng-data/lang/dra/ta b/TTS/Piper/espeak-ng-data/lang/dra/ta new file mode 100644 index 0000000000000000000000000000000000000000..aae63348a624705561ec4800990168fbfe03a1e9 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/dra/ta @@ -0,0 +1,5 @@ +name Tamil +language ta + +intonation 2 +consonants 80 diff --git a/TTS/Piper/espeak-ng-data/lang/dra/te b/TTS/Piper/espeak-ng-data/lang/dra/te new file mode 100644 index 0000000000000000000000000000000000000000..8acbb1879d65664ef24b6ebe0d393250f7d62cee --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/dra/te @@ -0,0 +1,7 @@ +name Telugu +language te + +status testing + +intonation 2 +//consonants 80 diff --git a/TTS/Piper/espeak-ng-data/lang/esx/kl b/TTS/Piper/espeak-ng-data/lang/esx/kl new file mode 100644 index 0000000000000000000000000000000000000000..e581b58814d49bfbd060f80a16d2e3758235f480 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/esx/kl @@ -0,0 +1,3 @@ +name Greenlandic +language kl + diff --git a/TTS/Piper/espeak-ng-data/lang/eu b/TTS/Piper/espeak-ng-data/lang/eu new file mode 100644 index 0000000000000000000000000000000000000000..ef132e5b83168f01e7ec76b533e7c9f43abe2b51 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/eu @@ -0,0 +1,5 @@ +name Basque +language eu + +status testing +stressRule 15 diff --git a/TTS/Piper/espeak-ng-data/lang/gmq/da b/TTS/Piper/espeak-ng-data/lang/gmq/da new file mode 100644 index 0000000000000000000000000000000000000000..58f02f15a7047676f47fccd99b78471478101653 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmq/da @@ -0,0 +1,4 @@ +name Danish +language da + +tunes s2 c2 q2 e2 diff --git a/TTS/Piper/espeak-ng-data/lang/gmq/is b/TTS/Piper/espeak-ng-data/lang/gmq/is new file mode 100644 index 0000000000000000000000000000000000000000..04bf5ad364789a3833f4d24f56a51de0ec815517 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmq/is @@ -0,0 +1,2 @@ +name Icelandic +language is diff --git a/TTS/Piper/espeak-ng-data/lang/gmq/nb b/TTS/Piper/espeak-ng-data/lang/gmq/nb new file mode 100644 index 0000000000000000000000000000000000000000..c29117f5308e85aab12aea73c149880b8586a989 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmq/nb @@ -0,0 +1,7 @@ +name Norwegian Bokmål +language nb +language no +phonemes no +dictionary no + +intonation 4 diff --git a/TTS/Piper/espeak-ng-data/lang/gmq/sv b/TTS/Piper/espeak-ng-data/lang/gmq/sv new file mode 100644 index 0000000000000000000000000000000000000000..bb2d0299e001268aa07e85318b83442cd826b3da --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmq/sv @@ -0,0 +1,2 @@ +name Swedish +language sv diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/af b/TTS/Piper/espeak-ng-data/lang/gmw/af new file mode 100644 index 0000000000000000000000000000000000000000..64fc96f55bfe2520b30d73fc3bfd01638c2db6e6 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/af @@ -0,0 +1,8 @@ +name Afrikaans +language af + +maintainer Christo de Klerk +status mature + +roughness 0 +pitch 63 120 diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/de b/TTS/Piper/espeak-ng-data/lang/gmw/de new file mode 100644 index 0000000000000000000000000000000000000000..a43cc1a55385cb2955be6aa501588e8b26585bed --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/de @@ -0,0 +1,3 @@ +name German +language de +tunes s4 c1 q4 e1 diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/en b/TTS/Piper/espeak-ng-data/lang/gmw/en new file mode 100644 index 0000000000000000000000000000000000000000..f23fb53124eb2a927dd796154f3fdc41c38467fc --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/en @@ -0,0 +1,8 @@ +name English (Great Britain) +language en-gb 2 +language en 2 + +maintainer Reece H. Dunn +status mature + +tunes s1 c1 q1 e1 diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/en-029 b/TTS/Piper/espeak-ng-data/lang/gmw/en-029 new file mode 100644 index 0000000000000000000000000000000000000000..493aae451c7859ed7b27afdc54ee37cf4926f78e --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/en-029 @@ -0,0 +1,20 @@ +name English (Caribbean) +language en-029 +language en 10 + +maintainer Reece H. Dunn +status mature + +phonemes en-wi +dictrules 8 +stressLength 175 175 175 175 220 220 250 290 + +replace 00 D d +replace 00 T t[ +replace 00 U@ o@ +replace 03 @ a# +replace 03 3 a# +replace 03 N n + +formant 1 98 100 100 +formant 2 98 100 100 diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-scotland b/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-scotland new file mode 100644 index 0000000000000000000000000000000000000000..a4655a0e8bf9190e36dbc574d6e4267ea118a35c --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-scotland @@ -0,0 +1,17 @@ +name English (Scotland) +language en-gb-scotland +language en 4 + +maintainer Reece H. Dunn +status mature + +phonemes en-sc +dictrules 2 5 6 7 +stressLength 180 130 200 200 0 0 250 270 + +replace 03 @ V +replace 03 I i +replace 03 I2 i +replace 01 aI aI2 +replace 02 a a/ +replace 02 u: U diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-gbclan b/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-gbclan new file mode 100644 index 0000000000000000000000000000000000000000..f54a06b7c662e1e7b558272f5bdaee8257bc52d9 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-gbclan @@ -0,0 +1,14 @@ +name English (Lancaster) +language en-gb-x-gbclan +language en-gb 3 +language en 5 + +maintainer Reece H. Dunn +status mature + +phonemes en-n + +stressLength 160 150 180 180 220 220 290 290 + +replace 03 N n +replace 03 i I2 diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-gbcwmd b/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-gbcwmd new file mode 100644 index 0000000000000000000000000000000000000000..1831f9a9643766087e447184bfb49a4eeba651dd --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-gbcwmd @@ -0,0 +1,12 @@ +name English (West Midlands) +language en-gb-x-gbcwmd +language en-gb 9 +language en 9 + +phonemes en-wm + +replace 00 h NULL +replace 00 o@ O@ +dictrules 6 +intonation 4 +stressAdd 0 0 0 0 0 0 0 20 diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-rp b/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-rp new file mode 100644 index 0000000000000000000000000000000000000000..fb72cf1f796d2a247121277ed6dad2324aeb094b --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/en-GB-x-rp @@ -0,0 +1,15 @@ +name English (Received Pronunciation) +language en-gb-x-rp +language en-gb 4 +language en 5 + +maintainer Reece H. Dunn +status mature + +phonemes en-rp + +replace 00 o@ O@ +replace 03 I i +replace 03 I2 i +replace 03 @ a# +replace 03 3 a# diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/en-US b/TTS/Piper/espeak-ng-data/lang/gmw/en-US new file mode 100644 index 0000000000000000000000000000000000000000..31db652b206219c5b66d6018144a4ff45fd663c9 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/en-US @@ -0,0 +1,15 @@ +name English (America) +language en-us 2 +language en 3 + +maintainer Reece H. Dunn +status mature + +phonemes en-us +dictrules 3 6 + +stressLength 140 120 190 170 0 0 255 300 +stressAmp 17 16 19 19 19 19 21 19 + +replace 03 I i +replace 03 I2 i diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/en-US-nyc b/TTS/Piper/espeak-ng-data/lang/gmw/en-US-nyc new file mode 100644 index 0000000000000000000000000000000000000000..2d76f88a0a8429d754cfeb1470011a7ec6bbd829 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/en-US-nyc @@ -0,0 +1,14 @@ +name English (America, New York City) +language en-us-nyc + +maintainer Richard Calvi +status testing + +phonemes en-us-nyc +dictrules 3 6 + +stressLength 140 120 190 170 0 0 255 300 +stressAmp 17 16 19 19 19 19 21 19 + +replace 03 I i +replace 03 I2 i diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/lb b/TTS/Piper/espeak-ng-data/lang/gmw/lb new file mode 100644 index 0000000000000000000000000000000000000000..79724594261cfe4f2d36b3f05813db963d67af30 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/lb @@ -0,0 +1,2 @@ +name Luxembourgish +language lb diff --git a/TTS/Piper/espeak-ng-data/lang/gmw/nl b/TTS/Piper/espeak-ng-data/lang/gmw/nl new file mode 100644 index 0000000000000000000000000000000000000000..a212fbef6256c1414d259aa3c3f3d1e4b2e3563c --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/gmw/nl @@ -0,0 +1,2 @@ +name Dutch +language nl diff --git a/TTS/Piper/espeak-ng-data/lang/grk/el b/TTS/Piper/espeak-ng-data/lang/grk/el new file mode 100644 index 0000000000000000000000000000000000000000..548a01bcf017abbcc46437941f28b108e2a56ec7 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/grk/el @@ -0,0 +1,2 @@ +name Greek +language el diff --git a/TTS/Piper/espeak-ng-data/lang/grk/grc b/TTS/Piper/espeak-ng-data/lang/grk/grc new file mode 100644 index 0000000000000000000000000000000000000000..baa8b2c691a46217c99e3c3d149257fe988ed84a --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/grk/grc @@ -0,0 +1,6 @@ +name Greek (Ancient) +language grc + +stressLength 170 170 190 190 0 0 230 240 +dictrules 1 +words 3 diff --git a/TTS/Piper/espeak-ng-data/lang/inc/as b/TTS/Piper/espeak-ng-data/lang/inc/as new file mode 100644 index 0000000000000000000000000000000000000000..23991ad7d3b0d0f31891290b5da62bb5ae2f1169 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/as @@ -0,0 +1,4 @@ +name Assamese +language as + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/inc/bn b/TTS/Piper/espeak-ng-data/lang/inc/bn new file mode 100644 index 0000000000000000000000000000000000000000..c79180269e431d6116bb97102f6301e881432e36 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/bn @@ -0,0 +1,2 @@ +name Bengali +language bn diff --git a/TTS/Piper/espeak-ng-data/lang/inc/bpy b/TTS/Piper/espeak-ng-data/lang/inc/bpy new file mode 100644 index 0000000000000000000000000000000000000000..b63bc8d1c67ae9d71fd53ea622c7ed04b9fcee31 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/bpy @@ -0,0 +1,2 @@ +name Bishnupriya Manipuri +language bpy diff --git a/TTS/Piper/espeak-ng-data/lang/inc/gu b/TTS/Piper/espeak-ng-data/lang/inc/gu new file mode 100644 index 0000000000000000000000000000000000000000..fcdacd21e9e98e4ca56adcea3a5c3b8ef61aa58b --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/gu @@ -0,0 +1,4 @@ +name Gujarati +language gu + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/inc/hi b/TTS/Piper/espeak-ng-data/lang/inc/hi new file mode 100644 index 0000000000000000000000000000000000000000..16ea3892959431fcb901c242525817669042a93f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/hi @@ -0,0 +1,2 @@ +name Hindi +language hi diff --git a/TTS/Piper/espeak-ng-data/lang/inc/kok b/TTS/Piper/espeak-ng-data/lang/inc/kok new file mode 100644 index 0000000000000000000000000000000000000000..f2b1cc53a8bfb04efb49712f013f615d6307eb4a --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/kok @@ -0,0 +1,2 @@ +name Konkani +language kok diff --git a/TTS/Piper/espeak-ng-data/lang/inc/mr b/TTS/Piper/espeak-ng-data/lang/inc/mr new file mode 100644 index 0000000000000000000000000000000000000000..d9181f908b6dd2a3767e0c89326d767bce3b5293 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/mr @@ -0,0 +1,4 @@ +name Marathi +language mr + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/inc/ne b/TTS/Piper/espeak-ng-data/lang/inc/ne new file mode 100644 index 0000000000000000000000000000000000000000..4b64cc2b0a8b934e3e789c3b82f618c178bbe4ae --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/ne @@ -0,0 +1,4 @@ +name Nepali +language ne + +dictrules 1 diff --git a/TTS/Piper/espeak-ng-data/lang/inc/or b/TTS/Piper/espeak-ng-data/lang/inc/or new file mode 100644 index 0000000000000000000000000000000000000000..95a990ecdc1f4fa0b267e03c32a6840ca0ecafa9 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/or @@ -0,0 +1,4 @@ +name Oriya +language or + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/inc/pa b/TTS/Piper/espeak-ng-data/lang/inc/pa new file mode 100644 index 0000000000000000000000000000000000000000..0e9552d33dcd14c7cd4f6aa244d1706c8ab2648e --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/pa @@ -0,0 +1,2 @@ +name Punjabi +language pa diff --git a/TTS/Piper/espeak-ng-data/lang/inc/sd b/TTS/Piper/espeak-ng-data/lang/inc/sd new file mode 100644 index 0000000000000000000000000000000000000000..51cf8afed21c85194fcbbbb2d253c894655645cd --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/sd @@ -0,0 +1,3 @@ +name Sindhi +language sd +maintainer Ejaz Shah diff --git a/TTS/Piper/espeak-ng-data/lang/inc/si b/TTS/Piper/espeak-ng-data/lang/inc/si new file mode 100644 index 0000000000000000000000000000000000000000..3f877191fce068307567db93ed671aec9092613d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/si @@ -0,0 +1,6 @@ +name Sinhala +language si + +status testing + +intonation 2 diff --git a/TTS/Piper/espeak-ng-data/lang/inc/ur b/TTS/Piper/espeak-ng-data/lang/inc/ur new file mode 100644 index 0000000000000000000000000000000000000000..16e546959d9037457ca27de709b12329f5ae5efd --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/inc/ur @@ -0,0 +1,7 @@ +name Urdu +language ur +maintainer Ejaz Shah +status testing + +stressRule 6 + diff --git a/TTS/Piper/espeak-ng-data/lang/ine/hy b/TTS/Piper/espeak-ng-data/lang/ine/hy new file mode 100644 index 0000000000000000000000000000000000000000..ee0be2fe32c29eb5b7d975eb85e5084a8864d90b --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/ine/hy @@ -0,0 +1,3 @@ +name Armenian (East Armenia) +language hy +language hy-arevela diff --git a/TTS/Piper/espeak-ng-data/lang/ine/hyw b/TTS/Piper/espeak-ng-data/lang/ine/hyw new file mode 100644 index 0000000000000000000000000000000000000000..9d5fe86badd04a69dba17abdcee4045c10279d77 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/ine/hyw @@ -0,0 +1,24 @@ +name Armenian (West Armenia) +language hyw +language hy-arevmda +language hy 8 + +dictionary hy +dictrules 1 + +phonemes hy + +// change consonants for West Armenian pronunciation +replace 00 b p# +replace 00 d t# +replace 00 dz ts# +replace 00 dZ tS# +replace 00 g k# + +replace 00 p b +replace 00 t d +replace 00 ts dz +replace 00 tS dZ +replace 00 k g + +replace 00 R2 R // ?? diff --git a/TTS/Piper/espeak-ng-data/lang/ine/sq b/TTS/Piper/espeak-ng-data/lang/ine/sq new file mode 100644 index 0000000000000000000000000000000000000000..9ace35766585509e735b71c888926b7c05b23cf0 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/ine/sq @@ -0,0 +1,5 @@ +name Albanian +language sq + +// add this line to remove 'ë' at the end of words +// replace 00 @/ NULL diff --git a/TTS/Piper/espeak-ng-data/lang/ira/fa b/TTS/Piper/espeak-ng-data/lang/ira/fa new file mode 100644 index 0000000000000000000000000000000000000000..5a0c2b6d05020a9f29a53de0eb225a8852686a85 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/ira/fa @@ -0,0 +1,4 @@ +name Persian +language fa +maintainer Shadyar Khodayari +status mature diff --git a/TTS/Piper/espeak-ng-data/lang/ira/fa-Latn b/TTS/Piper/espeak-ng-data/lang/ira/fa-Latn new file mode 100644 index 0000000000000000000000000000000000000000..02c6da6e1a88b492b021ef6f2b504181b2c9e05a --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/ira/fa-Latn @@ -0,0 +1,8 @@ +name Persian (Pinglish) +// Sometimes, Farsi speakers write Farsi words using English characters, particularly in Chat and SMS (texte messages).), called Pinglish +language fa-latn +maintainer Shadyar Khodayari +status mature +dictrules 1 +phonemes fa + diff --git a/TTS/Piper/espeak-ng-data/lang/ira/ku b/TTS/Piper/espeak-ng-data/lang/ira/ku new file mode 100644 index 0000000000000000000000000000000000000000..b26bca250fc3e03c23c345ad18e49303c6e15551 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/ira/ku @@ -0,0 +1,5 @@ +name Kurdish +language ku + +//words 1 48 + diff --git a/TTS/Piper/espeak-ng-data/lang/iro/chr b/TTS/Piper/espeak-ng-data/lang/iro/chr new file mode 100644 index 0000000000000000000000000000000000000000..abe29382383b120877a30e5eba19ee1f85362789 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/iro/chr @@ -0,0 +1,27 @@ +name Cherokee //https://github.com/espeak-ng/espeak-ng/blob/master/docs/voices.md +language chr-US-Qaaa-x-west 5 + +maintainer Michael Conrad +status testing + +pitch 90 160 + +voicing 100 + +consonants 100 100 + +speed 100 + +words 2 1 + +phonemes chr + +//stress on all syllables to simulate stress on no syllables +stressRule 9 +stressLength 175 175 175 175 175 175 175 175 //all vowels the same length regardless of stress +stressAmp 10 10 10 10 10 10 10 10 //all vowels the same strength regardless of marked stress + +intonation 1 + +tunes chrs chrc chrq chre + diff --git a/TTS/Piper/espeak-ng-data/lang/itc/la b/TTS/Piper/espeak-ng-data/lang/itc/la new file mode 100644 index 0000000000000000000000000000000000000000..c57270f92de40f4002bcfd7066bbe1b952b816af --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/itc/la @@ -0,0 +1,12 @@ +name Latin +language la +stressRule 2 0 2 +// rule=penultimate +// unstressed_wd1=0 +// unstressed_wd2=2 +stressOpt 0 5 // flags=0100001 (no automatic secondary stress + don't stres monosyllables) + +// short gap between words +words 2 + +// Note: The Latin voice needs long vowels to be marked with macrons diff --git a/TTS/Piper/espeak-ng-data/lang/jpx/ja b/TTS/Piper/espeak-ng-data/lang/jpx/ja new file mode 100644 index 0000000000000000000000000000000000000000..20e21a1e9bdb38913ece9d00324add13579988fc --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/jpx/ja @@ -0,0 +1,5 @@ +name Japanese +language ja +phonemes ja + +intonation 4 diff --git a/TTS/Piper/espeak-ng-data/lang/ko b/TTS/Piper/espeak-ng-data/lang/ko new file mode 100644 index 0000000000000000000000000000000000000000..f03ba091b68d61453dcdac7e5a6cbc8c88cdc4da --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/ko @@ -0,0 +1,5 @@ +name Korean +language ko +pitch 80 118 +intonation 2 + diff --git a/TTS/Piper/espeak-ng-data/lang/map/haw b/TTS/Piper/espeak-ng-data/lang/map/haw new file mode 100644 index 0000000000000000000000000000000000000000..c0869132769f42249d01d08d01cb5ddbdfff6a33 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/map/haw @@ -0,0 +1,3 @@ +name Hawaiian +language haw +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/miz/mto b/TTS/Piper/espeak-ng-data/lang/miz/mto new file mode 100644 index 0000000000000000000000000000000000000000..eb0f75ff5b53f51aeadefd08bda1f1ba5330c1c5 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/miz/mto @@ -0,0 +1,8 @@ +name Totontepec Mixe +language mto + +maintainer Bill Dengler and Elizabeth Resendiz +status testing + +lowercaseSentence +tunes s6 c6 q6 e6 diff --git a/TTS/Piper/espeak-ng-data/lang/myn/quc b/TTS/Piper/espeak-ng-data/lang/myn/quc new file mode 100644 index 0000000000000000000000000000000000000000..e8e0ec6bc2d2d70224ca65ab579ca5f9ac7f215e --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/myn/quc @@ -0,0 +1,6 @@ +name K'iche' +language quc +status testing +stressRule 3 // stress on final syllable +stressAmp 8 8 20 15 0 0 25 25 // reduce unstressed vowels +stressLength 120 120 200 150 0 0 250 250 // reduce unstressed vowels diff --git a/TTS/Piper/espeak-ng-data/lang/poz/id b/TTS/Piper/espeak-ng-data/lang/poz/id new file mode 100644 index 0000000000000000000000000000000000000000..d300372fbad3479491f79303c9021445f9c3d096 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/poz/id @@ -0,0 +1,7 @@ +name Indonesian +language id + +stressLength 160 200 180 180 0 0 220 240 +stressAmp 16 18 18 18 0 0 22 21 + +consonants 80 80 diff --git a/TTS/Piper/espeak-ng-data/lang/poz/mi b/TTS/Piper/espeak-ng-data/lang/poz/mi new file mode 100644 index 0000000000000000000000000000000000000000..fa1c71eb7dc334e3aaacf83722ea1aecc6c6acc7 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/poz/mi @@ -0,0 +1,21 @@ +name Māori +language mi +status testing + +// https://github.com/espeak-ng/espeak-ng/blob/master/docs/voices.md#words +words 1 2 + +// taken from Jacky +pitch 115 130 + +formant 0 150 155 100 +formant 1 90 155 70 +formant 2 95 70 64 +formant 3 15 20 30 +formant 4 20 30 40 +formant 5 65 20 65 +formant 6 70 80 100 +formant 7 20 80 100 +formant 8 100 95 80 +voicing 135 +consonants 110 diff --git a/TTS/Piper/espeak-ng-data/lang/poz/ms b/TTS/Piper/espeak-ng-data/lang/poz/ms new file mode 100644 index 0000000000000000000000000000000000000000..27a2712af2df7835b414597dd065e3a6d6bf46bb --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/poz/ms @@ -0,0 +1,14 @@ +// Last updated: 14 October 2010, Jason Ong (jason@portalgroove.com) +name Malay +language ms +phonemes id + +stressLength 160 200 180 180 0 0 220 240 +stressAmp 16 18 18 18 0 0 22 21 +intonation 3 // Less intonation, and comma does not raise the pitch. + +// Nuance - Peninsula Malaysia +// replace 3 a @ // change 'saya' to 'saye' + // (only the last phoneme of a word, only in unstressed syllables) + +consonants 80 80 diff --git a/TTS/Piper/espeak-ng-data/lang/qu b/TTS/Piper/espeak-ng-data/lang/qu new file mode 100644 index 0000000000000000000000000000000000000000..aa717f296f4547dddc289569301231f41ae1c543 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/qu @@ -0,0 +1,5 @@ +name Quechua +language qu +stressRule 2 // stress on penultimate syllable +status testing + diff --git a/TTS/Piper/espeak-ng-data/lang/roa/an b/TTS/Piper/espeak-ng-data/lang/roa/an new file mode 100644 index 0000000000000000000000000000000000000000..dc75aa8e82ebb38baec6510dc5fb929b9d1880a0 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/an @@ -0,0 +1,2 @@ +name Aragonese +language an diff --git a/TTS/Piper/espeak-ng-data/lang/roa/ca b/TTS/Piper/espeak-ng-data/lang/roa/ca new file mode 100644 index 0000000000000000000000000000000000000000..54af356f7a222827df6f870679182d12af2e6dde --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/ca @@ -0,0 +1,2 @@ +name Catalan +language ca diff --git a/TTS/Piper/espeak-ng-data/lang/roa/es b/TTS/Piper/espeak-ng-data/lang/roa/es new file mode 100644 index 0000000000000000000000000000000000000000..dc90e41c64f2e89713bd2e1cf06bd30c31227579 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/es @@ -0,0 +1,4 @@ +name Spanish (Spain) +language es +dictrules 1 +tunes s6 c6 q6 e6 diff --git a/TTS/Piper/espeak-ng-data/lang/roa/es-419 b/TTS/Piper/espeak-ng-data/lang/roa/es-419 new file mode 100644 index 0000000000000000000000000000000000000000..236bef0bf68d7ac1c887295714cefd2164b29a7d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/es-419 @@ -0,0 +1,11 @@ +name Spanish (Latin America) +language es-419 +language es-mx 6 + +phonemes es-la +dictrules 2 +intonation 2 +stressLength 170 200 230 180 0 0 250 280 + +tunes s6 c6 q6 e6 + diff --git a/TTS/Piper/espeak-ng-data/lang/roa/fr b/TTS/Piper/espeak-ng-data/lang/roa/fr new file mode 100644 index 0000000000000000000000000000000000000000..9e0b9440c5419b5f26ad9e845b35e7c9cc1b3a94 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/fr @@ -0,0 +1,6 @@ +name French (France) +language fr-fr +language fr + +dictrules 1 +tunes s3 c3 q3 e3 diff --git a/TTS/Piper/espeak-ng-data/lang/roa/fr-BE b/TTS/Piper/espeak-ng-data/lang/roa/fr-BE new file mode 100644 index 0000000000000000000000000000000000000000..1a0311f94ffc2514ab6128b2e771441bf6eb7464 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/fr-BE @@ -0,0 +1,8 @@ +name French (Belgium) +language fr-be +language fr 8 + +dictrules 2 +tunes s3 c3 q3 e3 + + diff --git a/TTS/Piper/espeak-ng-data/lang/roa/fr-CH b/TTS/Piper/espeak-ng-data/lang/roa/fr-CH new file mode 100644 index 0000000000000000000000000000000000000000..2e45fbd1903431ea4c34fac94d1ae4b9d76f441d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/fr-CH @@ -0,0 +1,6 @@ +name French (Switzerland) +language fr-ch +language fr 8 + +dictrules 3 +tunes s3 c3 q3 e3 diff --git a/TTS/Piper/espeak-ng-data/lang/roa/ht b/TTS/Piper/espeak-ng-data/lang/roa/ht new file mode 100644 index 0000000000000000000000000000000000000000..8b5722584c03f947ed0eac26f0fd327121576551 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/ht @@ -0,0 +1,8 @@ +name Haitian Creole +language ht +status testing +maintainer // TODO somebody should take responsibility for this + +phonemes ht +dictionary ht + diff --git a/TTS/Piper/espeak-ng-data/lang/roa/it b/TTS/Piper/espeak-ng-data/lang/roa/it new file mode 100644 index 0000000000000000000000000000000000000000..ad7bb50e6016183958c9de74c9205aba749800d7 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/it @@ -0,0 +1,7 @@ +name Italian +language it + +maintainer Christian Leo M +status mature + +tunes s4 c4 q4 e4 diff --git a/TTS/Piper/espeak-ng-data/lang/roa/pap b/TTS/Piper/espeak-ng-data/lang/roa/pap new file mode 100644 index 0000000000000000000000000000000000000000..b9e07fe03ecd05f481609a84a38dddfafaf45c86 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/pap @@ -0,0 +1,7 @@ +name Papiamento +language pap + +status testing + +phonemes base2 + diff --git a/TTS/Piper/espeak-ng-data/lang/roa/pt b/TTS/Piper/espeak-ng-data/lang/roa/pt new file mode 100644 index 0000000000000000000000000000000000000000..5041b511e1a584c3aabc742c9637ea4f1b20e2a6 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/pt @@ -0,0 +1,7 @@ +name Portuguese (Portugal) +language pt +language pt-pt +phonemes pt-pt + +dictrules 1 +intonation 2 diff --git a/TTS/Piper/espeak-ng-data/lang/roa/pt-BR b/TTS/Piper/espeak-ng-data/lang/roa/pt-BR new file mode 100644 index 0000000000000000000000000000000000000000..52b850c38e0751b369fdd108ae411ce6ab9bd6b1 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/pt-BR @@ -0,0 +1,7 @@ +name Portuguese (Brazil) +language pt-br +language pt 6 + +dictrules 2 +stressLength 200 115 230 230 0 0 250 270 + diff --git a/TTS/Piper/espeak-ng-data/lang/roa/ro b/TTS/Piper/espeak-ng-data/lang/roa/ro new file mode 100644 index 0000000000000000000000000000000000000000..94441efe88d71f8f7d3494eed80e78bde348577d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/roa/ro @@ -0,0 +1,2 @@ +name Romanian +language ro diff --git a/TTS/Piper/espeak-ng-data/lang/sai/gn b/TTS/Piper/espeak-ng-data/lang/sai/gn new file mode 100644 index 0000000000000000000000000000000000000000..6e183e5aea08c2eb43d57ea9e58fcc07bb1e41f7 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sai/gn @@ -0,0 +1,4 @@ +name Guarani +language gn +dictrules 1 +words 0 1 diff --git a/TTS/Piper/espeak-ng-data/lang/sem/am b/TTS/Piper/espeak-ng-data/lang/sem/am new file mode 100644 index 0000000000000000000000000000000000000000..87ed65a3a8aaf31050cd221ba1a3e26fdc9d88ce --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sem/am @@ -0,0 +1,4 @@ +name Amharic +language am + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/sem/ar b/TTS/Piper/espeak-ng-data/lang/sem/ar new file mode 100644 index 0000000000000000000000000000000000000000..5219808639e8f00f3074c0122b8c9e4941cb7705 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sem/ar @@ -0,0 +1,5 @@ +name Arabic +language ar +phonemes ar + +stressRule 4 diff --git a/TTS/Piper/espeak-ng-data/lang/sem/he b/TTS/Piper/espeak-ng-data/lang/sem/he new file mode 100644 index 0000000000000000000000000000000000000000..38cce90a6b877a7e0587ff467a2dc595587ecdfc --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sem/he @@ -0,0 +1,4 @@ +name Hebrew +language he + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/sem/mt b/TTS/Piper/espeak-ng-data/lang/sem/mt new file mode 100644 index 0000000000000000000000000000000000000000..ea8a3fce48af567f0426c8c6aecde0b9748cdf35 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sem/mt @@ -0,0 +1,4 @@ +name Maltese +language mt + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/sit/cmn b/TTS/Piper/espeak-ng-data/lang/sit/cmn new file mode 100644 index 0000000000000000000000000000000000000000..451016d7a1354467aa592dc438ebb0d9ce164252 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sit/cmn @@ -0,0 +1,36 @@ +name Chinese (Mandarin, latin as English) +language cmn +language zh-cmn +language zh + +phonemes cmn +dictionary cmn +words 1 +pitch 80 118 + +dict_min 100000 + +//for some dialects + +//[en]: replace ng with n +//[zh]: �޺�������ng���n +//replace 0 N n + +//[en]: replace rfx consonants +//[zh]: �޾�������r���l��z��er���e +//replace 0 ts.h tsh +//replace 0 ts. ts +//replace 0 s. s +//replace 0 i. i[ +//replace 0 z. l +//replace 0 z. z +//replace 0 @r @ + +//[en]: replace beginning n or l +//[zh]: ����nl��n���l��l���n +//replace 2 n l +//replace 2 l n + +//[en]: replace beginning w with v +//[zh]: w���v +//replace 0 w v diff --git a/TTS/Piper/espeak-ng-data/lang/sit/cmn-Latn-pinyin b/TTS/Piper/espeak-ng-data/lang/sit/cmn-Latn-pinyin new file mode 100644 index 0000000000000000000000000000000000000000..4b63db71687d812168078e5d02341db7381eff74 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sit/cmn-Latn-pinyin @@ -0,0 +1,11 @@ +name Chinese (Mandarin, latin as Pinyin) +language cmn-latn-pinyin +language zh-cmn +language zh + +phonemes cmn +dictionary cmn +words 1 +pitch 80 118 + +dict_min 100000 diff --git a/TTS/Piper/espeak-ng-data/lang/sit/hak b/TTS/Piper/espeak-ng-data/lang/sit/hak new file mode 100644 index 0000000000000000000000000000000000000000..0c3bf14c6008798929d4362b09e0b2abb302c4a2 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sit/hak @@ -0,0 +1,6 @@ +name Hakka Chinese +language hak +maintainer Chen Chien-ting +status testing +phonemes hak +dictionary hak diff --git a/TTS/Piper/espeak-ng-data/lang/sit/my b/TTS/Piper/espeak-ng-data/lang/sit/my new file mode 100644 index 0000000000000000000000000000000000000000..3dbc767a878f06e5602f778f2172772e8d784f05 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sit/my @@ -0,0 +1,3 @@ +name Myanmar (Burmese) +maintainer Min Maung +language my diff --git a/TTS/Piper/espeak-ng-data/lang/sit/yue b/TTS/Piper/espeak-ng-data/lang/sit/yue new file mode 100644 index 0000000000000000000000000000000000000000..d65fac1f0c08dd9bc6990324fdce98ff1078fa6e --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sit/yue @@ -0,0 +1,13 @@ +name Chinese (Cantonese) +language yue +language zh-yue +language zh 8 + +phonemes yue +dictionary yue + +// interpret English letters as 1=English words, 2=jyutping +dictrules 1 + +words 1 +dict_min 10000 diff --git a/TTS/Piper/espeak-ng-data/lang/sit/yue-Latn-jyutping b/TTS/Piper/espeak-ng-data/lang/sit/yue-Latn-jyutping new file mode 100644 index 0000000000000000000000000000000000000000..2324cd7df408adfe2f2355a54019d2a8469c0236 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/sit/yue-Latn-jyutping @@ -0,0 +1,13 @@ +name Chinese (Cantonese, latin as Jyutping) +language yue +language zh-yue +language zh 8 + +phonemes yue +dictionary yue + +// interpret English letters as 1=English words, 2=jyutping +dictrules 2 + +words 1 +dict_min 10000 diff --git a/TTS/Piper/espeak-ng-data/lang/tai/shn b/TTS/Piper/espeak-ng-data/lang/tai/shn new file mode 100644 index 0000000000000000000000000000000000000000..8d30384d1d1eb4ecf24e81d19575d08ac1dbd97b --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/tai/shn @@ -0,0 +1,4 @@ +name Shan (Tai Yai) +language shn +maintainer ronaldaug +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/tai/th b/TTS/Piper/espeak-ng-data/lang/tai/th new file mode 100644 index 0000000000000000000000000000000000000000..9b337c1390bf22f8c5aed27c793b32c8b85877aa --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/tai/th @@ -0,0 +1,3 @@ +name Thai +language th +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/trk/az b/TTS/Piper/espeak-ng-data/lang/trk/az new file mode 100644 index 0000000000000000000000000000000000000000..fd9e4f33e8eee103bf5feef32bf8a7f793e5588a --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/az @@ -0,0 +1,4 @@ +name Azerbaijani +language az + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/trk/ba b/TTS/Piper/espeak-ng-data/lang/trk/ba new file mode 100644 index 0000000000000000000000000000000000000000..09fab4805761e10f099deb423dd5ce4aca17a347 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/ba @@ -0,0 +1,2 @@ +name Bashkir +language ba diff --git a/TTS/Piper/espeak-ng-data/lang/trk/cv b/TTS/Piper/espeak-ng-data/lang/trk/cv new file mode 100644 index 0000000000000000000000000000000000000000..44e37f676fc6e4e5a4d904ebf8d0c05740e4bbaf --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/cv @@ -0,0 +1,3 @@ +name Chuvash +language cv +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/trk/kk b/TTS/Piper/espeak-ng-data/lang/trk/kk new file mode 100644 index 0000000000000000000000000000000000000000..df3b0a0784c307e2eabe389922b08a2c606814bc --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/kk @@ -0,0 +1,4 @@ +name Kazakh +language kk +status testing + diff --git a/TTS/Piper/espeak-ng-data/lang/trk/ky b/TTS/Piper/espeak-ng-data/lang/trk/ky new file mode 100644 index 0000000000000000000000000000000000000000..c031449e81bc81a8dd70031b88ad03939e3de51e --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/ky @@ -0,0 +1,4 @@ +name Kyrgyz +language ky + +tunes s3 c3 q3 e3 diff --git a/TTS/Piper/espeak-ng-data/lang/trk/nog b/TTS/Piper/espeak-ng-data/lang/trk/nog new file mode 100644 index 0000000000000000000000000000000000000000..691d0310678e3625a64090760b314ae18c94d017 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/nog @@ -0,0 +1,3 @@ +name Nogai +language nog +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/trk/tk b/TTS/Piper/espeak-ng-data/lang/trk/tk new file mode 100644 index 0000000000000000000000000000000000000000..795413a3b3a83f58d6035e7b72a6e72898e6af24 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/tk @@ -0,0 +1,2 @@ +name Turkmen +language tk diff --git a/TTS/Piper/espeak-ng-data/lang/trk/tr b/TTS/Piper/espeak-ng-data/lang/trk/tr new file mode 100644 index 0000000000000000000000000000000000000000..1d5cbc4955a00a20d5d2444edfa60b861c43ed77 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/tr @@ -0,0 +1,2 @@ +name Turkish +language tr diff --git a/TTS/Piper/espeak-ng-data/lang/trk/tt b/TTS/Piper/espeak-ng-data/lang/trk/tt new file mode 100644 index 0000000000000000000000000000000000000000..10ebba4c1c47d91b99a9f4f0914b9a69bf539325 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/tt @@ -0,0 +1,2 @@ +name Tatar +language tt diff --git a/TTS/Piper/espeak-ng-data/lang/trk/ug b/TTS/Piper/espeak-ng-data/lang/trk/ug new file mode 100644 index 0000000000000000000000000000000000000000..f81b44fc01eee002d8d11cb7eda9a872fb67a5ac --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/ug @@ -0,0 +1,2 @@ +name Uyghur +language ug diff --git a/TTS/Piper/espeak-ng-data/lang/trk/uz b/TTS/Piper/espeak-ng-data/lang/trk/uz new file mode 100644 index 0000000000000000000000000000000000000000..b1a7586c0368b48da098d88cfc9185c029089b71 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/trk/uz @@ -0,0 +1,4 @@ +name Uzbek +language uz + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/urj/et b/TTS/Piper/espeak-ng-data/lang/urj/et new file mode 100644 index 0000000000000000000000000000000000000000..096565f971760a3d951cd8052f6a257c226e7c76 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/urj/et @@ -0,0 +1,10 @@ +name Estonian +language et + +stressAmp 18 16 22 22 20 22 22 22 +stressLength 150 180 200 200 0 0 210 250 +stressOpt 1 2 4 6 // (S_NO_DIM + S_FINAL_DIM = S_FINAL_DIM_ONLY), S_FINAL_NO_2, S_2_TO_HEAVY +stressRule 0 + +intonation 3 +spellingStress diff --git a/TTS/Piper/espeak-ng-data/lang/urj/fi b/TTS/Piper/espeak-ng-data/lang/urj/fi new file mode 100644 index 0000000000000000000000000000000000000000..fe2447c897fc16c4e4e5cf1b851c2fec61fbefc0 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/urj/fi @@ -0,0 +1,11 @@ +name Finnish +language fi + + +stressAmp 18 16 22 22 20 22 22 22 +stressLength 150 180 200 200 0 0 210 250 +stressOpt 1 2 4 6 // (S_NO_DIM + S_FINAL_DIM = S_FINAL_DIM_ONLY), S_FINAL_NO_2, S_2_TO_HEAVY +stressRule 0 + +intonation 3 +spellingStress diff --git a/TTS/Piper/espeak-ng-data/lang/urj/hu b/TTS/Piper/espeak-ng-data/lang/urj/hu new file mode 100644 index 0000000000000000000000000000000000000000..f5bb295851500cfdc971cc93596c1f4b186291ab --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/urj/hu @@ -0,0 +1,7 @@ +name Hungarian +language hu +brackets 0 +bracketsAnnounced 0 +pitch 81 117 + + diff --git a/TTS/Piper/espeak-ng-data/lang/urj/smj b/TTS/Piper/espeak-ng-data/lang/urj/smj new file mode 100644 index 0000000000000000000000000000000000000000..316559cf378436760a7520902bfb85d9f2bc34f3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/urj/smj @@ -0,0 +1,4 @@ +name Lule Saami +language smj + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/zle/be b/TTS/Piper/espeak-ng-data/lang/zle/be new file mode 100644 index 0000000000000000000000000000000000000000..31b14e53dd60db67d99416d420361d77c364a383 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zle/be @@ -0,0 +1,4 @@ +name Belarusian +language be +dict_min 2000 +speed 95 diff --git a/TTS/Piper/espeak-ng-data/lang/zle/ru b/TTS/Piper/espeak-ng-data/lang/zle/ru new file mode 100644 index 0000000000000000000000000000000000000000..959754b6505a7e1145b202f4c2e09634a1530e66 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zle/ru @@ -0,0 +1,4 @@ +name Russian +language ru +replace 03 a a# +dict_min 20000 diff --git a/TTS/Piper/espeak-ng-data/lang/zle/ru-LV b/TTS/Piper/espeak-ng-data/lang/zle/ru-LV new file mode 100644 index 0000000000000000000000000000000000000000..fc9541baaf612902e3736d5102d4c84a4f7cd4db --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zle/ru-LV @@ -0,0 +1,16 @@ +name Russian (Latvia) +language ru-lv 2 + +maintainer Valdis Vitolins +status testing + +phonemes ru-lv +dictrules 2 +dict_min 20000 +speed 95 + +words 0 2 +tone 150 220 450 255 750 20 3500 255 +stressAmp 12 10 8 8 0 0 16 17 +stressLength 160 140 200 140 0 0 240 160 + diff --git a/TTS/Piper/espeak-ng-data/lang/zle/ru-cl b/TTS/Piper/espeak-ng-data/lang/zle/ru-cl new file mode 100644 index 0000000000000000000000000000000000000000..ad100cafdc6eec479c14d8a57b9a242ab6d7f1c0 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zle/ru-cl @@ -0,0 +1,6 @@ +name Russian (Classic) +language ru-cl +replace 03 a a# +dict_min 20000 +speed 95 +dictrules 3 diff --git a/TTS/Piper/espeak-ng-data/lang/zle/uk b/TTS/Piper/espeak-ng-data/lang/zle/uk new file mode 100644 index 0000000000000000000000000000000000000000..b318c235d93d4d22d552035079d2ba26aa06ce45 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zle/uk @@ -0,0 +1,7 @@ +name Ukrainian +language uk + +maintainer Andrij Mizyk +status testing + +speed 80 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/lang/zls/bg b/TTS/Piper/espeak-ng-data/lang/zls/bg new file mode 100644 index 0000000000000000000000000000000000000000..870c04240ab42c5612bc95c406dfa6dae916faa5 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zls/bg @@ -0,0 +1,5 @@ +name Bulgarian +language bg + +stressAmp 13 12 17 17 20 22 22 21 +stressLength 180 170 200 200 200 200 210 220 diff --git a/TTS/Piper/espeak-ng-data/lang/zls/bs b/TTS/Piper/espeak-ng-data/lang/zls/bs new file mode 100644 index 0000000000000000000000000000000000000000..01fd1746e0ca156928f5298484372656e3411c0d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zls/bs @@ -0,0 +1,14 @@ +name Bosnian +language bs +phonemes hr + +pitch 81 120 +formant 0 100 100 100 +formant 1 97 97 100 +formant 2 97 97 100 +formant 3 97 102 100 +formant 4 97 102 100 +formant 5 97 102 100 + +stressAdd 10 10 0 0 0 0 -30 -30 +dictrules 3 4 diff --git a/TTS/Piper/espeak-ng-data/lang/zls/hr b/TTS/Piper/espeak-ng-data/lang/zls/hr new file mode 100644 index 0000000000000000000000000000000000000000..d1cae3a3fb7f244adad4f032c8f4d144e4f66d16 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zls/hr @@ -0,0 +1,15 @@ +name Croatian +language hr +language hbs + +// attributes towards !variant3 +pitch 81 120 +formant 0 100 100 100 +formant 1 97 97 100 +formant 2 97 97 100 +formant 3 97 102 100 +formant 4 97 102 100 +formant 5 97 102 100 + +stressAdd 10 10 0 0 0 0 -30 -30 +dictrules 1 diff --git a/TTS/Piper/espeak-ng-data/lang/zls/mk b/TTS/Piper/espeak-ng-data/lang/zls/mk new file mode 100644 index 0000000000000000000000000000000000000000..380c20b6c29d79708915eecd2d796a79ca400add --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zls/mk @@ -0,0 +1,2 @@ +name Macedonian +language mk diff --git a/TTS/Piper/espeak-ng-data/lang/zls/sl b/TTS/Piper/espeak-ng-data/lang/zls/sl new file mode 100644 index 0000000000000000000000000000000000000000..b7bf01f233519061fb6b054ddba2f609105a6248 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zls/sl @@ -0,0 +1,4 @@ +name Slovenian +language sl + +status testing diff --git a/TTS/Piper/espeak-ng-data/lang/zls/sr b/TTS/Piper/espeak-ng-data/lang/zls/sr new file mode 100644 index 0000000000000000000000000000000000000000..81e339072d93c67752fb72e129ec87158ccf0bc6 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zls/sr @@ -0,0 +1,13 @@ +name Serbian +language sr + +// attributes towards !variant3 pitch 80 120 +formant 0 100 100 100 +formant 1 97 97 100 +formant 2 97 97 100 +formant 3 97 102 100 +formant 4 97 102 100 +formant 5 97 102 100 + +stressAdd 10 10 0 0 0 0 -30 -30 +dictrules 2 4 diff --git a/TTS/Piper/espeak-ng-data/lang/zlw/cs b/TTS/Piper/espeak-ng-data/lang/zlw/cs new file mode 100644 index 0000000000000000000000000000000000000000..5c3bf2ac5b9c7ac39154b6890d8b0641597e6c77 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zlw/cs @@ -0,0 +1,2 @@ +name Czech +language cs diff --git a/TTS/Piper/espeak-ng-data/lang/zlw/pl b/TTS/Piper/espeak-ng-data/lang/zlw/pl new file mode 100644 index 0000000000000000000000000000000000000000..b85f56be3585e926bd8f5c26ce3309e3936904c5 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zlw/pl @@ -0,0 +1,4 @@ +name Polish +language pl + +intonation 2 diff --git a/TTS/Piper/espeak-ng-data/lang/zlw/sk b/TTS/Piper/espeak-ng-data/lang/zlw/sk new file mode 100644 index 0000000000000000000000000000000000000000..e849e61be357d0776423541b59486258019c5c06 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lang/zlw/sk @@ -0,0 +1,2 @@ +name Slovak +language sk diff --git a/TTS/Piper/espeak-ng-data/lb_dict b/TTS/Piper/espeak-ng-data/lb_dict new file mode 100644 index 0000000000000000000000000000000000000000..e0d4ac64a7aba0f34e3a5ee5a6206158dd207ec6 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/lb_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d819a062b9722334f187540d3530fac1de365cd200d4a466f5ecccd7e3c05772 +size 687931 diff --git a/TTS/Piper/espeak-ng-data/lfn_dict b/TTS/Piper/espeak-ng-data/lfn_dict new file mode 100644 index 0000000000000000000000000000000000000000..9a8d4f89e88ae4d7393710888fc10f2d8ef0b8fc Binary files /dev/null and b/TTS/Piper/espeak-ng-data/lfn_dict differ diff --git a/TTS/Piper/espeak-ng-data/lt_dict b/TTS/Piper/espeak-ng-data/lt_dict new file mode 100644 index 0000000000000000000000000000000000000000..d0dd29f6ea77d2b94c36b9166fbb2a22d692c81e Binary files /dev/null and b/TTS/Piper/espeak-ng-data/lt_dict differ diff --git a/TTS/Piper/espeak-ng-data/lv_dict b/TTS/Piper/espeak-ng-data/lv_dict new file mode 100644 index 0000000000000000000000000000000000000000..60d70b1b1b54cb8632e35bc36c53fd846ce599c1 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/lv_dict differ diff --git a/TTS/Piper/espeak-ng-data/mi_dict b/TTS/Piper/espeak-ng-data/mi_dict new file mode 100644 index 0000000000000000000000000000000000000000..b727a301324d4e90fd0740817782e0ed225f1fc0 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/mi_dict differ diff --git a/TTS/Piper/espeak-ng-data/mk_dict b/TTS/Piper/espeak-ng-data/mk_dict new file mode 100644 index 0000000000000000000000000000000000000000..974626c1cbbb5b8bee5747c21564e78337d123ef Binary files /dev/null and b/TTS/Piper/espeak-ng-data/mk_dict differ diff --git a/TTS/Piper/espeak-ng-data/ml_dict b/TTS/Piper/espeak-ng-data/ml_dict new file mode 100644 index 0000000000000000000000000000000000000000..e12f2227eaa41462dc68773a017848077aa53f8d Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ml_dict differ diff --git a/TTS/Piper/espeak-ng-data/mr_dict b/TTS/Piper/espeak-ng-data/mr_dict new file mode 100644 index 0000000000000000000000000000000000000000..2cbf14d5fdd463d6d462dcbdebe5cd8f0cc93756 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/mr_dict differ diff --git a/TTS/Piper/espeak-ng-data/ms_dict b/TTS/Piper/espeak-ng-data/ms_dict new file mode 100644 index 0000000000000000000000000000000000000000..cb6fc297422570bc91527189f21e5934538c9518 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ms_dict differ diff --git a/TTS/Piper/espeak-ng-data/mt_dict b/TTS/Piper/espeak-ng-data/mt_dict new file mode 100644 index 0000000000000000000000000000000000000000..8cc965b99b13ded3613a50590619c7221549ec56 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/mt_dict differ diff --git a/TTS/Piper/espeak-ng-data/mto_dict b/TTS/Piper/espeak-ng-data/mto_dict new file mode 100644 index 0000000000000000000000000000000000000000..280aaa44bb6da6170c5e02976cbf75dfbad03625 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/mto_dict differ diff --git a/TTS/Piper/espeak-ng-data/my_dict b/TTS/Piper/espeak-ng-data/my_dict new file mode 100644 index 0000000000000000000000000000000000000000..ca129b40c04176cbfcf5a648a80c6f01df426ad4 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/my_dict differ diff --git a/TTS/Piper/espeak-ng-data/nci_dict b/TTS/Piper/espeak-ng-data/nci_dict new file mode 100644 index 0000000000000000000000000000000000000000..4f001af82d7471b97f9a776c7633dee7f7bb6269 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/nci_dict differ diff --git a/TTS/Piper/espeak-ng-data/ne_dict b/TTS/Piper/espeak-ng-data/ne_dict new file mode 100644 index 0000000000000000000000000000000000000000..fa8e29c609530624870c1fdf6b1b1f8713193735 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ne_dict differ diff --git a/TTS/Piper/espeak-ng-data/nl_dict b/TTS/Piper/espeak-ng-data/nl_dict new file mode 100644 index 0000000000000000000000000000000000000000..4b371b1c73aec6dd6a3d0080d679617ab4f7d998 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/nl_dict differ diff --git a/TTS/Piper/espeak-ng-data/no_dict b/TTS/Piper/espeak-ng-data/no_dict new file mode 100644 index 0000000000000000000000000000000000000000..e1805fac18fbe948e8e4438d8954125878f25ded Binary files /dev/null and b/TTS/Piper/espeak-ng-data/no_dict differ diff --git a/TTS/Piper/espeak-ng-data/nog_dict b/TTS/Piper/espeak-ng-data/nog_dict new file mode 100644 index 0000000000000000000000000000000000000000..0819a517441ad972c5febb7023c2e2da93ffcc3d Binary files /dev/null and b/TTS/Piper/espeak-ng-data/nog_dict differ diff --git a/TTS/Piper/espeak-ng-data/om_dict b/TTS/Piper/espeak-ng-data/om_dict new file mode 100644 index 0000000000000000000000000000000000000000..81fa80d2f63b62c18c8ce10decaee07d6a8c2867 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/om_dict differ diff --git a/TTS/Piper/espeak-ng-data/or_dict b/TTS/Piper/espeak-ng-data/or_dict new file mode 100644 index 0000000000000000000000000000000000000000..ad2d1919f9fadaceaa17095988d133823de2106d Binary files /dev/null and b/TTS/Piper/espeak-ng-data/or_dict differ diff --git a/TTS/Piper/espeak-ng-data/pa_dict b/TTS/Piper/espeak-ng-data/pa_dict new file mode 100644 index 0000000000000000000000000000000000000000..08485ee87895c16e6f4296b325e1f2cc7c16338c Binary files /dev/null and b/TTS/Piper/espeak-ng-data/pa_dict differ diff --git a/TTS/Piper/espeak-ng-data/pap_dict b/TTS/Piper/espeak-ng-data/pap_dict new file mode 100644 index 0000000000000000000000000000000000000000..3fccee67864fc213bbd1a57fa9c9a778a201eb17 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/pap_dict differ diff --git a/TTS/Piper/espeak-ng-data/phondata b/TTS/Piper/espeak-ng-data/phondata new file mode 100644 index 0000000000000000000000000000000000000000..b03cfdc01e6684db55fa88c472465a74931d9849 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/phondata @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e0288957874029a8c3c9f41a8f517ad4bf18127046decbdd4b9d1d6807ce3a3 +size 550424 diff --git a/TTS/Piper/espeak-ng-data/phondata-manifest b/TTS/Piper/espeak-ng-data/phondata-manifest new file mode 100644 index 0000000000000000000000000000000000000000..0ffc9ea2cf3a5966964f8936f3f25a22854ac948 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/phondata-manifest @@ -0,0 +1,987 @@ +# This file lists the type of data that has been compiled into the +# phondata file +# +# The first character of a line indicates the type of data: +# S - A SPECT_SEQ structure +# W - A wavefile segment +# E - An envelope +# +# Address is the displacement within phondata of this item +# +# Address Data file +# ------- --------- +W 0x00008 ustop/null +S 0x00158 vowel/@ +S 0x0021c vowel/@- +S 0x002e0 vowel/a +S 0x003e4 vowel/e +S 0x004e8 vowel/i +S 0x005ec vowel/oo +S 0x006f0 vowel/u +S 0x007f4 klatt/m-syl +S 0x008f8 m/m-syl +S 0x009bc klatt/n-syl +S 0x00ac0 n/n-syl +S 0x00b84 nn/nn-syl +W 0x00cc8 ustop/percus10 +S 0x00ed4 vowelr/r-voc +S 0x01018 vwl_hi/l-voc +S 0x0111c r/r@ +S 0x011e0 r/ra +S 0x012a4 r/re +S 0x01368 r/ri +S 0x0142c r/ro +S 0x014f0 r/ru +S 0x015b4 r/xr +S 0x01638 r/_r +S 0x016fc r/tr +S 0x01780 r/r +S 0x01844 r3/r_n +W 0x018c8 r3/rx +S 0x02c20 r/trr +S 0x02ce4 r/rr +S 0x02da8 r3/r_ +S 0x02e2c r3/r_trill2 +W 0x02ef0 r3/r_trill2.wav +S 0x035fc r3/r_trill +W 0x03700 r3/r_trill.wav +W 0x0416c r3/r_trill3.wav +S 0x045b0 r3/r_uvl +W 0x046b4 r3/r_uvl.wav +S 0x055bc l/l@ +S 0x05680 l/la +S 0x05704 l/le +S 0x05788 l/li +S 0x0584c l/lo +S 0x05950 l/lu +S 0x05a14 l/L1_@L +S 0x05b18 l/L1_aL +S 0x05c1c l/L1_eL +S 0x05ce0 l/L1_iL +S 0x05de4 l/L1_oL +S 0x05f28 l/L1_uL +S 0x0602c l/l_ +S 0x060b0 l/xl +S 0x06134 l/_l +S 0x061f8 l/tl +S 0x0627c l/l_long +S 0x06300 l/l +S 0x06384 l/L2_eL +S 0x06448 l/L2_uL +S 0x0654c l/L2_@L +S 0x06650 l/L2_aL +S 0x06754 l/L2_iL +S 0x06858 l/L2_oL +S 0x0699c l/l_@ +S 0x06a20 l/l_a +S 0x06aa4 l/l_e +S 0x06b28 l/l_i +S 0x06bec l/l_o +S 0x06cb0 l/l_u +S 0x06d34 l^/j2@ +S 0x06df8 l^/j2a +S 0x06ebc l^/j2e +S 0x06f80 l^/j2i +S 0x07044 l^/j2o +S 0x07148 l^/j2u +S 0x0724c l^/_l^ +S 0x07350 l^/l^ +S 0x07454 l^/l_rfx +S 0x07518 ll/xll +S 0x075dc ll/_ll +S 0x076e0 ll/ll +S 0x077a4 w/w@ +S 0x07868 w/wa +S 0x0792c w/we +S 0x079f0 w/wi +S 0x07ab4 w/wo +S 0x07b78 w/wu +S 0x07c3c w/xw +S 0x07cc0 w/w +S 0x07d44 w/_w +S 0x07e08 w/iw_ +S 0x07f0c w/w_ +S 0x07fd0 j/j@ +S 0x080d4 j/ja +S 0x081d8 j/je +S 0x082dc j/ji +S 0x083a0 j/jo +S 0x084e4 j/ju +S 0x085a8 j/xj +S 0x0862c j/_j +S 0x086b0 j/j_ +S 0x08774 j2/j2@ +S 0x08838 j2/j2a +S 0x088fc j2/j2e +S 0x089c0 j2/j2i +S 0x08a84 j2/j2o +S 0x08b88 j2/j2u +S 0x08c4c j2/xj2 +S 0x08cd0 j2/_j2 +S 0x08d54 klatt/m_ +S 0x08e58 klatt/m +S 0x08f5c m/m@ +S 0x09060 m/ma +S 0x09164 m/me +S 0x09268 m/mi +S 0x093ac m/mo +S 0x094b0 m/mu +S 0x095b4 m/mj +S 0x09678 m/_m +S 0x096fc m/m_ +S 0x097c0 klatt/n +S 0x098c4 n/n@ +S 0x099c8 n/na +S 0x09acc n/ne +S 0x09bd0 n/ni +S 0x09cd4 n/no +S 0x09dd8 n/nu +S 0x09edc n/nj +S 0x09fa0 n/_n +S 0x0a024 n/n_ +S 0x0a0e8 klatt/nr +S 0x0a1ec n/nr@ +S 0x0a2f0 n/nra +S 0x0a3f4 n/nre +S 0x0a4f8 n/nri +S 0x0a5fc n/nro +S 0x0a700 n/nru +S 0x0a804 n/_nr +S 0x0a888 n/nr_ +S 0x0a94c klatt/n^@ +S 0x0a9d0 klatt/n^ +S 0x0aad4 n^/n^@ +S 0x0ac58 n^/n^a +S 0x0ad9c n^/n^e +S 0x0af20 n^/n^i +S 0x0b0a4 n^/n^o +S 0x0b268 n^/n^u +S 0x0b3ec n^/_n^ +S 0x0b470 n^/n^_ +S 0x0b5b4 klatt/nn_ +S 0x0b6b8 klatt/nn +S 0x0b7bc nn/nn@ +S 0x0b880 nn/nna +S 0x0b944 nn/nne +S 0x0ba08 nn/nni +S 0x0bacc nn/nno +S 0x0bb90 nn/nnu +S 0x0bc54 nn/inn +S 0x0bd18 nn/nnj +S 0x0bd9c nn/_nn +S 0x0be20 nn/nn_ +S 0x0bee4 r3/@tap2 +S 0x0c028 r3/@tap +S 0x0c16c d/tap1 +S 0x0c230 d/tap3 +S 0x0c334 d/dr +S 0x0c3b8 r3/@tap_rfx_ +S 0x0c4fc r3/@tap_rfx +S 0x0c640 b/xb +S 0x0c704 klatt/b +W 0x0c7c8 x/b_ +W 0x0cbe0 x/b +S 0x0cd44 b/b_ +S 0x0ce08 b/b@2 +S 0x0cf0c b/b@ +S 0x0d010 b/ba +S 0x0d114 b/be +S 0x0d218 b/bi +S 0x0d31c b/bo +S 0x0d420 b/bu +S 0x0d524 b/b +S 0x0d628 d/xd +S 0x0d6ec d/d_ +W 0x0d7b0 x/d_ +S 0x0dbd8 d/d +W 0x0dc9c x/d +W 0x0deb8 x/d_dnt +S 0x0e19c dzh/xdzh +S 0x0e260 dzh/dzh_ +W 0x0e324 x/dzh_ +S 0x0ed5c dzh/dzh +W 0x0ee20 x/dzh +W 0x0f22c x/dz_pzd +S 0x0f68c dzh/xdz_pzd +S 0x0f750 klatt/dz_pzd_ +S 0x0f814 klatt/dz_pzd +S 0x0f8d8 dzh/dz_pzd_ +S 0x0f99c dzh/dz_pzd +S 0x0fa60 g/xg +S 0x0fb24 g/g_ +W 0x0fbe8 x/g_ +S 0x0ffa8 g/g +W 0x1006c x/g2 +S 0x102f4 klatt/v_ +W 0x103b8 vocw/v +S 0x10cb8 klatt/bh +S 0x10d7c voc/v_ +S 0x10e40 voc/bh +S 0x10f04 klatt/v +S 0x10fc8 voc/v +S 0x110cc voc/v#_ +S 0x11190 voc/v# +S 0x11294 voc/dh_ +W 0x11358 vocw/dh +S 0x11c60 voc/dh +S 0x11d24 voc/z_ +W 0x11de8 ufric/s_ +S 0x1289c voc/z +S 0x12960 klatt/zh_ +W 0x12a24 vocw/zh +S 0x1338c klatt/zh +S 0x13450 voc/zh_ +S 0x13514 voc/zh +W 0x135d8 vocw/zh_rfx +S 0x13e68 voc/z_pzd_ +W 0x13f2c ufric/s_pzd_ +S 0x14a30 voc/z_pzd +W 0x14af4 ufric/s_pzd +W 0x1542c ufric/sh_pzd_ +W 0x15ef4 ufric/sh_pzd +S 0x16828 voc/j +W 0x1692c ufric/ch +S 0x17044 klatt/qqh_ +W 0x17108 vocw/Q_ +S 0x17914 klatt/qqh +W 0x179d8 vocw/Q +S 0x181e4 voc/Q_ +S 0x182a8 voc/Q +S 0x1836c voc/Q_ulv +W 0x18470 ufric/xx +W 0x18f6c ustop/p_ +W 0x1977c ustop/pr +W 0x19bc4 ustop/p_unasp +W 0x19ef0 ustop/pl +W 0x1a2e8 ustop/p +W 0x1a658 ustop/t_ +W 0x1ab18 ustop/tr +W 0x1b278 ustop/t_dnt +W 0x1b688 ustop/t +W 0x1babc ustop/t_hi +W 0x1bd88 ustop/tsh_ +W 0x1c6c8 ustop/tsh +W 0x1cd08 ustop/ts_pzd +W 0x1d40c ustop/t_pzd +W 0x1d858 ustop/c +W 0x1db08 ustop/k_ +W 0x1dfc4 ustop/kr +W 0x1e604 ustop/ki +W 0x1ebcc ustop/kl +W 0x1f1fc ustop/k_unasp +W 0x1f6d0 ustop/k +W 0x1fba4 ustop/q +W 0x1fd10 ustop/q_u +W 0x1fe30 ufric/f_ +W 0x20900 ufric/f +W 0x210f0 ufric/th_ +W 0x21970 ufric/th +W 0x22208 ufric/s! +W 0x22ab8 ufric/s +W 0x23258 ufric/sh_ +W 0x23d08 ufric/sh +W 0x246b8 ufric/sh_rfx +W 0x25054 ufric/l# +W 0x25a98 ufric/ch_ +W 0x263c0 ufric/x_ +W 0x26f1c ufric/x_hr +W 0x27830 h/h@ +W 0x27d84 h/ha +W 0x28400 h/he +W 0x28a94 h/hi +W 0x2902c h/ho +W 0x296e8 h/hu +W 0x29e0c h/h_ +W 0x2a4b8 ustop/ts_ +W 0x2ae18 ustop/ts +S 0x2b874 d/xdz +W 0x2b938 ustop/p_unasp_ +W 0x2ba74 ustop/p_asp +W 0x2bf78 ustop/t_short +W 0x2c1bc ustop/ts_pzd_ +W 0x2c680 ustop/ts_pzd2 +W 0x2c9b4 ustop/k_asp +W 0x2d0b8 ustop/k_asp_e +W 0x2d820 ustop/k_asp_a +W 0x2e0a4 ufric/s_continue +S 0x2e854 vowel/a# +S 0x2e958 vowel/a_2 +S 0x2ea5c vowel/ee_1 +S 0x2eba0 vowel/o +S 0x2ece4 vowel/oo_4 +S 0x2ede8 vowel/u_bck +S 0x2eeec vowel/uu_2 +S 0x2eff0 vowel/y +S 0x2f134 vowel/y# +S 0x2f238 vdiph/au_4 +S 0x2f3bc vdiph/eu +S 0x2f500 vdiph2/iu +S 0x2f684 vdiph/ai +S 0x2f7c8 vdiph/ei +S 0x2f90c vdiph/eei +S 0x2fa90 vdiph/oi +S 0x2fc54 vdiph/ui +S 0x2fd98 w/w2 +W 0x2fe5c ustop/t_dnt2 +S 0x300b4 vowel/ii_5 +S 0x301b8 vowel/e_mid2 +S 0x302bc vowel/ii#_2 +S 0x303c0 vdiph/ai_5 +S 0x30504 vowel/a_6 +S 0x30608 vdiph/@i_2 +S 0x3074c vowel/@_3 +S 0x30810 vowel/o-_4 +S 0x30914 vowel/u_2 +W 0x30a18 ustop/tsh_unasp +W 0x30ed8 ustop/k_ejc +W 0x31688 vwl_ar/hah +W 0x325ec vwl_ar/dhad +W 0x3364c vwl_ar/shin +S 0x34428 vowel/aa_7 +S 0x3452c vowel/u_7 +S 0x34630 vowel/ii# +S 0x34734 vowel/oe +S 0x34838 vowel/o_mid +S 0x3493c vowel/@_2 +S 0x34a40 vowel/ee +S 0x34b44 vowel/aa_8 +S 0x34c48 vowel/0_3 +S 0x34d4c vowel/e_6 +S 0x34e50 vowel/ii +E 0x34f54 envelope/i_risefall +E 0x34fd4 envelope/p_fall +E 0x35054 envelope/p_214 +E 0x350d4 envelope/p_rise +E 0x35154 envelope/p_level +S 0x351d4 n/n_long_ +S 0x35298 nn/nn2_ +W 0x3535c ustop/t_unasp2 +W 0x35468 ustop/k_unasp_ +W 0x35724 ustop/tsh_pzd_unasp +W 0x35f74 ustop/tsh_pzd +W 0x36ab4 ufric/sh_pzd2 +W 0x37604 ustop/ts_unasp +W 0x37e7c ustop/ts_rfx_unasp +W 0x38a68 ustop/ts_rfx +S 0x39748 vwl_zh/a_n +S 0x3984c vowel/aa_2 +S 0x399d0 vowel/a_3 +S 0x39ad4 vdiph/ai_6 +S 0x39c98 vwl_zh/aau +S 0x39ddc vowel/@_bck +S 0x39ee0 vowel/3_2 +S 0x3a024 vowelr/V3_r +S 0x3a168 vowel/ee_2 +S 0x3a26c vdiph2/ei_4 +S 0x3a3b0 vowel/ii_2 +S 0x3a4b4 vowel/i#_7 +S 0x3a5b8 vowel/i#_6 +S 0x3a6bc vwl_zh/iaa +S 0x3a800 vwl_zh/iaau +S 0x3a984 vwl_zh/ie +S 0x3aac8 vdiph2/iioo +S 0x3ac0c vwl_zh/iou +S 0x3ad90 vnasal/oo_n2 +S 0x3aed4 vdiph2/o_oo +S 0x3b018 vowel/8 +S 0x3b11c vdiph/8u +S 0x3b260 vwl_zh/ong +S 0x3b3e4 vnasal/u_n +S 0x3b4e8 vwl_zh/uaa +S 0x3b62c vdiph2/oa +S 0x3b770 vwl_zh/uai +S 0x3b8f4 vdiph2/o@ +S 0x3ba78 vwl_zh/uei +S 0x3bbfc vwl_zh/uo +S 0x3bd80 vowel/uu_3 +S 0x3be44 vowel/y_2 +S 0x3bf88 vdiph2/yu +S 0x3c10c vwl_zh/y& +S 0x3c250 vwl_zh/yee +S 0x3c394 vdiph2/y@ +S 0x3c4d8 vdiph/yi +S 0x3c61c vowel/ii_3 +S 0x3c720 vowel/oo_2 +S 0x3c824 vowel/i# +S 0x3c928 vowel/o_2 +S 0x3ca6c vdiph/aai_2 +S 0x3cc30 vdiph/ai_2 +S 0x3cdf4 vdiph2/iu_4 +S 0x3cf38 vdiph/ooi +S 0x3d0fc vdiph/ui_3 +S 0x3d280 vowel/a#_3 +S 0x3d384 r/a_ +S 0x3d448 vowel/i_4 +S 0x3d54c vowel/& +S 0x3d650 vowel/a_8 +S 0x3d754 vowel/o_5 +S 0x3d858 vowel/V_4 +S 0x3d95c vowel/yy +S 0x3da60 vowel/V +S 0x3db64 r/aa +S 0x3dc68 r2/r2@ +S 0x3dd2c r2/r2a +S 0x3ddf0 r2/r2e +S 0x3def4 r2/r2i +S 0x3dfb8 r2/r2o +S 0x3e07c r2/r2u +S 0x3e140 vowel/@_6 +S 0x3e244 vwl_en/@L +S 0x3e308 vowel/ee_5 +S 0x3e40c vowel/ii#_3 +S 0x3e510 vowel/ii_4 +S 0x3e614 vowel/ii_7 +S 0x3e718 vowel/0 +S 0x3e81c vowel/V_2 +S 0x3e920 vowel/8_2 +S 0x3ea24 vowel/uu +S 0x3eb28 vowel/3_en +S 0x3ec6c w/wi2 +S 0x3ed70 vowel/i_en +S 0x3eeb4 vowel/oo_en +S 0x3eff8 vwl_en/u_L +S 0x3f13c vdiph2/uw_2 +S 0x3f280 vdiph/au +S 0x3f404 vdiph/@u_en +S 0x3f588 vdiph2/ii@ +S 0x3f70c vdiph2/8@ +S 0x3f850 vdiph2/uu@ +S 0x3f9d4 vwl_en/aI@ +S 0x3fb98 vwl_en/aU@ +S 0x3fd1c vowelr/V_r +S 0x3fe60 vnasal/aa_n2 +S 0x3ffa4 vowel/oo_1 +S 0x400e8 vdiph/eei_2 +S 0x4022c vdiph/ooi_2 +S 0x403f0 vowel/aa_9 +S 0x404f4 vowel/aa +S 0x405f8 vowel/e# +S 0x406fc vowel/e_7 +S 0x40800 vowel/ee#_2 +S 0x40904 vowel/i_8 +S 0x40a08 vowel/i_7 +S 0x40b0c vowel/u_bck2 +S 0x40c10 vowel/u_bck3 +S 0x40d14 vowel/u_5 +S 0x40e18 vowel/8_7 +S 0x40f1c vowel/8_4 +S 0x41020 vdiph/&i +S 0x41164 vdiph/@i +W 0x412a8 ufric/s_pal +S 0x41b5c d/xd_pzd +W 0x41c20 x/d_pzd +S 0x42034 vdiph/ou_2 +S 0x42178 vowel/aa# +S 0x4227c vowel/uu_4 +S 0x42380 vdiph/aai_3 +S 0x42504 vdiph/y#i +S 0x42648 vdiph/ui_4 +S 0x4278c vdiph/aau +S 0x42910 vdiph/ou +S 0x42a54 vdiph/eu_2 +S 0x42b98 vdiph2/iu_2 +S 0x42d1c vdiph/&y +S 0x42e60 vdiph/eey +S 0x42fa4 vdiph/y#y +S 0x430e8 vdiph2/iy +S 0x4322c vdiph2/uo +S 0x43370 vdiph2/ie +S 0x434b4 vdiph2/y-y# +S 0x435f8 r3/r_trill_short +W 0x436fc h/hu_fi +S 0x43fec vowel/@_4 +S 0x440b0 vowel/ee_4 +S 0x441b4 vowel/u#_2 +S 0x442b8 vowel/oe_2 +S 0x443bc vwl_fr/y2r +S 0x44440 vwl_fr/e_2r +S 0x444c4 vwl_fr/aa2r +S 0x44548 vwl_fr/ee2r +S 0x4460c vwl_fr/oo2r +S 0x446d0 vwl_fr/@2r +S 0x44754 vwl_fr/a2r +S 0x447d8 vwl_fr/e2r +S 0x4485c vwl_fr/i2r +S 0x448e0 vwl_fr/o2r +S 0x44964 vwl_fr/u2r +S 0x449e8 vwl_fr/re2 +S 0x44a6c vwl_fr/r@2 +S 0x44af0 vwl_fr/raa +S 0x44b74 vwl_fr/ree +S 0x44bf8 vwl_fr/ry +S 0x44c7c vwl_fr/rw +S 0x44d00 vwl_fr/roo +S 0x44d84 vwl_fr/rj +S 0x44e08 vwl_fr/r@ +S 0x44e8c vwl_fr/ra +S 0x44f10 vwl_fr/re +S 0x44f94 vwl_fr/ri +S 0x45018 vwl_fr/ro +S 0x4509c vwl_fr/ru +S 0x45120 vwl_fr/r +S 0x451a4 vwl_fr/trr +S 0x45268 vwl_fr/rr +S 0x452ec vwl_fr/r_@ +S 0x45370 vwl_fr/r_a +S 0x453f4 vwl_fr/r_e +S 0x45478 vwl_fr/r_i +S 0x454fc vwl_fr/r_o +S 0x45580 vwl_fr/r_u +S 0x45604 vwl_fr/r_y +S 0x45688 vwl_fr/r_n +S 0x4574c vwl_fr/r_ +S 0x457d0 vwl_fr/tr +S 0x458d4 vwl_fr/br +S 0x459d8 vwl_fr/lo +S 0x45a5c l/l_y +S 0x45ae0 vowel/@_hgh +S 0x45ba4 vowel/a_7 +S 0x45ca8 vowel/e_8 +S 0x45dac vowel/e_mid +S 0x45eb0 vwl_fr/j +S 0x45fb4 vowel/o_8 +S 0x460f8 vowel/o_mid2 +S 0x461fc vwl_fr/wa +S 0x462c0 vnasal/aa_n4 +S 0x46404 vnasal/W_n +S 0x46548 vnasal/o_n5 +S 0x4668c b/xbr +S 0x46750 b/br +S 0x467d4 d/xdr +S 0x46898 g/xgr +S 0x4695c g/gr +W 0x46a20 x/g +W 0x46ce0 ustop/t_short_ +S 0x46f6c vwl_af/r@ +S 0x47030 vwl_af/@ +S 0x470f4 vowel/a_4 +S 0x471f8 vdiph/@u_3 +S 0x4737c vdiph2/i@ +S 0x47540 vdiph2/u@ +S 0x476c4 vnasal/a#_n2 +S 0x477c8 vnasal/a_n +S 0x4790c vnasal/e_n +S 0x47a10 vnasal/i_n +S 0x47b14 vnasal/o_n +S 0x47c58 vowel/yy_4 +S 0x47d5c vowel/o- +S 0x47e60 vwl_lv/a +S 0x47f64 vwl_lv/aa +S 0x48028 vwl_lv/e +S 0x480ec vwl_lv/ee +S 0x481b0 vwl_lv/i +S 0x48274 vwl_lv/ii +S 0x48338 vwl_lv/o +S 0x483fc vwl_lv/oo +S 0x484c0 vwl_lv/u +S 0x48584 vwl_lv/uu +S 0x48648 vdiph/aai +S 0x487cc vdiph2/ie_2 +S 0x48910 vdiph2/ua +S 0x48a14 vowel/@_low +S 0x48ad8 vowel/V_3 +S 0x48bdc vowel/i_fnt +S 0x48ce0 vowel/ii_6 +S 0x48da4 vowel/e_2 +S 0x48ea8 vdiph/ee-e +S 0x48fec vowel/a_5 +S 0x490f0 vowel/uu_bck +S 0x491f4 vnasal/i_n2 +S 0x492f8 vnasal/ii_n +S 0x493fc vnasal/ee_n2 +S 0x49540 vnasal/V_n +S 0x49644 vdiph/aau_3 +S 0x497c8 d/xd3 +W 0x4988c ustop/th_rfx2 +S 0x49e90 g2/xg +W 0x49f54 ustop/percus02 +W 0x4a284 ustop/ts2 +S 0x4a754 vowel/y#_2 +S 0x4a858 vowel/e_3 +S 0x4a95c vowel/e_e +S 0x4aa60 vowel/a#_2 +S 0x4ab64 vowel/oo_5 +S 0x4ac68 vowel/y## +S 0x4ad6c vowel/y#_3 +S 0x4ae70 vdiph/ai_7 +S 0x4aff4 vdiph/ou_3 +S 0x4b0f8 vdiph/y#i_2 +S 0x4b23c m/m#_ +S 0x4b340 n/n#_ +S 0x4b444 n^/n^#_ +S 0x4b548 nn/nn#_ +W 0x4b64c ufric/tl# +S 0x4bfb4 r3/r#_ +S 0x4c038 vowel/oo_3 +W 0x4c0fc ustop/k_asp_u +W 0x4c92c ufric/x2 +S 0x4d284 vowel/aa_6 +S 0x4d3c8 vowel/u#_7 +S 0x4d4cc vowel/V_6 +W 0x4d5d0 ustop/t_unasp +W 0x4d708 ustop/ts_pzd3 +S 0x4dd88 vowel/i_2 +S 0x4de8c vdiph/aau_2 +S 0x4dfd0 vdiph/ae +S 0x4e114 vdiph/eeu_2 +S 0x4e258 vdiph/ae_2 +S 0x4e3dc vdiph/eei_5 +S 0x4e520 vwl_ru/ee +S 0x4e664 vdiph2/ea +S 0x4e7a8 vowel/i_3 +S 0x4e8ac vowel/i_6 +S 0x4e9b0 vdiph2/uaa +S 0x4eb34 vdiph/eei_3 +S 0x4ec78 vwl_lv/e2 +S 0x4ed3c vwl_lv/ee2 +S 0x4ee00 vwl_lv/y +S 0x4ef04 vwl_lv/yy +S 0x4f008 vwl_lv/ai +S 0x4f18c vwl_lv/au +S 0x4f310 vwl_lv/ei +S 0x4f454 vwl_lv/ie +S 0x4f598 vwl_lv/iu +S 0x4f71c vwl_lv/ui +S 0x4f860 vwl_lv/ua +S 0x4f964 vwl_lv/oi +W 0x4fb28 h/h-lv +S 0x504a8 l^/l^_ +W 0x505ac myanmar/k +W 0x5149c myanmar/kh +W 0x520b4 myanmar/g.wav +S 0x52ef8 myanmar/ny +W 0x530bc myanmar/s +W 0x54258 myanmar/hs +W 0x553f4 myanmar/z +W 0x564dc myanmar/t_short +W 0x5662c myanmar/ht +W 0x571b4 myanmar/d +W 0x57d28 myanmar/p +W 0x58c54 myanmar/t_hi +W 0x58f20 myanmar/h +S 0x5a228 myanmar/yy +S 0x5a42c myanmar/a +S 0x5a4b0 myanmar/ky +W 0x5a6f4 myanmar/by.wav +W 0x5ac00 myanmar/ch.wav +W 0x5b454 myanmar/gya.wav +W 0x5c7d8 myanmar/htya.wav +W 0x5db1c myanmar/phya.wav +W 0x5e7d4 myanmar/pya.wav +W 0x5fc58 myanmar/ty.wav +W 0x60f18 myanmar/sh.wav +S 0x61b2c myanmar/a01 +S 0x61c30 myanmar/a02 +S 0x61db4 myanmar/a03 +S 0x62038 myanmar/a04 +S 0x620fc myanmar/a05 +S 0x62200 myanmar/a06 +S 0x62584 myanmar/a07 +S 0x626c8 myanmar/a08 +S 0x6284c myanmar/a09 +S 0x62b50 myanmar/a11 +S 0x62cd4 myanmar/a12 +S 0x62f98 myanmar/a14 +S 0x6315c myanmar/a13 +S 0x633e0 myanmar/a17 +S 0x636a4 myanmar/a16 +S 0x639a8 myanmar/a20 +S 0x63b2c myanmar/a19 +S 0x63d70 myanmar/a21 +S 0x64034 myanmar/a23 +S 0x64138 myanmar/a22 +S 0x642bc myanmar/a24 +S 0x64600 myanmar/a29 +S 0x64744 myanmar/a28 +S 0x64988 myanmar/a30 +S 0x64d0c myanmar/a32 +S 0x64f50 myanmar/a31 +S 0x65214 myanmar/a33 +S 0x65318 myanmar/a35 +S 0x655dc myanmar/a34 +S 0x658a0 myanmar/a36 +S 0x65ba4 myanmar/a43 +S 0x65de8 myanmar/a42 +S 0x6602c myanmar/a44 +S 0x66430 myanmar/a49 +S 0x665b4 myanmar/a50 +S 0x66838 myanmar/a46 +S 0x66a3c myanmar/a45 +S 0x66c40 myanmar/a47 +S 0x66f44 myanmar/a25 +S 0x67088 myanmar/a26 +S 0x672cc myanmar/a27 +S 0x67490 myanmar/a37 +S 0x67654 myanmar/a38 +S 0x67798 myanmar/a39 +S 0x679dc myanmar/a40 +S 0x67b60 myanmar/a41 +S 0x67ce4 vowel/y_4 +S 0x67de8 vwl_no/y# +S 0x67eec vwl_no/& +S 0x67ff0 vwl_no/u# +S 0x680f4 vwl_no/u#2 +S 0x68238 vdiph/0i_2 +S 0x683bc vdiph/ai_3 +S 0x68500 vwl_no/y#y +S 0x68644 vwl_no/au- +S 0x68808 vowel/ee# +S 0x6890c vnasal/ee_u_n +S 0x68a90 vnasal/oo_n3 +S 0x68c14 vowel/aa_3 +W 0x68d18 vocw/Q2 +W 0x695e4 ustop/tsh_asp +W 0x6a24c x/g3 +S 0x6a434 vwl_ro/mi +S 0x6a578 vwl_ru/ii- +S 0x6a63c vwl_ru/ii +S 0x6a740 vwl_ru/ii# +S 0x6a804 vwl_ru/i# +S 0x6a908 vwl_ru/e +S 0x6aa0c vwl_ru/E# +S 0x6ab10 vwl_ru/E@ +S 0x6ac14 vwl_ru/o +S 0x6ad18 vwl_ru/oo +S 0x6addc vwl_ru/u +S 0x6aee0 vwl_ru/u# +S 0x6b024 vwl_ru/u#u +S 0x6b168 vwl_ru/8 +S 0x6b22c vwl_ru/ju +S 0x6b330 vwl_ru/ja +S 0x6b4b4 vwl_ru/a +S 0x6b5b8 vwl_ru/aa +S 0x6b6bc r3/r_ru2 +W 0x6b7c0 r3/r_ru +S 0x6bac4 vwl_it/o_open +S 0x6bbc8 vdiph/eeu +S 0x6bd0c vdiph/au_2 +S 0x6be90 vdiph/ooi_3 +S 0x6c014 vdiph/aau_4 +S 0x6c198 vowel/8_6 +S 0x6c29c vdiph/ooi_4 +S 0x6c3e0 vdiph2/ye +S 0x6c524 l/l_front_ +S 0x6c668 l/l_front +S 0x6c76c l/l_4 +S 0x6c830 vowel/ee_6 +S 0x6c8f4 vowel/y_5 +S 0x6ca38 vowel/yy_3 +S 0x6cb3c vowel/oe_4 +S 0x6cc00 vowel/aa_4 +W 0x6cd04 ufric/sx_sv +S 0x6d54c vowel/o_4 +W 0x6d650 ustop/t_hard +W 0x6d890 ufric/sh3 +S 0x6e224 vwl_tn/r@ +S 0x6e2e8 vwl_tn/@ +S 0x6e3ac vwl_tn/I +S 0x6e470 vdiph/i@_2 +S 0x6e5f4 vowel/0_2 +W 0x6e6f8 ufric/tlh +E 0x6fc14 envelope/p_fallrise +E 0x6fc94 envelope/vi_5amp +E 0x6fd14 envelope/p_512 +E 0x6fd94 envelope/vi_6amp +S 0x6fe14 vietnam/a_2 +S 0x6ff58 vietnam/aa +S 0x7005c vietnam/e_e_2 +S 0x70160 vietnam/e +S 0x70264 vietnam/e_short_1 +S 0x703e8 vietnam/i +S 0x704ec vietnam/i_2 +S 0x705f0 vietnam/oo +S 0x70734 vietnam/o_2 +S 0x70878 vietnam/u +S 0x7097c vietnam/y_2 +S 0x70a80 vietnam/V_2 +S 0x70b84 vietnam/@_2 +S 0x70c88 vdiph/&i_2 +S 0x70dcc vdiph/u-i +S 0x70f10 vdiph/@u +S 0x71054 vdiph2/ii@_3 +S 0x711d8 vietnam/y@ +S 0x7131c vietnam/u@ +S 0x714a0 vietnam/o# +S 0x715e4 vietnam/O_short_2 +S 0x71728 vietnam/oe +S 0x7186c vietnam/ie +S 0x719b0 vnasal/oi_n +S 0x71b74 vdiph/@i_3 +S 0x71cb8 vowel/u_3 +W 0x71dbc vietnam/c_2 +W 0x722f8 vietnam/c +S 0x72834 n/nm +S 0x728f8 l/l_vi +W 0x729fc vietnam/th +W 0x72fec vietnam/tr +W 0x732dc vietnam/dda_2 +W 0x737a8 vietnam/ch +W 0x73d04 vietnam/w +S 0x73f5c vietnam/_w +S 0x74020 vietnam/w_ +S 0x740e4 vietnam/n^_ +W 0x74228 vietnam/hi +W 0x74594 vietnam/hu +S 0x74c18 vwl_zh/ang +S 0x74e1c vwl_zh/aang +S 0x75060 vwl_zh/eng +S 0x75264 vwl_zh/ing +S 0x754a8 vwl_zh/ng +S 0x755ec vwl_zh/oeng +S 0x757b0 vwl_zh/ung +S 0x75934 vowel/8_3 +S 0x75a38 vdiph/y#y_2 +W 0x75bbc ustop/tsh_sr +E 0x764d4 envelope/chr_fall21 +E 0x76554 envelope/chr_level2 +E 0x765d4 envelope/chr_rise23 +E 0x76654 envelope/chr_fall32 +E 0x766d4 envelope/chr_level3 +E 0x76754 envelope/chr_rise4 +E 0x767d4 envelope/chr_fall43 +S 0x76854 vnasal/a#_n +W 0x76958 x/dz_pzd_ +S 0x77048 vwl_es/oo_ +S 0x7710c vwl_es/ooi_ +S 0x77290 vwl_es/ooi +S 0x77414 voc/v2 +W 0x774d8 ufric/z_eu +W 0x77ee0 ufric/ts_eu +W 0x78888 ufric/tz_eu +S 0x792f4 vdiph/0i +S 0x794b8 vdiph/oou +S 0x795fc vwl_it/a +S 0x79700 vwl_it/e_open +S 0x79804 vwl_it/i +S 0x79908 vwl_it/o +S 0x79a4c vwl_it/u +S 0x79b50 vowel/8_5 +S 0x79c54 vowel/o_7 +S 0x79d58 vdiph/eeu_3 +S 0x79e9c vnasal/a#u_n +S 0x79fe0 vowel/ee_3 +S 0x7a0a4 d/x_tap +S 0x7a168 d/tap2 +S 0x7a22c vwl_ro/li +S 0x7a330 vwl_ro/ni +S 0x7a434 vwl_ro/ii- +S 0x7a4f8 vowel/i#_5 +S 0x7a5fc vdiph/ii +S 0x7a7c0 vdiph/i#i +S 0x7a904 vdiph2/uw_3 +S 0x7aa48 vdiph2/eo +S 0x7abcc vdiph2/e_u +S 0x7ad10 d/tap_i +S 0x7add4 d/tap +S 0x7ae98 vowel/u# +S 0x7af9c vowel/@_fr +S 0x7b060 vowel/o-_2 +S 0x7b164 vowel/aa_5 +S 0x7b2a8 vwl_en_n/O@ +S 0x7b3ac vdiph2/uw_4 +S 0x7b4f0 vdiph2/ee@ +S 0x7b634 vowel/ii_final +S 0x7b738 vowel/o-_3 +S 0x7b83c vwl_en_rp/aa +S 0x7b980 vowel/3_3 +S 0x7bac4 vowel/uu#_2 +S 0x7bbc8 vdiph/au_3 +S 0x7bd4c vdiph/@u_2 +S 0x7be90 vdiph2/ei_2 +S 0x7bfd4 vdiph2/ee@_2 +S 0x7c118 vwl_en_rp/i@ +S 0x7c29c vwl_en_rp/aU@ +S 0x7c420 vowel/e_5 +S 0x7c524 vowel/u#_4 +S 0x7c628 vowelr/aa_r +S 0x7c7ec vowelr/e_r +S 0x7c970 vowel/i_5 +S 0x7ca74 vwl_en_us/or +S 0x7cbb8 vowelr/oo_r +S 0x7ccbc vdiph/au# +S 0x7ce00 vowel/o_3 +S 0x7cf44 vwl_en/aI@_2 +S 0x7d0c8 vdiph2/e@ +S 0x7d20c vowelr/i_r +S 0x7d350 vdiph2/u#@ +S 0x7d494 vwl_en/@L_2 +S 0x7d598 vwl_en_us/3_us +S 0x7d69c vowel/@_low2 +S 0x7d760 vwl_en_us/ar +S 0x7d8a4 vwl_en_us/a +S 0x7d9a8 vwl_en_us/ee +S 0x7daac vwl_en_us/aar +S 0x7dc30 vwl_en_us/3_us2 +S 0x7dd74 vwl_en_us/oor +S 0x7def8 vdiph2/uw_6 +S 0x7e03c vdiph/aoo +S 0x7e180 vwl_en_us/ai +S 0x7e304 vwl_en_us/er +S 0x7e488 vwl_en_us/ir +S 0x7e60c vwl_en_us/ur +S 0x7e750 vwl_en_us/ai@ +S 0x7e8d4 vwl_en_us/ai3 +S 0x7ead8 vwl_en_us/aU@ +S 0x7ec9c klatt/x_tap +S 0x7ed60 klatt/tap2 +S 0x7ee24 vwl_en_us_nyc/a_raised +S 0x7ef28 vwl_en_us_nyc/a +S 0x7f02c vwl_en_us_nyc/0_3 +S 0x7f130 vwl_en_us_nyc/aa_8 +S 0x7f234 vwl_en_us_nyc/@i +S 0x7f3f8 vowel/@_fnt +S 0x7f4fc vdiph2/ei_3 +S 0x7f640 vdiph/Vu_2 +S 0x7f7c4 vdiph2/i@_2 +S 0x7f948 vwl_en/ooi@ +S 0x7fb0c vwl_af/I +S 0x7fbd0 l/L_eL_af +S 0x7fc94 vowel/y_3 +S 0x7fd98 vdiph2/iu_3 +S 0x7ff5c vdiph/Vu +S 0x800e0 vdiph/ai_4 +S 0x80264 vdiph/oi_2 +S 0x80428 vdiph/ui_2 +S 0x805ac vdiph2/y#@ +S 0x806f0 vnasal/aa_n3 +S 0x80834 vnasal/o_n2 +S 0x80978 vdiph/aau_6 +S 0x80afc vwl_de/y# +S 0x80c00 l/l_3 +S 0x80c84 j/_j_short +S 0x80d08 vdiph2/i@_3 +S 0x80e8c vwl_de/uu_@ +S 0x80fd0 vdiph2/ii@_2 +S 0x81154 vowel/ii_8 +S 0x81258 vowel/y#_4 +S 0x8135c vowel/o_6 +S 0x81460 vowel/a#_4 +S 0x81564 vdiph/y#y_3 +S 0x81668 vdiph/ou_4 +S 0x817ac voc/Q_less +S 0x81870 vnasal/&_n +W 0x81974 ustop/ki_ejc +S 0x81d80 vdiph/Vi +S 0x81f04 vowel/u_6 +S 0x82008 vowel/u#_3 +S 0x8210c vdiph/ai_8 +S 0x82290 voc/murmur1 +S 0x823d4 vdiph/@i_4 +S 0x82558 vnasal/ai_n +S 0x8269c vdiph/a#u +S 0x82820 vnasal/au_n +S 0x82964 d/dr2 +S 0x82a28 vowel/&_2 +W 0x82b2c ustop/tsh_unasp2 +W 0x82f74 r3/rz_cs +S 0x83a20 voc/zh_2 +W 0x83ae4 ustop/tsh2 +S 0x841f0 dzh/dzh2 +W 0x842b4 ustop/t_sr +S 0x845ec d/d_dnt +W 0x846b0 ufric/ch_sr +W 0x85290 ufric/x_sr +W 0x85b10 ustop/ts_sr +S 0x862cc vowel/&_3 +S 0x863d0 vwl_fr/@R +S 0x864d4 vietnam/a diff --git a/TTS/Piper/espeak-ng-data/phonindex b/TTS/Piper/espeak-ng-data/phonindex new file mode 100644 index 0000000000000000000000000000000000000000..03ba8068e7ab71932d2d1b2d6e55b5d63447b30d Binary files /dev/null and b/TTS/Piper/espeak-ng-data/phonindex differ diff --git a/TTS/Piper/espeak-ng-data/phontab b/TTS/Piper/espeak-ng-data/phontab new file mode 100644 index 0000000000000000000000000000000000000000..5c25ca1f9ffd3d80c0bba5a5dea59edfdb9de573 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/phontab differ diff --git a/TTS/Piper/espeak-ng-data/piqd_dict b/TTS/Piper/espeak-ng-data/piqd_dict new file mode 100644 index 0000000000000000000000000000000000000000..7924788c97ca7098bf7d790a2e12f450e8ce025b Binary files /dev/null and b/TTS/Piper/espeak-ng-data/piqd_dict differ diff --git a/TTS/Piper/espeak-ng-data/pl_dict b/TTS/Piper/espeak-ng-data/pl_dict new file mode 100644 index 0000000000000000000000000000000000000000..dcb413212121d06e25f467a6dd5594a0f1e0430c Binary files /dev/null and b/TTS/Piper/espeak-ng-data/pl_dict differ diff --git a/TTS/Piper/espeak-ng-data/pt_dict b/TTS/Piper/espeak-ng-data/pt_dict new file mode 100644 index 0000000000000000000000000000000000000000..c80197330f8c63a954cc0ff213197679230d9873 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/pt_dict differ diff --git a/TTS/Piper/espeak-ng-data/py_dict b/TTS/Piper/espeak-ng-data/py_dict new file mode 100644 index 0000000000000000000000000000000000000000..47b8123862b329cb8a4bc7f6c7fe2a0b2d3227a9 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/py_dict differ diff --git a/TTS/Piper/espeak-ng-data/qdb_dict b/TTS/Piper/espeak-ng-data/qdb_dict new file mode 100644 index 0000000000000000000000000000000000000000..18a6895b46092243e36f8673ad486c24e93fe823 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/qdb_dict differ diff --git a/TTS/Piper/espeak-ng-data/qu_dict b/TTS/Piper/espeak-ng-data/qu_dict new file mode 100644 index 0000000000000000000000000000000000000000..1894201d21ad96fc17333ca385e26f6bb07a417d Binary files /dev/null and b/TTS/Piper/espeak-ng-data/qu_dict differ diff --git a/TTS/Piper/espeak-ng-data/quc_dict b/TTS/Piper/espeak-ng-data/quc_dict new file mode 100644 index 0000000000000000000000000000000000000000..2361f7b5307db1d794bfc133572053b186a7a928 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/quc_dict differ diff --git a/TTS/Piper/espeak-ng-data/qya_dict b/TTS/Piper/espeak-ng-data/qya_dict new file mode 100644 index 0000000000000000000000000000000000000000..946894306c2d286a58bce52ce81ae11d1d6fd30a Binary files /dev/null and b/TTS/Piper/espeak-ng-data/qya_dict differ diff --git a/TTS/Piper/espeak-ng-data/ro_dict b/TTS/Piper/espeak-ng-data/ro_dict new file mode 100644 index 0000000000000000000000000000000000000000..22f7dfba34be2aeb4ff6950404e365447f9f699c Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ro_dict differ diff --git a/TTS/Piper/espeak-ng-data/ru_dict b/TTS/Piper/espeak-ng-data/ru_dict new file mode 100644 index 0000000000000000000000000000000000000000..519e4304323f2a77c30a0d08de9fc8ffd11d1dbe --- /dev/null +++ b/TTS/Piper/espeak-ng-data/ru_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0f6181bbbf9e53cd1e8f9d26bde8fc62119c4f78181948f961cb29866e5e585 +size 8532392 diff --git a/TTS/Piper/espeak-ng-data/sd_dict b/TTS/Piper/espeak-ng-data/sd_dict new file mode 100644 index 0000000000000000000000000000000000000000..51831c6a1e51b01a78a9708a44b10b00e9a4c844 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/sd_dict differ diff --git a/TTS/Piper/espeak-ng-data/shn_dict b/TTS/Piper/espeak-ng-data/shn_dict new file mode 100644 index 0000000000000000000000000000000000000000..eaf1a010031457662d41865324540fbbdc80780d Binary files /dev/null and b/TTS/Piper/espeak-ng-data/shn_dict differ diff --git a/TTS/Piper/espeak-ng-data/si_dict b/TTS/Piper/espeak-ng-data/si_dict new file mode 100644 index 0000000000000000000000000000000000000000..9634893c3d783209cef8e8edb0ebdc73d12664fc Binary files /dev/null and b/TTS/Piper/espeak-ng-data/si_dict differ diff --git a/TTS/Piper/espeak-ng-data/sjn_dict b/TTS/Piper/espeak-ng-data/sjn_dict new file mode 100644 index 0000000000000000000000000000000000000000..ba76f7c2bcb6cda2eeee21663228fda709a395ee Binary files /dev/null and b/TTS/Piper/espeak-ng-data/sjn_dict differ diff --git a/TTS/Piper/espeak-ng-data/sk_dict b/TTS/Piper/espeak-ng-data/sk_dict new file mode 100644 index 0000000000000000000000000000000000000000..cd99f8f0bb5d830a17160adffd4546bee69bf4d1 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/sk_dict differ diff --git a/TTS/Piper/espeak-ng-data/sl_dict b/TTS/Piper/espeak-ng-data/sl_dict new file mode 100644 index 0000000000000000000000000000000000000000..e13eb491873c85d606b597d3d1767c36d9b803ef Binary files /dev/null and b/TTS/Piper/espeak-ng-data/sl_dict differ diff --git a/TTS/Piper/espeak-ng-data/smj_dict b/TTS/Piper/espeak-ng-data/smj_dict new file mode 100644 index 0000000000000000000000000000000000000000..203230f56493577b79e3330db08b127b76c37662 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/smj_dict differ diff --git a/TTS/Piper/espeak-ng-data/sq_dict b/TTS/Piper/espeak-ng-data/sq_dict new file mode 100644 index 0000000000000000000000000000000000000000..fccdbf3f0b699c8b7ebf1f95afbfa6d6b7fd0c9f Binary files /dev/null and b/TTS/Piper/espeak-ng-data/sq_dict differ diff --git a/TTS/Piper/espeak-ng-data/sr_dict b/TTS/Piper/espeak-ng-data/sr_dict new file mode 100644 index 0000000000000000000000000000000000000000..63576dd3000c0b8155a8066d77a3008f2ac9ae3a Binary files /dev/null and b/TTS/Piper/espeak-ng-data/sr_dict differ diff --git a/TTS/Piper/espeak-ng-data/sv_dict b/TTS/Piper/espeak-ng-data/sv_dict new file mode 100644 index 0000000000000000000000000000000000000000..a4e3f6d80bfa8aef1a09b48cecd692d8b9a2a936 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/sv_dict differ diff --git a/TTS/Piper/espeak-ng-data/sw_dict b/TTS/Piper/espeak-ng-data/sw_dict new file mode 100644 index 0000000000000000000000000000000000000000..601f310cf01466e9cac43b379aceee256a5a49ef Binary files /dev/null and b/TTS/Piper/espeak-ng-data/sw_dict differ diff --git a/TTS/Piper/espeak-ng-data/ta_dict b/TTS/Piper/espeak-ng-data/ta_dict new file mode 100644 index 0000000000000000000000000000000000000000..9fd55cb2edbcecae7dd2f09711bd7948a8962f2d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/ta_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f3d855c8d7a35ad0e2b22bc7c15a8830e5fc235492894e5db40458655076ecd +size 209553 diff --git a/TTS/Piper/espeak-ng-data/te_dict b/TTS/Piper/espeak-ng-data/te_dict new file mode 100644 index 0000000000000000000000000000000000000000..36167c225f507c2268d2db372b2197a75852cd4c Binary files /dev/null and b/TTS/Piper/espeak-ng-data/te_dict differ diff --git a/TTS/Piper/espeak-ng-data/th_dict b/TTS/Piper/espeak-ng-data/th_dict new file mode 100644 index 0000000000000000000000000000000000000000..30d9e62dbf17353af72748e43f3f139d350908f8 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/th_dict differ diff --git a/TTS/Piper/espeak-ng-data/tk_dict b/TTS/Piper/espeak-ng-data/tk_dict new file mode 100644 index 0000000000000000000000000000000000000000..e0dace413ebb64e700a24fa5b4ea957401b222c5 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/tk_dict differ diff --git a/TTS/Piper/espeak-ng-data/tn_dict b/TTS/Piper/espeak-ng-data/tn_dict new file mode 100644 index 0000000000000000000000000000000000000000..ffa39622667b4fc3940cb757df66d8a091905276 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/tn_dict differ diff --git a/TTS/Piper/espeak-ng-data/tr_dict b/TTS/Piper/espeak-ng-data/tr_dict new file mode 100644 index 0000000000000000000000000000000000000000..69d521fe51930cdcc03845b8a6c5c73440b63a11 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/tr_dict differ diff --git a/TTS/Piper/espeak-ng-data/tt_dict b/TTS/Piper/espeak-ng-data/tt_dict new file mode 100644 index 0000000000000000000000000000000000000000..ef0b02bf07213d2ce66ec602b74165347f598cd1 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/tt_dict differ diff --git a/TTS/Piper/espeak-ng-data/ug_dict b/TTS/Piper/espeak-ng-data/ug_dict new file mode 100644 index 0000000000000000000000000000000000000000..25f827fdebd0a278b4a3ee8cfc81c3c67c6a3090 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/ug_dict differ diff --git a/TTS/Piper/espeak-ng-data/uk_dict b/TTS/Piper/espeak-ng-data/uk_dict new file mode 100644 index 0000000000000000000000000000000000000000..326dc4469f914466e5890b44fa7fbe38dbb09314 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/uk_dict differ diff --git a/TTS/Piper/espeak-ng-data/ur_dict b/TTS/Piper/espeak-ng-data/ur_dict new file mode 100644 index 0000000000000000000000000000000000000000..7f858223a7f1bace67a73518d3a92e1daa798b9a --- /dev/null +++ b/TTS/Piper/espeak-ng-data/ur_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9b152fbfb134f6281de8565bd4f41aef006f57b278c03c557dd5feff6e0dbec +size 133556 diff --git a/TTS/Piper/espeak-ng-data/uz_dict b/TTS/Piper/espeak-ng-data/uz_dict new file mode 100644 index 0000000000000000000000000000000000000000..c58fae50adba17c03470b8452e331c62f5e39832 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/uz_dict differ diff --git a/TTS/Piper/espeak-ng-data/vi_dict b/TTS/Piper/espeak-ng-data/vi_dict new file mode 100644 index 0000000000000000000000000000000000000000..bbd709e2e220b6a3d85f12796417aa58271ec013 Binary files /dev/null and b/TTS/Piper/espeak-ng-data/vi_dict differ diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Alex b/TTS/Piper/espeak-ng-data/voices/!v/Alex new file mode 100644 index 0000000000000000000000000000000000000000..10c6b6e68680440d3b527ffc9416331a240dd159 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Alex @@ -0,0 +1,10 @@ +language variant +name Alex + +voicing 70 +pitch 105 115 +flutter 0 + +formant 1 110 115 100 +formant 2 100 110 100 +formant 3 100 80 75 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Alicia b/TTS/Piper/espeak-ng-data/voices/!v/Alicia new file mode 100644 index 0000000000000000000000000000000000000000..d33ed3a246bfd0ac7d5f4668c6b6fa11e110e8ce --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Alicia @@ -0,0 +1,22 @@ +language variant +name Alicia +gender female +pitch 180 275 +echo 40 50 +formant 0 115 115 110 +formant 1 130 160 120 +formant 2 150 110 150 +formant 3 135 150 100 +formant 4 120 120 120 +formant 5 120 120 120 +formant 6 100 110 105 +formant 7 100 110 160 +formant 8 200 120 100 +intonation 2 +voicing 38 +consonants 100 20 +roughness 1 +stressAdd 1 64 64 50 50 100 100 200 +stressAmp 12 12 20 20 12 12 20 20 +breathw 150 150 200 200 400 400 600 600 +breath 0 4 5 2 3 13 3 2 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Andrea b/TTS/Piper/espeak-ng-data/voices/!v/Andrea new file mode 100644 index 0000000000000000000000000000000000000000..39fb18667a55a535bb7361d56cc162712664a0d1 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Andrea @@ -0,0 +1,20 @@ +language variant +name Andrea +gender female + +pitch 200 265 +roughness 0 + +formant 0 100 100 100 +formant 1 110 100 80 +formant 2 110 80 80 +formant 3 115 110 80 +formant 4 115 80 100 +formant 5 95 50 100 +formant 6 0 0 0 +formant 7 120 100 100 +formant 8 110 100 100 +intonation 3 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +voicing 150 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Andy b/TTS/Piper/espeak-ng-data/voices/!v/Andy new file mode 100644 index 0000000000000000000000000000000000000000..25582fb550cfbaf5ac8942b699a2c019ba90a6d5 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Andy @@ -0,0 +1,19 @@ +language variant +name Andy +gender Male + +pitch 85 110 + +flutter 0 +formant 0 80 80 80 80 +formant 1 100 100 100 120 +formant 2 100 88 100 +formant 3 0 0 0 +formant 4 80 80 80 +formant 5 80 80 80 +formant 6 0 0 0 +formant 7 0 0 0 +formant 8 0 0 0 +stressAdd 0 0 0 0 0 0 0 200 +stressAmp 35 35 35 35 35 35 35 35 35 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Annie b/TTS/Piper/espeak-ng-data/voices/!v/Annie new file mode 100644 index 0000000000000000000000000000000000000000..3c5b035551b0febe269c4935b41ab6074c35a2aa --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Annie @@ -0,0 +1,17 @@ +language variant +name Annie +gender female +pitch 120 280 + +formant 0 105 125 120 +formant 1 120 140 120 +formant 2 120 150 140 +formant 3 130 150 130 +formant 4 120 120 110 +formant 5 120 120 110 +formant 6 120 140 130 +formant 7 120 140 130 +formant 8 120 140 130 +intonation 1 +voicing 30 +consonants 110 120 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/AnxiousAndy b/TTS/Piper/espeak-ng-data/voices/!v/AnxiousAndy new file mode 100644 index 0000000000000000000000000000000000000000..0ed1f35709eda69a01725cfc120c5dcb7e1f6e9c --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/AnxiousAndy @@ -0,0 +1,19 @@ +language variant +name anxiousAndy +gender Male + +pitch 115 110 + +flutter 0 +formant 0 80 80 80 80 +formant 1 100 100 100 120 +formant 2 100 100 100 +formant 3 0 0 0 +formant 4 0 0 0 +formant 5 100 100 100 +formant 6 100 100 100 +formant 7 100 100 100 +formant 8 100 100 100 +stressAdd 100 100 100 100 100 100 100 300 +stressAmp 35 35 35 35 35 35 35 35 35 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Demonic b/TTS/Piper/espeak-ng-data/voices/!v/Demonic new file mode 100644 index 0000000000000000000000000000000000000000..131fe46ad061d60a4829dec5ebdcaeca49b12dd2 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Demonic @@ -0,0 +1,65 @@ +##Ten en cuenta que los 2 signos de número en este archivo tienen explicaciones de las comfiguraciones que puede aplicar y cómo comfigurarlas +## Language Establece el idioma de la voz. Esta opción es necesaria para cualquier comfiguración que realices +##La siguiente línea es una configuración que puede cambiar. Sin embargo, si no conoce los códigos de idioma, puede ser mejor dejar la configuración tal y como está. +language variant + +## La configuración de nombre es el nombre que aparecerá en la configuración de voz en el cuadro combinado de variante. +##La siguiente línea es una opción que puede cambiar +name Demonic +##La siguiente línea establece el género de la voz. Male or Female (hombre o mujer) +##La siguiente línea es una opción que puede cambiar +gender male + +flutter 5 +stressAmp 20 18 20 20 20 22 22 22 +##Las opciones de formantes +## Formant 0 es usado para dar una baja frecuencia a los sonnidos +## Los tres números son frecuencia, fuerza y ancho, en orden. Ten en cuenta que los números están separados por espacios +##La siguiente línea es una opción que puede cambiar +formant 0 100 100 100 + +# Formant 1, 2, y 3 son las 3 formantes estándar para definir las vocales. +##Las siguientes 3 líneas son opciones que puedes cambiar +formant 1 70 100 100 +formant 2 80 100 90 +formant 3 80 160 90 + +# Formants 4 y 5 afectan a f3. Esto afectará la calidad de la voz. +##Las siguientes 2 líneas son comfiguraciones que puede cambiar. +formant 4 80 85 +formant 5 100 100 80 + +## Formantes 6, 7 y 8 son opciones que te ofrecen un sonido más claro de las vocales +##Las siguientes 3 líneas son opciones que puedes cambiar +formant 6 80 80 100 +formant 7 130 130 110 +formant 8 120 120 150 + +##Intonation afecta el ascenso y la caída de la voz +## Las opciones son: 1 predeterminado, 2 entonación media, 3 entonación media y no afecta a las comas, 4 al final de la oración o punto aumenta el tono de la voz. +##La siguiente línea es una opción que puedes cambiar. +intonation 10 + +# Establecer el rango de tono. El primer número le da un tono base a la voz (valor en hz). El segundo número controla el rango de tonos usado por la voz. Poniéndolo igual +# si los 2 números son iguales, la voz será monótona. Por defecto los ajustes son 82 y 118 +pitch 43 120 +## La configuración del tono. El primer número en la línea de configuración, 600, es la configuración de frecuencia para la cantidad de graves en la voz. +## El segundo número en la línea de tono es el volumen de la frecuencia de graves. Puede configurarlo de 0 a 255, siendo 0 la menor cantidad, 255 la mayor. +##El tercer número en la línea de tono, 1200, es la frecuencia de rango medio. El cuarto número en la línea es la configuración para cambiar el volumen de la frecuencia de rango medio. +##0 es la menor cantidad y 255 es la mayor. +## El quinto número en la línea de tono, 2000, es la frecuencia de agudos. El sexto número es el volumen de la frecuencia de agudos. 0 es el mínimo y 255 es el máximo. +## Notará que las 3 frecuencias están configuradas en 255. +###La siguiente línea es una opción que puedes cambiar. +tone 100 255 1200 255 1500 255 +echo 8 10000 +roughness 3 +breath 20 5 2 10 5 0 27 100 +breathw 255 255 60 180 160 255 255 255 +consonants 194 255 +voicing 65 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 250 350 700 500 450 290 100 225 +stressAmp 16 16 24 24 16 16 20 24 +##Este archivo no incluye todas las configuraciones que se pueden usar para modificar una voz E Speak. Su objetivo es familiarizarlo con lo que hace la configuración. +##Sin envargo puedes visitar la página http://espeak.sourceforge.net/voices.html y consultar más información acerca de cómo agregar o cambiar otras configuraciones. +## Espero que te haya servido esta ayuda, y que te hayas divertido. diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Denis b/TTS/Piper/espeak-ng-data/voices/!v/Denis new file mode 100644 index 0000000000000000000000000000000000000000..23c7fb70249820f3e83c7ef1de75309a06997f79 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Denis @@ -0,0 +1,19 @@ +language variant +name Denis +gender male 35 +pitch 80 115 +flutter 0 +roughness 0 + + +formant 0 100 160 160 +formant 1 95 95 95 +formant 2 100 100 100 +formant 3 90 90 90 +formant 4 40 40 40 +formant 5 80 80 80 +formant 6 10 10 10 +formant 7 10 10 10 +formant 8 10 10 10 +voicing 40 +consonants 80 80 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Diogo b/TTS/Piper/espeak-ng-data/voices/!v/Diogo new file mode 100644 index 0000000000000000000000000000000000000000..1e51396647e155aad997db6342c458fbbdf93488 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Diogo @@ -0,0 +1,22 @@ +language variant +name Diogo +gender male 25 +pitch 82 122 +echo 0 0 +flutter 0 +roughness 0 +stressAmp 20 18 20 20 20 22 22 22 + + +formant 0 105 200 140 +formant 1 95 150 120 +formant 2 100 120 140 +formant 3 95 95 140 +formant 4 30 30 30 -100 +formant 5 90 90 90 +formant 6 110 60 65 +formant 7 100 0 100 +formant 8 100 0 100 +voicing 35 +consonants 60 40 +tone 60 250 140 100 1000 50 3500 35 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Gene b/TTS/Piper/espeak-ng-data/voices/!v/Gene new file mode 100644 index 0000000000000000000000000000000000000000..3db343bca1d8cbf5a6d0c7c4001a43b6d63458fb --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Gene @@ -0,0 +1,17 @@ +language variant +name Gene + +pitch 80 110 + +formant 0 120 120 120 +formant 1 90 100 110 +formant 2 100 100 95 +formant 3 90 100 100 +formant 4 90 100 110 +formant 5 90 110 110 +formant 6 100 70 100 +formant 7 100 70 100 +formant 8 100 80 100 +voicing 120 +consonants 50 110 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Gene2 b/TTS/Piper/espeak-ng-data/voices/!v/Gene2 new file mode 100644 index 0000000000000000000000000000000000000000..20e8f6f334fb978432a5335852989eecc201b56a --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Gene2 @@ -0,0 +1,17 @@ +language variant +name Gene2 + +pitch 100 130 + +formant 0 120 120 120 +formant 1 90 100 110 +formant 2 100 100 95 +formant 3 90 100 100 +formant 4 90 100 110 +formant 5 90 110 110 +formant 6 100 70 100 +formant 7 100 70 100 +formant 8 100 80 100 +voicing 120 +consonants 50 110 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Henrique b/TTS/Piper/espeak-ng-data/voices/!v/Henrique new file mode 100644 index 0000000000000000000000000000000000000000..d3fa3d745e8104d4c5c287dbc7fa680ad1aa61d3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Henrique @@ -0,0 +1,22 @@ +language variant +name Henrique +gender male 25 +pitch 70 130 +echo 0 0 +flutter 0 +roughness 0 +stressAmp 20 18 20 20 20 22 22 22 + + +formant 0 105 200 140 +formant 1 95 150 120 +formant 2 100 120 140 +formant 3 95 95 140 +formant 4 30 30 30 -100 +formant 5 90 90 90 +formant 6 110 60 65 +formant 7 100 0 100 +formant 8 100 0 100 +voicing 35 +consonants 60 40 +tone 70 250 230 80 1100 30 3500 40 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Hugo b/TTS/Piper/espeak-ng-data/voices/!v/Hugo new file mode 100644 index 0000000000000000000000000000000000000000..fe79235caa980c00755824578ac7817e7b00987c --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Hugo @@ -0,0 +1,22 @@ +language variant +name Hugo +gender male 25 +pitch 70 130 +echo 0 0 +flutter 0 +roughness 0 +stressAmp 20 18 20 20 20 22 22 22 + + +formant 0 105 200 140 +formant 1 95 150 120 +formant 2 100 120 140 +formant 3 95 95 140 +formant 4 30 30 30 -100 +formant 5 90 90 90 +formant 6 110 60 65 +formant 7 100 0 100 +formant 8 100 0 100 +voicing 35 +consonants 60 40 +tone 400 160 1100 90 3500 90 150 35 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Jacky b/TTS/Piper/espeak-ng-data/voices/!v/Jacky new file mode 100644 index 0000000000000000000000000000000000000000..e0884ed07ac35ff0f4f251ea7772a833cf3e351d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Jacky @@ -0,0 +1,17 @@ +language variant +name Jacky + +pitch 85 130 + +formant 0 150 155 100 +formant 1 90 155 70 +formant 2 95 70 64 +formant 3 15 20 30 +formant 4 20 30 40 +formant 5 65 20 65 +formant 6 70 80 100 +formant 7 20 80 100 +formant 8 100 95 80 +voicing 135 +consonants 110 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Lee b/TTS/Piper/espeak-ng-data/voices/!v/Lee new file mode 100644 index 0000000000000000000000000000000000000000..e0194fa314edeae00019e3c4e134473f3c935cbb --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Lee @@ -0,0 +1,20 @@ +language variant +name Lee +gender Male + +#echo 230 30 +pitch 85 110 + +flutter 0 +formant 0 80 80 80 80 +formant 1 80 80 100 100 +formant 2 80 80 80 +formant 3 9 9 9 +formant 4 290 290 +formant 5 130 0 0 +formant 6 90 90 90 +formant 7 90 90 90 +formant 8 90 90 90 +stressAdd 0 0 0 200 0 0 0 100 +stressAmp 30 30 30 30 30 30 30 30 30 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Marco b/TTS/Piper/espeak-ng-data/voices/!v/Marco new file mode 100644 index 0000000000000000000000000000000000000000..455cb2644c138936078ce67921dc0c8b3ef6aa3c --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Marco @@ -0,0 +1,23 @@ +language variant +name Marco +gender male 30 +intonation 1 +pitch 100 152 +echo 50 80 +flutter 2 +roughness 0 +stressAmp 25 25 24 20 38 31 39 27 +stressAdd 250 125 250 250 225 145 50 256 + +formant 0 100 120 130 +formant 1 75 180 170 +formant 2 92 120 110 +formant 3 140 120 110 +formant 4 10 20 20 -50 +formant 5 110 70 20 +formant 6 140 100 98 +formant 7 130 120 115 +formant 8 105 120 108 +voicing 38 +consonants 90 140 +tone 420 150 1200 135 3000 70 4700 40 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Mario b/TTS/Piper/espeak-ng-data/voices/!v/Mario new file mode 100644 index 0000000000000000000000000000000000000000..3ace369534e2c91b1e4ae44c018af8a35548d185 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Mario @@ -0,0 +1,17 @@ +language variant +name Mario + +pitch 75 125 + +formant 0 100 111 95 +formant 1 100 111 60 +formant 2 95 90 55 +formant 3 100 50 65 +formant 4 69 65 65 +formant 5 79 60 75 +formant 6 89 60 75 +formant 7 99 0 100 +formant 8 109 0 100 +voicing 135 +consonants 115 120 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Michael b/TTS/Piper/espeak-ng-data/voices/!v/Michael new file mode 100644 index 0000000000000000000000000000000000000000..e155ea856bed20290e271243c9522c4e873a2211 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Michael @@ -0,0 +1,17 @@ +language variant +name Michael + +pitch 75 125 + +formant 0 105 111 95 +formant 1 85 111 60 +formant 2 95 90 55 +formant 3 59 50 65 +formant 4 69 65 65 +formant 5 79 60 75 +formant 6 89 60 75 +formant 7 99 0 100 +formant 8 109 0 100 +voicing 135 +consonants 115 120 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Mike b/TTS/Piper/espeak-ng-data/voices/!v/Mike new file mode 100644 index 0000000000000000000000000000000000000000..93ea4d89402c811f0254c169105c5bd5472d8e58 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Mike @@ -0,0 +1,7 @@ +language variant +name Mike +voicing 70 +formant 1 96 97 100 +formant 2 96 97 100 +formant 5 95 103 100 +pitch 67 107 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Mr serious b/TTS/Piper/espeak-ng-data/voices/!v/Mr serious new file mode 100644 index 0000000000000000000000000000000000000000..4623c8486c714eafa399ff4b9dbc74ff2904ccab --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Mr serious @@ -0,0 +1,50 @@ +##Please note the 2 number signs, or pound signs in this file are for comments to help you to understand what the settings are and how to set them. +## Language sets the language of your voice. This setting is required for every voice that you make. +##The next line is a setting you can change. However if you don't know the language codes it may be best to leave the setting as it is. +language variant + +## The name setting is the name that will show up in the voice settings in the variant combo box. +##The next line is a setting you can change +name Mr_Serious + +##The formant settings +## Formant 0 is used to give a low frequency component to the sounds. +## The three numbers are frequency, strength, and Width, in that order. Please note, the numbers are seperated by a space. +##The next line is a setting you can change +formant 0 100 100 100 + +# Formants 1,2, and 3 are the standard three formants which define vowels. +##The next 3 lines are settings you can change +formant 1 100 100 100 +formant 2 100 100 100 +formant 3 87 100 100 + +# Formants 4,5 are higher than F3. They affect the quality of the voice. +##The next 2 lines are settings that you can change. +formant 4 100 100 100 +formant 5 100 100 100 + +## Formants 6, 7, and 8 are weak, high frequency, additions to vowels to give a clearer sound. +##The next 3 lines are settings that you can change. +formant 6 100 100 100 +formant 7 100 100 100 +formant 8 100 100 100 + +##Intonation affects the rise and fall of the voice +## The settings are 1 default, 2 less intonation, 3 less intonation and commas do not raise the pitch, 4 the pitch rises at the end of a sentence rather than falling. +##The next line is a setting you can change. +intonation 1 + +# Setting the pitch range. The first number gives a base pitch to the voice (value in Hertz). The second number controls the range of pitches used by the voice. Setting it equal +# to the first number will give a monotone sounding voice. The default values are 82 and 118. +pitch 82 118 +## The tone setting. The first number on the setting line, 600, is the frequency setting for the amount of bass in the voice. +## The second number on the tone line is the volume of the bass frequency. You can set it from 0 to 255, 0 being the least amount, 255 being the most. +##The third number on the tone line, 1200, is the mid range frequency. The fourth number on the line is the setting to change the volume of the mid range frequency. +##0 being the least amount and 255 being the maximum. +## The fifth number on the tone line, 2000, is the treble frequency. The sixth number is the volume of the treble frequency. 0 is the minimum and 255 is the maximum. +## You will notice that all 3 frequencies are set to 255. +##The next line is a setting that you can change. +tone 600 255 1200 255 2000 255 +##This file does not include all of the settings that can be used to modify an E Speak voice. It is intended to get you familiar with what the settings do. +##However, you can go to http://espeak.sourceforge.net/voices.html and read further information about other settings that can be added and changed. I hope this helps, and Have fun. diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Nguyen b/TTS/Piper/espeak-ng-data/voices/!v/Nguyen new file mode 100644 index 0000000000000000000000000000000000000000..50c72fc697c24d3297885547883627ac60fc4ba7 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Nguyen @@ -0,0 +1,16 @@ +language variant +name Nguyen + +pitch 95 175 + +formant 0 100 125 100 +formant 1 96 90 80 +formant 2 97 70 90 +formant 3 97 60 90 +formant 4 97 60 90 +formant 5 75 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 + +tone 100 200 600 150 800 100 2400 80 3600 95 5400 100 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Reed b/TTS/Piper/espeak-ng-data/voices/!v/Reed new file mode 100644 index 0000000000000000000000000000000000000000..1ccdf5d4c3bf47bb1c4d51012237db71794058b3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Reed @@ -0,0 +1,15 @@ +language variant +name Reed +klatt 6 +consonants 85 85 +voicing 130 +breath 45 + +pitch 85 135 + +formant 1 72 100 90 90 +formant 2 83 100 75 180 +formant 3 98 100 100 90 +formant 4 98 100 90 +formant 5 100 100 90 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax b/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax new file mode 100644 index 0000000000000000000000000000000000000000..b269b64154a143efddefd5ebcb10c1059178d064 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax @@ -0,0 +1,16 @@ +language variant +name RicishayMax +echo 100 10000 + +formant 0 90 120 100 +formant 1 100 100 75 +formant 2 100 100 75 +formant 3 100 80 75 +formant 4 100 80 75 +formant 5 100 80 75 +formant 6 100 0 75 +formant 7 100 0 75 +formant 8 100 0 75 + + + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax2 b/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax2 new file mode 100644 index 0000000000000000000000000000000000000000..658513422979ae643cf5af53d5c614826208577c --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax2 @@ -0,0 +1,25 @@ +language variant +name RicishayMax2 +echo 150 500 + +formant 0 90 120 100 +formant 1 100 100 75 +formant 2 100 100 75 +formant 3 100 80 75 +formant 4 100 80 75 +formant 5 100 80 75 +formant 6 100 0 75 +formant 7 100 0 75 +formant 8 100 0 75 + + +roughness 5 + +intonation 10 +voicing 150 +consonants 110 120 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax3 b/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax3 new file mode 100644 index 0000000000000000000000000000000000000000..f48100279d7db2b92f82af1711a9ae07e4ca9322 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/RicishayMax3 @@ -0,0 +1,25 @@ +language variant +name RicishayMax3 +echo 200 500 + +formant 0 90 120 100 +formant 1 100 100 75 +formant 2 100 100 75 +formant 3 100 80 75 +formant 4 100 80 75 +formant 5 100 80 75 +formant 6 100 0 75 +formant 7 100 0 75 +formant 8 100 0 75 + + +roughness 5 + +intonation 10 +voicing 150 +consonants 110 120 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Storm b/TTS/Piper/espeak-ng-data/voices/!v/Storm new file mode 100644 index 0000000000000000000000000000000000000000..6fd53bb47a018dcc7eb954996c8359143ac2433e --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Storm @@ -0,0 +1,23 @@ +language variant +language en-us +name Storm +gender male +formant 0 100 100 100 +formant 1 95 95 95 +formant 2 95 95 95 +formant 3 95 95 95 +formant 4 70 70 70 +formant 5 70 70 70 +formant 6 25 25 25 +formant 7 25 25 25 +formant 8 25 25 25 +breath 0 0 0 0 0 0 0 0 +consonants 100 +echo 0 0 +flutter 0 +intonation 3 +pitch 60 100 +roughness 0 +stressAdd 5 5 3 3 0 0 -15 -15 +tone 500 255 1500 255 2500 255 +voicing 100 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/Tweaky b/TTS/Piper/espeak-ng-data/voices/!v/Tweaky new file mode 100644 index 0000000000000000000000000000000000000000..f391d13b279c2ffce06eb5f0cd42f626b33a1e9c --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/Tweaky @@ -0,0 +1,50 @@ +##Please note the 2 number signs, or pound signs in this file are for comments to help you to understand what the settings are and how to set them. +## Language sets the language of your voice. This setting is required for every voice that you make. +##The next line is a setting you can change. However if you don't know the language codes it may be best to leave the setting as it is. +language variant + +## The name setting is the name that will show up in the voice settings in the variant combo box. +##The next line is a setting you can change +name Tweaky + +##The formant settings +## Formant 0 is used to give a low frequency component to the sounds. +## The three numbers are frequency, strength, and Width, in that order. Please note, the numbers are seperated by a space. +##The next line is a setting you can change +formant 0 100 100 100 + +# Formants 1,2, and 3 are the standard three formants which define vowels. +##The next 3 lines are settings you can change +formant 1 100 100 100 +formant 2 100 100 100 +formant 3 200 100 100 + +# Formants 4,5 are higher than F3. They affect the quality of the voice. +##The next 2 lines are settings that you can change. +formant 4 100 100 100 +formant 5 100 100 100 + +## Formants 6, 7, and 8 are weak, high frequency, additions to vowels to give a clearer sound. +##The next 3 lines are settings that you can change. +formant 6 100 100 100 +formant 7 100 100 100 +formant 8 100 100 100 + +##Intonation affects the rise and fall of the voice +## The settings are 1 default, 2 less intonation, 3 less intonation and commas do not raise the pitch, 4 the pitch rises at the end of a sentence rather than falling. +##The next line is a setting you can change. +intonation 1 + +# Setting the pitch range. The first number gives a base pitch to the voice (value in Hertz). The second number controls the range of pitches used by the voice. Setting it equal +# to the first number will give a monotone sounding voice. The default values are 82 and 118. +pitch 82 118 +## The tone setting. The first number on the setting line, 600, is the frequency setting for the amount of bass in the voice. +## The second number on the tone line is the volume of the bass frequency. You can set it from 0 to 255, 0 being the least amount, 255 being the most. +##The third number on the tone line, 1200, is the mid range frequency. The fourth number on the line is the setting to change the volume of the mid range frequency. +##0 being the least amount and 255 being the maximum. +## The fifth number on the tone line, 2000, is the treble frequency. The sixth number is the volume of the treble frequency. 0 is the minimum and 255 is the maximum. +## You will notice that all 3 frequencies are set to 255. +##The next line is a setting that you can change. +tone 600 255 1200 255 2000 255 +##This file does not include all of the settings that can be used to modify an E Speak voice. It is intended to get you familiar with what the settings do. +##However, you can go to http://espeak.sourceforge.net/voices.html and read further information about other settings that can be added and changed. I hope this helps, and Have fun. diff --git a/TTS/Piper/espeak-ng-data/voices/!v/UniRobot b/TTS/Piper/espeak-ng-data/voices/!v/UniRobot new file mode 100644 index 0000000000000000000000000000000000000000..f8892788da1acd19cae5f58c639e1ea08b205a5f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/UniRobot @@ -0,0 +1,19 @@ +language variant +name UniversalRobot +gender male +klatt 4 +pitch 100 160 +echo 10 10000 +formant 1 75 120 135 +formant 2 90 50 140 +formant 3 70 85 95 +formant 4 150 60 80 +formant 5 100 85 80 +formant 6 112 100 80 +formant 7 110 95 100 +formant 8 105 110 100 +consonants 125 100 +tone 530 250 770 100 215 225 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 120 130 130 90 0 0 120 120 +stressAmp 16 16 24 24 16 16 20 24 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/adam b/TTS/Piper/espeak-ng-data/voices/!v/adam new file mode 100644 index 0000000000000000000000000000000000000000..a9f3d2ae32ad344b6493a452ed6304039c512c74 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/adam @@ -0,0 +1,6 @@ +language variant +name Adam +klatt 6 +consonants 85 85 + +formant 1 100 100 130 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/anika b/TTS/Piper/espeak-ng-data/voices/!v/anika new file mode 100644 index 0000000000000000000000000000000000000000..2413c908c879b780b73edffba00dadf2cadca294 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/anika @@ -0,0 +1,25 @@ +language variant +name anika +gender female +pitch 200 300 +flutter 6 +stressAmp 20 18 20 20 20 22 22 22 + +roughness 0 + +formant 0 105 200 140 +formant 1 95 150 120 +formant 2 100 120 140 +formant 3 95 95 140 +formant 4 120 120 110 +formant 5 120 120 110 +formant 6 110 60 65 +formant 7 100 0 100 +formant 8 100 0 100 +intonation 10 +voicing 30 +consonants 60 40 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/anikaRobot b/TTS/Piper/espeak-ng-data/voices/!v/anikaRobot new file mode 100644 index 0000000000000000000000000000000000000000..791d2bbbb0c1a59a2a238abd728d0bb53ba3ffd9 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/anikaRobot @@ -0,0 +1,26 @@ +language variant +name anikaRobot +gender female +pitch 200 300 +flutter 1 +stressAmp 20 18 20 20 20 22 22 22 +echo 10 10000 + +roughness 0 + +formant 0 105 200 140 +formant 1 95 150 120 +formant 2 100 120 140 +formant 3 95 95 140 +formant 4 120 120 110 +formant 5 120 120 110 +formant 6 110 60 65 +formant 7 100 0 100 +formant 8 100 0 100 +intonation 10 +voicing 30 +consonants 60 40 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/announcer b/TTS/Piper/espeak-ng-data/voices/!v/announcer new file mode 100644 index 0000000000000000000000000000000000000000..71e0795d322ee12a3cc7f7feb984e0b61366a1f1 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/announcer @@ -0,0 +1,17 @@ +name Half-LifeAnnouncementSystem +language variant +pitch 37 83 +klatt 4 + +formant 1 88 100 100 0 +formant 2 96 100 100 0 +formant 3 98 100 100 0 +formant 4 96 100 100 0 +formant 5 100 100 100 0 +formant 6 100 100 100 0 +formant 7 100 100 100 0 +formant 8 100 100 100 0 + +voicing 70 +consonants 70 70 +echo 154 26 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/antonio b/TTS/Piper/espeak-ng-data/voices/!v/antonio new file mode 100644 index 0000000000000000000000000000000000000000..a41b681be53383ceec7b8da60598f45e0a948680 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/antonio @@ -0,0 +1,21 @@ +language variant +name Antonio +gender male + +pitch 82 128 +roughness 0 + +formant 0 100 150 90 +formant 1 90 130 90 +formant 2 95 120 80 +formant 3 100 50 80 +formant 4 100 40 80 +formant 5 90 70 80 +formant 6 0 0 0 +formant 7 100 100 100 +formant 8 100 100 100 +voicing 150 +tone 600 255 1200 255 2000 80 +intonation 3 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/aunty b/TTS/Piper/espeak-ng-data/voices/!v/aunty new file mode 100644 index 0000000000000000000000000000000000000000..7d721eec885ad34f33757f9e3eca1c8c7fc62323 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/aunty @@ -0,0 +1,19 @@ +language variant +name Auntie +gender female +pitch 204 176 +flutter 12 + +formant 0 88 85 154 +formant 1 115 80 160 -20 +formant 2 130 75 150 -200 +formant 3 123 75 150 +formant 4 125 80 150 +formant 5 125 80 150 +formant 6 110 80 150 +formant 7 110 75 150 +formant 8 110 75 150 + +stressAdd -20 -20 -20 -20 0 0 20 120 +stressAmp 18 16 20 20 20 20 20 20 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/belinda b/TTS/Piper/espeak-ng-data/voices/!v/belinda new file mode 100644 index 0000000000000000000000000000000000000000..9a9e42b97aaf21781d9fff9adf07438d2cf67c1e --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/belinda @@ -0,0 +1,20 @@ +language variant +name Belinda +gender female + +pitch 200 247 +flutter 3 + +formant 0 88 85 154 +formant 1 135 58 169 -30 +formant 2 120 70 150 -260 +formant 3 120 39 150 +formant 4 125 57 80 +formant 5 125 80 150 +formant 6 110 80 150 +formant 7 110 75 150 +formant 8 110 75 150 + +stressAdd -20 -20 -20 -20 0 3 20 12 +stressAmp 18 16 20 20 10 20 27 20 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/benjamin b/TTS/Piper/espeak-ng-data/voices/!v/benjamin new file mode 100644 index 0000000000000000000000000000000000000000..c3006438358a8bdfc3e6f3070966799013835042 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/benjamin @@ -0,0 +1,11 @@ +language variant +name Benjamin +klatt 6 +consonants 70 70 + +formant 1 101 100 130 +formant 2 102 100 100 +formant 3 100 100 100 +formant 4 100 100 100 470 +formant 5 100 100 100 350 +formant 6 100 100 100 100 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/boris b/TTS/Piper/espeak-ng-data/voices/!v/boris new file mode 100644 index 0000000000000000000000000000000000000000..02e03ced1e87eb7d663fe1051f2c0615ac4bcc2f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/boris @@ -0,0 +1,15 @@ +language variant +name Boris + +formant 0 47 120 100 +formant 1 100 90 75 +formant 2 104 100 75 +formant 3 57 80 75 +formant 4 104 80 75 +formant 5 107 80 75 +formant 6 68 0 75 +formant 7 105 0 75 +formant 8 105 0 75 + + + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/caleb b/TTS/Piper/espeak-ng-data/voices/!v/caleb new file mode 100644 index 0000000000000000000000000000000000000000..9c8a5b9ce9e954db5fd7e31199ab7cf0b5bfe44f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/caleb @@ -0,0 +1,5 @@ +language variant +name Caleb +klatt 6 +breath 100 +voicing 0 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/croak b/TTS/Piper/espeak-ng-data/voices/!v/croak new file mode 100644 index 0000000000000000000000000000000000000000..ae76a4c4deb77d53e7ee512c3e85f45ba802dd08 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/croak @@ -0,0 +1,11 @@ +language variant +name croak +gender male 70 + +pitch 85 117 +flutter 20 + +formant 0 100 80 110 + + + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/david b/TTS/Piper/espeak-ng-data/voices/!v/david new file mode 100644 index 0000000000000000000000000000000000000000..7dc75ddbc558f61e1fb8e62f44236b9a5f86f477 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/david @@ -0,0 +1,8 @@ +language variant +name David +klatt 6 +pitch 62 89 + +formant 1 75 100 100 +formant 2 85 100 100 +formant 3 85 100 100 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/ed b/TTS/Piper/espeak-ng-data/voices/!v/ed new file mode 100644 index 0000000000000000000000000000000000000000..7f293fc684f4b27c7e95cf81a7a82e335702bb17 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/ed @@ -0,0 +1,17 @@ +language variant +name Ed + +pitch 90 145 + +formant 0 110 120 200 5 +formant 1 102 100 80 +formant 2 101 120 100 +formant 3 100 80 75 +formant 4 150 30 80 +formant 5 95 95 155 +formant 6 167 100 75 +formant 7 100 200 75 +formant 8 60 200 95 +consonants 55 80 +voicing 100 +tone 650 250 1000 130 240 255 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/edward b/TTS/Piper/espeak-ng-data/voices/!v/edward new file mode 100644 index 0000000000000000000000000000000000000000..303f50518bcc86bd3810eea2b2861a0c95a69f09 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/edward @@ -0,0 +1,10 @@ +language variant +name Edward +klatt 5 +voicing 100 +consonants 70 80 + +formant 1 92 100 130 +formant 2 103 100 80 +formant 3 103 100 70 +formant 4 114 100 60 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/edward2 b/TTS/Piper/espeak-ng-data/voices/!v/edward2 new file mode 100644 index 0000000000000000000000000000000000000000..abee6aaa4c7d710c67698dd9a54900536b233427 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/edward2 @@ -0,0 +1,10 @@ +language variant +name Edward2 +klatt 6 +voicing 100 +consonants 70 80 + +formant 1 92 100 130 +formant 2 103 100 80 +formant 3 103 100 70 +formant 4 114 100 60 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/f1 b/TTS/Piper/espeak-ng-data/voices/!v/f1 new file mode 100644 index 0000000000000000000000000000000000000000..8f03a73a4722952860a41ec3800fdcb479806320 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/f1 @@ -0,0 +1,18 @@ +language variant +name female1 +gender female 70 + +pitch 140 200 +flutter 8 +roughness 4 +formant 0 115 80 150 +formant 1 120 80 180 +formant 2 100 70 150 150 +formant 3 115 70 150 +formant 4 110 80 150 +formant 5 110 90 150 +formant 6 105 80 150 +formant 7 110 70 150 +formant 8 110 70 150 + +stressAdd -10 -10 -20 -20 0 0 40 60 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/f2 b/TTS/Piper/espeak-ng-data/voices/!v/f2 new file mode 100644 index 0000000000000000000000000000000000000000..4122d96b39bf2bc1025a1c57ef01b8b03936773d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/f2 @@ -0,0 +1,21 @@ +language variant +name female2 +gender female + +pitch 142 220 +roughness 3 + +formant 0 105 80 150 +formant 1 110 80 160 +formant 2 110 70 150 +formant 3 110 70 150 +formant 4 115 80 150 +formant 5 115 80 150 +formant 6 110 70 150 +formant 7 110 70 150 +formant 8 110 70 150 + +stressAdd 0 0 -10 -10 0 0 10 40 +breath 0 2 3 3 3 3 3 2 +echo 140 10 +consonants 125 125 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/f3 b/TTS/Piper/espeak-ng-data/voices/!v/f3 new file mode 100644 index 0000000000000000000000000000000000000000..92a1582817dc2f8256db5a02bed320a05f6e5e43 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/f3 @@ -0,0 +1,22 @@ +language variant +name female3 +gender female + +pitch 140 240 +formant 0 105 80 150 +formant 1 120 75 150 -50 +formant 2 135 70 150 -250 +formant 3 125 80 150 +formant 4 125 80 150 +formant 5 125 80 150 +formant 6 120 70 150 +formant 7 110 70 150 +formant 8 110 70 150 + +stressAmp 18 18 20 20 20 20 20 20 +//breath 0 2 4 4 4 4 4 4 +breath 0 2 3 3 3 3 3 2 +echo 120 10 +roughness 4 + + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/f4 b/TTS/Piper/espeak-ng-data/voices/!v/f4 new file mode 100644 index 0000000000000000000000000000000000000000..52c5ac93561331143a9caea14d6c0f008216b4e9 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/f4 @@ -0,0 +1,18 @@ +language variant +name female4 +gender female + +echo 130 15 +pitch 142 200 +formant 0 120 80 150 +formant 1 115 80 160 -20 +formant 2 130 75 150 -200 +formant 3 123 75 150 +formant 4 125 80 150 +formant 5 125 80 150 +formant 6 110 80 150 +formant 7 110 75 150 +formant 8 110 75 150 + +stressAdd -20 -20 -20 -20 0 0 20 120 +stressAmp 18 16 20 20 20 20 20 20 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/f5 b/TTS/Piper/espeak-ng-data/voices/!v/f5 new file mode 100644 index 0000000000000000000000000000000000000000..7fa4f8826ae4d23cfd9770ea51413919e98df27f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/f5 @@ -0,0 +1,23 @@ +language variant +name female5 +gender female + +pitch 160 228 +roughness 0 + +formant 0 105 80 150 +formant 1 110 80 160 +formant 2 110 70 150 +formant 3 110 70 150 +formant 4 115 80 200 +formant 5 115 80 100 +formant 6 110 70 150 +formant 7 110 70 100 +formant 8 110 70 150 + +stressAdd 0 0 -10 -10 0 0 10 40 +breath 0 4 6 6 6 6 0 10 +echo 140 10 +voicing 75 +consonants 150 150 +breathw 150 150 200 200 400 400 600 600 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/fast b/TTS/Piper/espeak-ng-data/voices/!v/fast new file mode 100644 index 0000000000000000000000000000000000000000..a2c3da2a9d7656ba8e4c3d2ee025ac03af118396 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/fast @@ -0,0 +1,7 @@ +language variant +name fast_test + +// Try decreasing these values to make eSpeak's fastest speed faster. +// This is currently unstable. + +fast_test2 15 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/grandma b/TTS/Piper/espeak-ng-data/voices/!v/grandma new file mode 100644 index 0000000000000000000000000000000000000000..395ebe2203e880bc9366a1243074258d783906f2 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/grandma @@ -0,0 +1,17 @@ +language variant + +name grandma +gender female 90 +pitch 120 230 + +flutter 20 +formant 0 105 150 150 +formant 1 100 80 100 +formant 2 105 105 105 +formant 3 80 80 80 +formant 4 60 60 60 +formant 5 90 90 90 +formant 6 10 10 10 +formant 7 10 10 10 +formant 8 20 20 20 +voicing 50 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/grandpa b/TTS/Piper/espeak-ng-data/voices/!v/grandpa new file mode 100644 index 0000000000000000000000000000000000000000..41a870c3fbc182bef1102e1e7253c651ec836fc4 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/grandpa @@ -0,0 +1,14 @@ +language variant +name grandpa +pitch 80 120 +flutter 20 +formant 0 100 100 100 +formant 1 100 100 100 +formant 2 100 100 100 +formant 3 100 100 100 +formant 4 100 100 100 +formant 5 100 100 100 +formant 6 10 10 10 +formant 7 10 10 10 +formant 8 10 10 10 +intonation 1 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/gustave b/TTS/Piper/espeak-ng-data/voices/!v/gustave new file mode 100644 index 0000000000000000000000000000000000000000..ce1d71b947d2cf73f80571fe25f5909dd0e0fd0b --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/gustave @@ -0,0 +1,17 @@ +language variant +name Gustave + +pitch 80 123 + +formant 0 85 141 135 +formant 1 77 131 45 +formant 2 92 70 55 +formant 3 59 50 65 +formant 4 69 65 65 +formant 5 79 60 75 +formant 6 89 60 75 +formant 7 99 0 100 +formant 8 109 0 100 +voicing 135 +consonants 115 120 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/ian b/TTS/Piper/espeak-ng-data/voices/!v/ian new file mode 100644 index 0000000000000000000000000000000000000000..3e3d40901bdbd3e19cffc497ad6f7cd7a3e60bc1 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/ian @@ -0,0 +1,51 @@ +##Please note the 2 number signs, or pound signs in this file are for comments to help you to understand what the settings are and how to set them. +## Language sets the language of your voice. This setting is required for every voice that you make. +##The next line is a setting you can change. However if you don't know the language codes it may be best to leave the setting as it is. +language variant + +## The name setting is the name that will show up in the voice settings in the variant combo box. +##The next line is a setting you can change +name Ian + +##The formant settings +## Formant 0 is used to give a low frequency component to the sounds. +## The three numbers are frequency, strength, and Width, in that order. Please note, the numbers are seperated by a space. +##The next line is a setting you can change +formant 0 20 120 50 + +# Formants 1,2, and 3 are the standard three formants which define vowels. +##The next 3 lines are settings you can change +formant 1 80 80 80 +formant 2 80 80 80 +formant 3 80 80 80 + +# Formants 4,5 are higher than F3. They affect the quality of the voice. +##The next 2 lines are settings that you can change. +formant 4 50 50 50 +formant 5 50 50 50 + +## Formants 6, 7, and 8 are weak, high frequency, additions to vowels to give a clearer sound. +##The next 3 lines are settings that you can change. +formant 6 100 100 100 +formant 7 200 50 200 +formant 8 200 50 200 + +##Intonation affects the rise and fall of the voice +## The settings are 1 default, 2 less intonation, 3 less intonation and commas do not raise the pitch, 4 the pitch rises at the end of a sentence rather than falling. +##The next line is a setting you can change. +intonation 2 + +# Setting the pitch range. The first number gives a base pitch to the voice (value in Hertz). The second number controls the range of pitches used by the voice. +# Setting it equal to the first number will give a monotone sounding voice. The default values are 82 and 118. +pitch 69 96 + +## The tone setting. The first number on the setting line, 600, is the frequency setting for the amount of bass in the voice. +##The second number on the tone line is the volume of the bass frequency. You can set it from 0 to 255, 0 being the least amount, 255 being the most. +##The third number on the tone line, 1200, is the mid range frequency. The fourth number on the line is the setting to change the volume of the mid range frequency. +##0 being the least amount and 255 being the maximum. +## The fifth number on the tone line, 2000, is the treble frequency. The sixth number is the volume of the treble frequency. 0 is the minimum and 255 is the maximum. +## You will notice that all 3 frequencies are set to 255. +##The next line is a setting that you can change. +tone 1000 127 1200 127 2000 127 +##This file does not include all of the settings that can be used to modify an E Speak voice. It is intended to get you familiar with what the settings do. +##However, you can go to http://espeak.sourceforge.net/voices.html and read further information about other settings that can be added and changed. I hope this helps, and Have fun. diff --git a/TTS/Piper/espeak-ng-data/voices/!v/iven b/TTS/Piper/espeak-ng-data/voices/!v/iven new file mode 100644 index 0000000000000000000000000000000000000000..3b8c120263c6b0f18bd764408d5e79857986c062 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/iven @@ -0,0 +1,14 @@ +language variant +name Iven +pitch 74 118 +formant 0 52 133 88 +formant 1 87 82 76 +formant 2 94 56 42 +formant 3 93 52 130 +formant 4 110 76 65 +formant 5 102 45 20 +formant 6 40 50 50 +formant 7 60 50 60 +formant 8 100 50 40 +voicing 530 +tone 600 255 1200 255 2000 160 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/iven2 b/TTS/Piper/espeak-ng-data/voices/!v/iven2 new file mode 100644 index 0000000000000000000000000000000000000000..e61fd73538ada58b0ea12791fe160d0b75093952 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/iven2 @@ -0,0 +1,15 @@ +language variant +name Iven2 +pitch 74 118 +formant 0 52 133 88 +formant 1 87 82 76 +formant 2 94 56 42 +formant 3 93 52 130 +formant 4 110 76 65 +formant 5 102 45 20 +formant 6 40 50 50 +formant 7 60 50 60 +formant 8 100 50 40 +voicing 220 +consonants 28 42 +tone 600 255 1200 255 2000 150 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/iven3 b/TTS/Piper/espeak-ng-data/voices/!v/iven3 new file mode 100644 index 0000000000000000000000000000000000000000..a58e74599e84a95be7c95ddc57b326cf9bed2545 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/iven3 @@ -0,0 +1,14 @@ +language variant +name Iven3 +pitch 74 118 +formant 0 52 133 88 +formant 1 87 82 76 +formant 2 94 56 42 +formant 3 93 52 130 +formant 4 110 76 65 +formant 5 102 45 20 +formant 6 40 50 50 +formant 7 60 50 60 +formant 8 100 50 40 +voicing 165 +tone 600 255 1200 255 2000 160 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/iven4 b/TTS/Piper/espeak-ng-data/voices/!v/iven4 new file mode 100644 index 0000000000000000000000000000000000000000..43084c15d1ec12ec4170e886d914c06491c2e01f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/iven4 @@ -0,0 +1,14 @@ +language variant +name Iven4 +pitch 74 118 +formant 0 52 133 88 +formant 1 87 82 76 +formant 2 94 56 42 +formant 3 93 52 130 +formant 4 110 76 65 +formant 5 102 45 20 +formant 6 40 50 50 +formant 7 60 50 60 +formant 8 100 50 40 +voicing 165 +tone 600 170 1200 100 2000 40 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/john b/TTS/Piper/espeak-ng-data/voices/!v/john new file mode 100644 index 0000000000000000000000000000000000000000..dce9446a0171b0759a406c8114910e0db96c2fa6 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/john @@ -0,0 +1,50 @@ +##Please note the 2 number signs, or pound signs in this file are for comments to help you to understand what the settings are and how to set them. +## Language sets the language of your voice. This setting is required for every voice that you make. +##The next line is a setting you can change. However if you don't know the language codes it may be best to leave the setting as it is. +language variant + +## The name setting is the name that will show up in the voice settings in the variant combo box. +##The next line is a setting you can change +name John + +##The formant settings +## Formant 0 is used to give a low frequency component to the sounds. +## The three numbers are frequency, strength, and Width, in that order. Please note, the numbers are seperated by a space. +##The next line is a setting you can change +formant 0 100 100 100 + +# Formants 1,2, and 3 are the standard three formants which define vowels. +##The next 3 lines are settings you can change +formant 1 100 100 100 +formant 2 100 100 100 +formant 3 100 100 100 + +# Formants 4,5 are higher than F3. They affect the quality of the voice. +##The next 2 lines are settings that you can change. +formant 4 100 100 100 +formant 5 100 100 100 + +## Formants 6, 7, and 8 are weak, high frequency, additions to vowels to give a clearer sound. +##The next 3 lines are settings that you can change. +formant 6 100 100 100 +formant 7 100 100 100 +formant 8 100 100 100 + +##Intonation affects the rise and fall of the voice +## The settings are 1 default, 2 less intonation, 3 less intonation and commas do not raise the pitch, 4 the pitch rises at the end of a sentence rather than falling. +##The next line is a setting you can change. +intonation 1 + +# Setting the pitch range. The first number gives a base pitch to the voice (value in Hertz). The second number controls the range of pitches used by the voice. +# Setting it equal to the first number will give a monotone sounding voice. The default values are 82 and 118. +pitch 82 118 +## The tone setting. The first number on the setting line, 600, is the frequency setting for the amount of bass in the voice. +##The second number on the tone line is the volume of the bass frequency. You can set it from 0 to 255, 0 being the least amount, 255 being the most. +##The third number on the tone line, 1200, is the mid range frequency. The fourth number on the line is the setting to change the volume of the mid range frequency. +##0 being the least amount and 255 being the maximum. +## The fifth number on the tone line, 2000, is the treble frequency. The sixth number is the volume of the treble frequency. 0 is the minimum and 255 is the maximum. +## You will notice that all 3 frequencies are set to 255. +##The next line is a setting that you can change. +tone 600 255 1200 255 2000 255 +##This file does not include all of the settings that can be used to modify an E Speak voice. It is intended to get you familiar with what the settings do. +##However, you can go to http://espeak.sourceforge.net/voices.html and read further information about other settings that can be added and changed. I hope this helps, and Have fun. diff --git a/TTS/Piper/espeak-ng-data/voices/!v/kaukovalta b/TTS/Piper/espeak-ng-data/voices/!v/kaukovalta new file mode 100644 index 0000000000000000000000000000000000000000..82cda3318cf631d5840890f2f39af46c6274f18f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/kaukovalta @@ -0,0 +1,16 @@ +language variant +name Kaukovalta +formant 0 80 80 100 +formant 1 40 80 100 +formant 2 70 100 130 +formant 3 80 100 60 +formant 4 70 90 100 +formant 5 70 90 100 +formant 6 70 100 90 + formant 7 100 90 110 +formant 8 100 95 100 +pitch 70 120 +tone 100 130 800 130 2000 130 +consonants 70 70 +roughness 4 + \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/klatt b/TTS/Piper/espeak-ng-data/voices/!v/klatt new file mode 100644 index 0000000000000000000000000000000000000000..b739a86e488eeec6f5693b7ee2590f84d6c95191 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/klatt @@ -0,0 +1,4 @@ +language variant +name klatt +klatt 1 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/klatt2 b/TTS/Piper/espeak-ng-data/voices/!v/klatt2 new file mode 100644 index 0000000000000000000000000000000000000000..01477be5465c04d4cfd46ab95003f17445731d74 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/klatt2 @@ -0,0 +1,4 @@ +language variant +name klatt2 +klatt 2 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/klatt3 b/TTS/Piper/espeak-ng-data/voices/!v/klatt3 new file mode 100644 index 0000000000000000000000000000000000000000..b1a874be65ad7df189c933f4c576475f29d15f67 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/klatt3 @@ -0,0 +1,4 @@ +language variant +name klatt3 +klatt 3 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/klatt4 b/TTS/Piper/espeak-ng-data/voices/!v/klatt4 new file mode 100644 index 0000000000000000000000000000000000000000..65278087cbd1ab1d32164f458d385ec8a61131d0 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/klatt4 @@ -0,0 +1,4 @@ +language variant +name klatt4 +klatt 4 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/klatt5 b/TTS/Piper/espeak-ng-data/voices/!v/klatt5 new file mode 100644 index 0000000000000000000000000000000000000000..9d831fb213106b80bd42497099550cb56ac6e240 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/klatt5 @@ -0,0 +1,4 @@ +language variant +name klatt5 +klatt 5 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/klatt6 b/TTS/Piper/espeak-ng-data/voices/!v/klatt6 new file mode 100644 index 0000000000000000000000000000000000000000..7656ab355205ae2a1cf613f787b3126da659e3d3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/klatt6 @@ -0,0 +1,4 @@ +language variant +name klatt6 +klatt 6 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/linda b/TTS/Piper/espeak-ng-data/voices/!v/linda new file mode 100644 index 0000000000000000000000000000000000000000..a56a8b05337ad8f8c5916061e887367aab35c617 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/linda @@ -0,0 +1,20 @@ +language variant +name Linda +gender female + +#echo 130 15 +pitch 200 247 +flutter 3 +formant 0 88 85 154 +formant 1 135 58 169 -30 +formant 2 131 75 152 -260 +formant 3 123 75 150 +formant 4 125 80 150 +formant 5 125 80 150 +formant 6 110 80 150 +formant 7 110 75 150 +formant 8 110 75 150 + +stressAdd -20 -20 -20 -20 0 3 20 120 +stressAmp 18 16 20 20 20 20 27 20 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/m1 b/TTS/Piper/espeak-ng-data/voices/!v/m1 new file mode 100644 index 0000000000000000000000000000000000000000..4cc9a00bf7597081158aad2e9a60ca1571259406 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/m1 @@ -0,0 +1,20 @@ +language variant +name male1 +gender male 70 + +pitch 75 109 +flutter 5 +roughness 4 +consonants 80 100 + +formant 0 98 100 100 +formant 1 97 100 100 +formant 2 97 95 100 +formant 3 97 95 100 +formant 4 97 85 100 +formant 5 105 80 100 +formant 6 95 80 100 +formant 7 100 100 100 +formant 8 100 100 100 + +//stressAdd -10 -10 -20 -20 0 0 40 70 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/m2 b/TTS/Piper/espeak-ng-data/voices/!v/m2 new file mode 100644 index 0000000000000000000000000000000000000000..c234f46877a761d5c98fda2cbbeb172dc2efc81a --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/m2 @@ -0,0 +1,15 @@ +language variant +name male2 +gender male + +pitch 88 115 +echo 130 15 +formant 0 100 80 120 +formant 1 90 85 120 +formant 2 110 85 120 +formant 3 105 90 120 +formant 4 100 90 120 +formant 5 100 90 120 +formant 6 100 90 120 +formant 7 100 90 120 +formant 8 100 90 120 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/m3 b/TTS/Piper/espeak-ng-data/voices/!v/m3 new file mode 100644 index 0000000000000000000000000000000000000000..00479dc35082ef3724f143d895514567913d7c61 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/m3 @@ -0,0 +1,17 @@ +language variant +name male3 +gender male + +pitch 80 122 +formant 0 100 100 100 +formant 1 96 97 100 +formant 2 96 97 100 +formant 3 96 103 100 +formant 4 95 103 100 +formant 5 95 103 100 +formant 6 100 100 100 +formant 7 100 100 100 +formant 8 100 100 100 + +consonants 100 +stressAdd 10 10 0 0 0 0 -30 -30 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/m4 b/TTS/Piper/espeak-ng-data/voices/!v/m4 new file mode 100644 index 0000000000000000000000000000000000000000..7199341c34f93f5fa5219ff479e82edaee5d7936 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/m4 @@ -0,0 +1,17 @@ +language variant +name male4 +gender male + +pitch 70 110 + +formant 0 103 100 100 +formant 1 103 100 100 +formant 2 103 100 100 +formant 3 103 100 100 +formant 4 106 100 100 +formant 5 106 100 100 +formant 6 106 100 100 +formant 7 103 100 100 +formant 8 103 100 100 + +stressAdd -10 -10 -30 -30 0 0 60 90 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/m5 b/TTS/Piper/espeak-ng-data/voices/!v/m5 new file mode 100644 index 0000000000000000000000000000000000000000..d25865608d7d973e77c77d13bbdbe3ae454d864d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/m5 @@ -0,0 +1,15 @@ +language variant +name male5 +gender male + +formant 0 100 85 130 +formant 1 90 85 130 40 +formant 2 80 85 130 310 +formant 3 105 85 130 +formant 4 105 85 130 +formant 5 105 85 130 +formant 6 105 85 150 +formant 7 105 85 150 +formant 8 105 85 150 + +intonation 2 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/m6 b/TTS/Piper/espeak-ng-data/voices/!v/m6 new file mode 100644 index 0000000000000000000000000000000000000000..bd336a9884877889e2f85ee1849f8a068d2c6279 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/m6 @@ -0,0 +1,13 @@ +language variant +name male6 +gender male + +pitch 82 117 + +formant 0 100 90 120 +formant 1 100 90 140 +formant 2 100 70 140 +formant 3 100 75 140 +formant 4 100 80 140 +formant 5 100 80 140 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/m7 b/TTS/Piper/espeak-ng-data/voices/!v/m7 new file mode 100644 index 0000000000000000000000000000000000000000..11b49ed2a71db37f9af7c8305ec4006adc84bef3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/m7 @@ -0,0 +1,17 @@ +language variant +name male7 +gender male + +pitch 75 125 + +formant 0 100 125 100 +formant 1 100 90 80 +formant 2 100 70 90 +formant 3 100 60 90 +formant 4 100 60 90 +formant 5 75 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 +voicing 155 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/m8 b/TTS/Piper/espeak-ng-data/voices/!v/m8 new file mode 100644 index 0000000000000000000000000000000000000000..c03ca3eb300cb60e8a84c3fb514695871128bcb5 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/m8 @@ -0,0 +1,16 @@ +language variant +name male8 +gender male 50 + +pitch 65 102 +formant 0 100 125 100 +formant 1 96 90 80 +formant 2 97 70 90 +formant 3 97 60 90 +formant 4 97 60 90 +formant 5 100 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/marcelo b/TTS/Piper/espeak-ng-data/voices/!v/marcelo new file mode 100644 index 0000000000000000000000000000000000000000..8df9651b7a72e811a25e6ec14c578d7e4f9f4c30 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/marcelo @@ -0,0 +1,17 @@ +language variant +name Marcelo + +pitch 65 115 + +formant 0 65 161 35 +formant 1 75 131 65 +formant 2 90 60 40 +formant 3 59 50 55 +formant 4 69 65 35 +formant 5 69 60 25 +formant 6 59 60 35 +formant 7 149 0 10 +formant 8 199 0 90 +voicing 135 +consonants 115 120 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/max b/TTS/Piper/espeak-ng-data/voices/!v/max new file mode 100644 index 0000000000000000000000000000000000000000..e3c2889b9e8082512f9f280427d2ed5a29232b76 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/max @@ -0,0 +1,15 @@ +language variant +name Max + +formant 0 90 120 100 +formant 1 100 100 75 +formant 2 100 100 75 +formant 3 100 80 75 +formant 4 100 80 75 +formant 5 100 80 75 +formant 6 100 0 75 +formant 7 100 0 75 +formant 8 100 0 75 + + + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/michel b/TTS/Piper/espeak-ng-data/voices/!v/michel new file mode 100644 index 0000000000000000000000000000000000000000..b9b5ecbd5aa4b571d56820d72ac10ace83438a5f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/michel @@ -0,0 +1,22 @@ +language variant +name Michel +gender male 25 +pitch 82 122 +echo 0 0 +flutter 0 +roughness 0 +stressAmp 20 18 20 20 20 22 22 22 + + +formant 0 105 200 140 +formant 1 95 150 120 +formant 2 100 120 140 +formant 3 95 95 140 +formant 4 30 30 30 -100 +formant 5 90 90 90 +formant 6 110 60 65 +formant 7 100 0 100 +formant 8 100 0 100 +voicing 35 +consonants 60 40 +tone 400 160 1500 100 3000 70 4500 40 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/miguel b/TTS/Piper/espeak-ng-data/voices/!v/miguel new file mode 100644 index 0000000000000000000000000000000000000000..53d71e78caea5f6868ee304f7125ea83e733b9af --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/miguel @@ -0,0 +1,22 @@ +language variant +name Miguel +gender male 25 +pitch 80 130 +echo 0 0 +flutter 0 +roughness 0 +stressAmp 20 18 20 20 20 22 22 22 + + +formant 0 105 200 140 +formant 1 95 150 120 +formant 2 100 120 140 +formant 3 95 95 140 +formant 4 30 30 30 -100 +formant 5 90 90 90 +formant 6 110 60 65 +formant 7 100 0 100 +formant 8 100 0 100 +voicing 35 +consonants 60 40 +tone 300 240 400 160 1500 100 3000 70 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/mike2 b/TTS/Piper/espeak-ng-data/voices/!v/mike2 new file mode 100644 index 0000000000000000000000000000000000000000..2715f4d04fb4b2f9f7a91da8f5a74b2a19eea21f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/mike2 @@ -0,0 +1,12 @@ +language variant +name Mike2 +klatt 6 +voicing 170 +pitch 67 107 +formant 1 95 100 100 +formant 2 95 100 100 +formant 3 105 100 100 +formant 4 115 100 100 +formant 5 115 100 100 + +consonants 70 150 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/norbert b/TTS/Piper/espeak-ng-data/voices/!v/norbert new file mode 100644 index 0000000000000000000000000000000000000000..a210789ab3acacf7d85676e8af8eb221795762b3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/norbert @@ -0,0 +1,50 @@ +##Please note the 2 number signs, or pound signs in this file are for comments to help you to understand what the settings are and how to set them. +## Language sets the language of your voice. This setting is required for every voice that you make. +##The next line is a setting you can change. However if you don't know the language codes it may be best to leave the setting as it is. +language variant + +## The name setting is the name that will show up in the voice settings in the variant combo box. +##The next line is a setting you can change +name norbert + +##The formant settings +## Formant 0 is used to give a low frequency component to the sounds. +## The three numbers are frequency, strength, and Width, in that order. Please note, the numbers are seperated by a space. +##The next line is a setting you can change +formant 0 100 100 100 + +# Formants 1,2, and 3 are the standard three formants which define vowels. +##The next 3 lines are settings you can change +formant 1 100 100 100 +formant 2 75 50 100 +formant 3 100 100 100 + +# Formants 4,5 are higher than F3. They affect the quality of the voice. +##The next 2 lines are settings that you can change. +formant 4 100 100 100 +formant 5 100 100 100 + +## Formants 6, 7, and 8 are weak, high frequency, additions to vowels to give a clearer sound. +##The next 3 lines are settings that you can change. +formant 6 100 100 100 +formant 7 100 100 100 +formant 8 100 100 100 + +##Intonation affects the rise and fall of the voice +## The settings are 1 default, 2 less intonation, 3 less intonation and commas do not raise the pitch, 4 the pitch rises at the end of a sentence rather than falling. +##The next line is a setting you can change. +intonation 1 + +# Setting the pitch range. The first number gives a base pitch to the voice (value in Hertz). The second number controls the range of pitches used by the voice. Setting it equal +# to the first number will give a monotone sounding voice. The default values are 82 and 118. +pitch 82 118 +## The tone setting. The first number on the setting line, 600, is the frequency setting for the amount of bass in the voice. +## The second number on the tone line is the volume of the bass frequency. You can set it from 0 to 255, 0 being the least amount, 255 being the most. +##The third number on the tone line, 1200, is the mid range frequency. The fourth number on the line is the setting to change the volume of the mid range frequency. +##0 being the least amount and 255 being the maximum. +## The fifth number on the tone line, 2000, is the treble frequency. The sixth number is the volume of the treble frequency. 0 is the minimum and 255 is the maximum. +## You will notice that all 3 frequencies are set to 255. +##The next line is a setting that you can change. +tone 600 255 1000 100 5000 255 +##This file does not include all of the settings that can be used to modify an E Speak voice. It is intended to get you familiar with what the settings do. +##However, you can go to http://espeak.sourceforge.net/voices.html and read further information about other settings that can be added and changed. I hope this helps, and Have fun. diff --git a/TTS/Piper/espeak-ng-data/voices/!v/pablo b/TTS/Piper/espeak-ng-data/voices/!v/pablo new file mode 100644 index 0000000000000000000000000000000000000000..031e5fe7e4526901a3f071d01ee7c72ef7f83c7d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/pablo @@ -0,0 +1,52 @@ +##Pleas note the 2 number signs, or pound signs in this file are for comments to help you to understand what the settings are and how to set them. +## Language sets the language of your voice. This setting is required for every voice that you make. +##The next line is a setting you can change. However if you don't know the language codes it may be best to leave the setting as it is. +language variant + +## The name setting is the name that will show up in the voice settings in the variant combo box. +##The next line is a setting you can change +name Pablo + +##The formant settings +## Formant 0 is used to give a low frequency component to the sounds. +## The three numbers are frequency, strength, and Width, in that order. Please note, the numbers are seperated by a space. +##The next line is a setting you can change +formant 0 90 100 90 + +# Formants 1,2, and 3 are the standard three formants which define vowels. +##The next 3 lines are settings you can change +formant 1 95 100 80 +formant 2 97 100 80 +formant 3 98 90 80 + +# Formants 4,5 are higher than F3. They affect the quality of the voice. +##The next 2 lines are settings that you can change. +formant 4 110 100 100 +formant 5 110 100 100 + +## Formants 6, 7, and 8 are weak, high frequency, additions to vowels to give a clearer sound. +##The next 3 lines are settings that you can change. +formant 6 100 100 100 +formant 7 100 100 100 +formant 8 100 100 100 + +##Intonation affects the rise and fall of the voice +## The settings are 1 default, 2 less intonation, 3 less intonation and commas do not raise the pitch, 4 the pitch rises at the end of a sentence rather than falling. +##The next line is a setting you can change. +intonation 3 +echo 30 30 +# Setting the pitch range. The first number gives a base pitch to the voice (value in Hertz). The second number controls the range of pitches used by the voice. Setting it equal +# to the first number will give a monotone sounding voice. The default values are 82 and 118. +pitch 82 130 +## The tone setting. The first number on the setting line, 600, is the frequency setting for the amount of bass in the voice. +## The second number on the tone line is the volume of the bass frequency. You can set it from 0 to 255, 0 being the least amount, 255 being the most. +##The third number on the tone line, 1200, is the mid range frequency. The fourth number on the line is the setting to change the volume of the mid range frequency. +## 0 being the least amount and 255 being the maximum. +## The fifth number on the tone line, 2000, is the treble frequency. The sixth number is the volume of the treble frequency. 0 is the minimum and 255 is the maximum. +## You will notice that all 3 frequencies are set to 255. +##The next line is a setting that you can change. +tone 600 255 1200 200 2000 255 + +##This file does not include all of the settings that can be used to modify an E Speak voice. It is intended to get you familiar with what the settings do. +#However, you can go to http://espeak.sourceforge.net/voices.html and read further information about other settings that can be added and changed. I hope this helps, and Have fun. + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/paul b/TTS/Piper/espeak-ng-data/voices/!v/paul new file mode 100644 index 0000000000000000000000000000000000000000..9015cd3756624017a0e6ff975ceddc06b75cadb2 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/paul @@ -0,0 +1,17 @@ +language variant +name Paul + +pitch 70 100 + +formant 0 90 120 100 +formant 1 103 100 75 +formant 2 98 100 75 +formant 3 100 80 75 +formant 4 102 30 100 +formant 5 100 80 100 +formant 6 100 80 75 +formant 7 100 0 75 +formant 8 100 60 75 +consonants 90 60 +voicing 230 +tone 420 255 1300 130 4000 100 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/pedro b/TTS/Piper/espeak-ng-data/voices/!v/pedro new file mode 100644 index 0000000000000000000000000000000000000000..5cc34db2c249581d67f2e03d6c455088d70f21c3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/pedro @@ -0,0 +1,23 @@ +language variant + +name Pedro + +formant 0 100 150 100 + +formant 1 95 100 80 +formant 2 95 100 80 +formant 3 100 100 90 + +formant 4 100 100 100 +formant 5 100 100 100 + +formant 6 100 100 100 +formant 7 100 100 100 +formant 8 100 100 100 + +intonation 3 + +pitch 82 118 +tone 600 255 1200 255 2000 255 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/quincy b/TTS/Piper/espeak-ng-data/voices/!v/quincy new file mode 100644 index 0000000000000000000000000000000000000000..dd75dadb81ca340f2e71171eb4d364e3aa22c1de --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/quincy @@ -0,0 +1,20 @@ +language variant +name Quincy + +pitch 67 100 + +formant 0 85 108 106 3 +formant 1 97 110 56 +formant 2 96 80 60 +formant 3 101 50 50 +formant 4 110 33 55 +formant 5 110 22 65 +formant 6 77 60 60 65 +formant 7 66 0 100 +formant 8 100 0 100 +voicing 99 +consonants 66 90 + +roughness 0 +tone 600 170 1200 100 2000 70 +stressAmp 16 16 24 20 20 16 28 24 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/rob b/TTS/Piper/espeak-ng-data/voices/!v/rob new file mode 100644 index 0000000000000000000000000000000000000000..d7c7ae4e16b403549d2c9fcd64d67c132b19183d --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/rob @@ -0,0 +1,17 @@ +language variant +name Rob + +pitch 50 130 +formant 0 100 100 100 +formant 1 95 100 60 +formant 2 97 90 50 +formant 3 101 70 50 +formant 4 110 65 55 +formant 5 110 70 65 +formant 6 110 70 65 +formant 7 0 0 0 +formant 8 0 0 0 + +voicing 115 +consonants 110 120 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robert b/TTS/Piper/espeak-ng-data/voices/!v/robert new file mode 100644 index 0000000000000000000000000000000000000000..46f50758e19dc5201baea7eba9b5c2ab4fb276a1 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robert @@ -0,0 +1,17 @@ +language variant +name Robert + +pitch 65 115 + +formant 0 85 108 100 +formant 1 95 110 60 +formant 2 97 90 50 +formant 3 101 50 50 +formant 4 110 65 55 +formant 5 110 60 65 +formant 6 110 60 65 +formant 7 100 0 100 +formant 8 100 0 100 +voicing 115 +consonants 110 120 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robosoft b/TTS/Piper/espeak-ng-data/voices/!v/robosoft new file mode 100644 index 0000000000000000000000000000000000000000..0668d9ab71bec7f70c7111569daef3dfda956dd2 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robosoft @@ -0,0 +1,26 @@ +language variant +name Robosoft +echo 30 1000 +klatt 5 + +pitch 60 90 +formant 0 100 125 100 +formant 1 96 90 80 +formant 2 97 70 90 +formant 3 97 60 90 +formant 4 97 60 90 +formant 5 100 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 + +roughness 50 + +intonation 0 +voicing 80 +consonants 110 120 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robosoft2 b/TTS/Piper/espeak-ng-data/voices/!v/robosoft2 new file mode 100644 index 0000000000000000000000000000000000000000..1695414aed649d6ae164e9c3ff543da8f1cd7ad3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robosoft2 @@ -0,0 +1,26 @@ +language variant +name Robosoft2 +echo 10 600 +klatt 4 + +pitch 70 100 +formant 0 100 125 100 +formant 1 96 90 80 +formant 2 97 70 90 +formant 3 97 60 90 +formant 4 97 60 90 +formant 5 100 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 + +roughness 75 + +intonation -25 +voicing 80 +consonants 110 120 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robosoft3 b/TTS/Piper/espeak-ng-data/voices/!v/robosoft3 new file mode 100644 index 0000000000000000000000000000000000000000..15bbe347846484ec77b8c53e4cc8b66ee1f15fe8 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robosoft3 @@ -0,0 +1,26 @@ +language variant +name Robosoft3 +echo 10 10000 +klatt 4 + +pitch 75 115 +formant 0 100 125 100 +formant 1 96 90 80 +formant 2 97 70 90 +formant 3 97 60 90 +formant 4 97 60 90 +formant 5 100 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 + +roughness 5 + +intonation 10 +voicing 150 +consonants 110 120 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robosoft4 b/TTS/Piper/espeak-ng-data/voices/!v/robosoft4 new file mode 100644 index 0000000000000000000000000000000000000000..5161a4fea38c8558c0834ad9657fda1124e95db1 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robosoft4 @@ -0,0 +1,25 @@ +language variant +name Robosoft4 +echo 10 10000 + +pitch 75 115 +formant 0 100 125 100 +formant 1 96 90 80 +formant 2 97 70 90 +formant 3 97 60 90 +formant 4 97 60 90 +formant 5 100 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 + +roughness 5 + +intonation 10 +voicing 150 +consonants 110 120 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robosoft5 b/TTS/Piper/espeak-ng-data/voices/!v/robosoft5 new file mode 100644 index 0000000000000000000000000000000000000000..2420f89c48c64937313049ce6488f54a03c83268 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robosoft5 @@ -0,0 +1,25 @@ +language variant +name Robosoft5 +echo 10 10000 + +pitch 75 115 +formant 0 100 125 100 +formant 1 96 90 80 +formant 2 97 70 90 +formant 3 97 60 90 +formant 4 97 60 90 +formant 5 100 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 + +roughness 0 + +intonation 10 +voicing 150 +consonants 60 40 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 +stressAmp 16 16 24 24 16 16 20 24 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robosoft6 b/TTS/Piper/espeak-ng-data/voices/!v/robosoft6 new file mode 100644 index 0000000000000000000000000000000000000000..d3be1588fa7517e6ac6c6d92689a9029b8b97d64 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robosoft6 @@ -0,0 +1,15 @@ +language variant +name Robosoft6 +echo 40 10000 +pitch 150 150 +formant 0 100 125 100 +formant 1 96 90 80 +formant 2 97 70 90 +formant 3 97 60 90 +formant 4 97 60 90 +formant 5 100 50 90 +formant 6 90 50 100 +formant 7 100 50 100 +formant 8 100 50 100 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robosoft7 b/TTS/Piper/espeak-ng-data/voices/!v/robosoft7 new file mode 100644 index 0000000000000000000000000000000000000000..25bf759b738a0262170fbd9f2007506537f82306 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robosoft7 @@ -0,0 +1,25 @@ +language variant +name Robosoft7 +echo 10 10000 + +pitch 75 115 + +formant 0 90 120 100 +formant 1 100 100 75 +formant 2 100 100 75 +formant 3 100 80 75 +formant 4 100 80 75 +formant 5 100 80 75 +formant 6 100 0 75 +formant 7 100 0 75 +formant 8 100 0 75 + +roughness 0 + +intonation 10 +voicing 150 +consonants 60 40 +stressLength 0 1 2 3 4 5 6 7 +stressAdd 130 140 140 100 0 0 130 160 + +tone 100 255 600 70 1200 22 2000 66 3000 12 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/robosoft8 b/TTS/Piper/espeak-ng-data/voices/!v/robosoft8 new file mode 100644 index 0000000000000000000000000000000000000000..5c84bd5f18aa3d304828373dac51ce926d245cdc --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/robosoft8 @@ -0,0 +1,16 @@ +language variant +name Robosoft8 +echo 40 10000 +pitch 150 150 +formant 0 90 120 100 +formant 1 100 100 75 +formant 2 100 100 75 +formant 3 100 80 75 +formant 4 100 80 75 +formant 5 100 80 75 +formant 6 100 0 75 +formant 7 100 0 75 +formant 8 100 0 75 + + + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/sandro b/TTS/Piper/espeak-ng-data/voices/!v/sandro new file mode 100644 index 0000000000000000000000000000000000000000..6dcfe02f7a5b32f6960c23d913d627377ef54207 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/sandro @@ -0,0 +1,25 @@ +// This file is UTF-8 encoded +// Variant sandro (ver.25-3) for eSpeak-ng Copyright (C)2019 by Lolo vmanolo301@gmail.com + +language variant +name sandro +gender male + +formant 0 95 146 100 +formant 1 98 90 100 +formant 2 103 98 100 +formant 3 100 90 100 +formant 4 100 101 100 +formant 5 110 120 100 2123 +formant 6 100 100 100 1200 +formant 7 32 125 80 600 +formant 8 34 95 30 49 + +voicing 165 +consonants 194 255 +pitch 78 115 +roughness 3 +breath 20 5 2 10 5 0 27 100 +breathw 255 255 60 180 160 255 255 255 + +tone 500 210 470 70 160 155 2985 32 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/shelby b/TTS/Piper/espeak-ng-data/voices/!v/shelby new file mode 100644 index 0000000000000000000000000000000000000000..21292d418f95d73dc4eb1e8eacc6f4ef17deee90 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/shelby @@ -0,0 +1,18 @@ +language variant +name shelby +flutter 0 +roughness 0 + +formant 0 100 160 190 +formant 1 90 90 90 +formant 2 140 140 140 +formant 3 130 150 130 +formant 4 110 110 110 +formant 5 120 120 110 +formant 6 10 10 10 +formant 7 10 10 10 +formant 8 10 10 10 + +pitch 100 210 +voicing 40 +consonants 90 70 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/steph b/TTS/Piper/espeak-ng-data/voices/!v/steph new file mode 100644 index 0000000000000000000000000000000000000000..e60b0dc6393ffc383705e840a90ebae67a4fbd8c --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/steph @@ -0,0 +1,21 @@ +language variant +name Steph +gender female + +pitch 166 200 +flutter 1 +roughness 0 +tone 100 255 600 70 1200 22 2000 66 3000 12 + +formant 0 99 80 150 +formant 1 120 60 160 +formant 2 99 70 110 150 +formant 3 116 77 150 +formant 4 9 59 110 +formant 5 100 50 2 +formant 6 104 80 150 +formant 7 110 70 150 +formant 8 110 70 150 + +stressAmp 16 16 24 24 16 16 20 24 +consonants 55 90 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/steph2 b/TTS/Piper/espeak-ng-data/voices/!v/steph2 new file mode 100644 index 0000000000000000000000000000000000000000..6ac109be67537a5f525f733c188f3f202df160ad --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/steph2 @@ -0,0 +1,21 @@ +language variant +name Steph2 +gender female + +pitch 166 200 +flutter 1 +roughness 0 +tone 100 255 600 70 1200 22 2000 66 3000 12 + +formant 0 99 100 150 +formant 1 120 80 160 +formant 2 99 90 110 150 +formant 3 116 97 150 +formant 4 9 73 116 +formant 5 100 70 2 +formant 6 104 100 150 +formant 7 110 90 150 +formant 8 110 90 150 + +stressAmp 16 16 24 24 16 16 20 24 +consonants 55 90 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/steph3 b/TTS/Piper/espeak-ng-data/voices/!v/steph3 new file mode 100644 index 0000000000000000000000000000000000000000..a92575582d63f0454d78af8857be123fc5546ac7 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/steph3 @@ -0,0 +1,22 @@ +language variant +name Steph3 +gender female + +pitch 166 200 +flutter 1 +roughness 0 +voicing 200 +tone 100 255 600 70 1200 22 2000 66 3000 12 + +formant 0 99 80 150 +formant 1 120 60 160 +formant 2 99 70 110 150 +formant 3 116 77 150 +formant 4 9 59 110 +formant 5 100 50 2 +formant 6 104 80 150 +formant 7 110 70 150 +formant 8 110 70 150 + +stressAmp 16 16 24 24 16 16 20 24 +consonants 70 90 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/travis b/TTS/Piper/espeak-ng-data/voices/!v/travis new file mode 100644 index 0000000000000000000000000000000000000000..56c22f94020ca3fd164d075b11975f883c6e4ba0 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/travis @@ -0,0 +1,23 @@ +language variant +name travis +gender male 30 + +pitch 75 120 + +formant 0 90 90 90 90 +formant 1 50 100 80 95 +formant 2 90 60 90 100 +formant 3 80 80 90 100 +formant 4 50 90 100 100 +formant 5 100 95 100 55 +formant 6 80 50 100 85 +formant 7 60 60 60 120 +formant 8 80 80 140 100 + +tone 600 100 1000 200 1500 50 +flutter 1 + +roughness 3 + +voicing 200 +consonants 120 190 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/victor b/TTS/Piper/espeak-ng-data/voices/!v/victor new file mode 100644 index 0000000000000000000000000000000000000000..fa275e891824d6dc75c0c2c0ec47ed81e9609d0f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/victor @@ -0,0 +1,16 @@ +language variant +name victor +gender male 25 + +formant 0 100 100 100 +formant 1 95 95 95 +formant 2 90 90 90 +formant 3 90 90 90 +formant 4 40 40 40 +formant 5 80 80 80 +formant 6 20 20 20 +formant 7 20 20 20 +formant 8 20 20 20 +pitch 80 110 +voicing 60 +breath 2 4 \ No newline at end of file diff --git a/TTS/Piper/espeak-ng-data/voices/!v/whisper b/TTS/Piper/espeak-ng-data/voices/!v/whisper new file mode 100644 index 0000000000000000000000000000000000000000..4f8f5e88f436d478b126c5c4eccf3568e398c26f --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/whisper @@ -0,0 +1,13 @@ +language variant +name whisper +gender male + +pitch 82 117 +flutter 20 + +formant 0 100 0 100 +formant 1 100 80 100 + +voicing 17 +breath 75 75 50 40 15 10 +breathw 150 150 200 200 400 400 diff --git a/TTS/Piper/espeak-ng-data/voices/!v/whisperf b/TTS/Piper/espeak-ng-data/voices/!v/whisperf new file mode 100644 index 0000000000000000000000000000000000000000..f239e8a29b79ec17c77dead6ddb1920103ceeec3 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/whisperf @@ -0,0 +1,24 @@ +language variant +name female_whisper +gender female + +pitch 160 220 +roughness 3 + +formant 0 105 0 150 +formant 1 110 40 160 +formant 2 110 70 150 +formant 3 110 70 150 +formant 4 115 80 150 +formant 5 115 80 150 +formant 6 110 70 150 +formant 7 110 70 150 +formant 8 110 70 150 + +stressAdd 0 0 -10 -10 0 0 10 40 + +// whisper +voicing 20 +breath 75 75 50 40 15 10 +breathw 150 150 200 200 400 400 + diff --git a/TTS/Piper/espeak-ng-data/voices/!v/zac b/TTS/Piper/espeak-ng-data/voices/!v/zac new file mode 100644 index 0000000000000000000000000000000000000000..ca415a660b70d1eec84e6d37a5e89954de80ff88 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/voices/!v/zac @@ -0,0 +1,15 @@ +language variant +name Zac +flutter 5 + +pitch 240 390 +formant 0 145 100 145 +formant 1 145 100 145 +formant 2 145 100 145 +formant 3 145 100 145 +formant 4 145 100 145 +formant 5 145 120 145 +formant 6 145 120 145 +formant 7 145 120 145 +formant 8 145 120 145 +voicing 80 diff --git a/TTS/Piper/espeak-ng-data/yue_dict b/TTS/Piper/espeak-ng-data/yue_dict new file mode 100644 index 0000000000000000000000000000000000000000..591bdcbd7308173dbaa609d3681b08e3e7da5b64 --- /dev/null +++ b/TTS/Piper/espeak-ng-data/yue_dict @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d26afa203034698772107abfff1b53acbee30434700a4d2b75dee98951588f8 +size 563571