Change venv

This commit is contained in:
Ambulance Clerc
2023-05-31 08:31:22 +02:00
parent fb6f579089
commit fdbb52c96f
466 changed files with 25899 additions and 64721 deletions

View File

@@ -17,8 +17,11 @@ import itertools
import functools
import http.client
import urllib.parse
import warnings
from .._importlib import metadata
from .. import SetuptoolsDeprecationWarning
from pkg_resources import iter_entry_points
from .upload import upload
@@ -43,9 +46,10 @@ class upload_docs(upload):
boolean_options = upload.boolean_options
def has_sphinx(self):
if self.upload_dir is None:
for ep in iter_entry_points('distutils.commands', 'build_sphinx'):
return True
return bool(
self.upload_dir is None
and metadata.entry_points(group='distutils.commands', name='build_sphinx')
)
sub_commands = [('build_sphinx', has_sphinx)]
@@ -55,6 +59,9 @@ class upload_docs(upload):
self.target_dir = None
def finalize_options(self):
log.warn(
"Upload_docs command is deprecated. Use Read the Docs "
"(https://readthedocs.org) instead.")
upload.finalize_options(self)
if self.upload_dir is None:
if self.has_sphinx():
@@ -66,8 +73,6 @@ class upload_docs(upload):
else:
self.ensure_dirname('upload_dir')
self.target_dir = self.upload_dir
if 'pypi.python.org' in self.repository:
log.warn("Upload_docs command is deprecated for PyPi. Use RTD instead.")
self.announce('Using upload directory %s' % self.target_dir)
def create_zipfile(self, filename):
@@ -87,6 +92,12 @@ class upload_docs(upload):
zip_file.close()
def run(self):
warnings.warn(
"upload_docs is deprecated and will be removed in a future "
"version. Use tools like httpie or curl instead.",
SetuptoolsDeprecationWarning,
)
# Run sub commands
for cmd_name in self.get_sub_commands():
self.run_command(cmd_name)