code stringlengths 0 21.5M | repo_name stringlengths 4 92 | path stringlengths 1 189 | language stringlengths 0 26 | license stringclasses 11
values | size int64 0 21.5M |
|---|---|---|---|---|---|
"""Read resources contained within a package."""
from ._common import (
as_file,
files,
Package,
)
from ._legacy import (
contents,
open_binary,
read_binary,
open_text,
read_text,
is_resource,
path,
Resource,
)
from .abc import ResourceReader
__all__ = [
'Package',
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/__init__.py | Python | mit | 506 |
from contextlib import suppress
from io import TextIOWrapper
from . import abc
class SpecLoaderAdapter:
"""
Adapt a package spec to adapt the underlying loader.
"""
def __init__(self, spec, adapter=lambda spec: spec.loader):
self.spec = spec
self.loader = adapter(spec)
def __get... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/_adapters.py | Python | mit | 4,504 |
import os
import pathlib
import tempfile
import functools
import contextlib
import types
import importlib
from typing import Union, Optional
from .abc import ResourceReader, Traversable
from ._compat import wrap_spec
Package = Union[types.ModuleType, str]
def files(package):
# type: (Package) -> Traversable
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/_common.py | Python | mit | 2,741 |
# flake8: noqa
import abc
import sys
import pathlib
from contextlib import suppress
if sys.version_info >= (3, 10):
from zipfile import Path as ZipPath # type: ignore
else:
from ..zipp import Path as ZipPath # type: ignore
try:
from typing import runtime_checkable # type: ignore
except ImportError:
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/_compat.py | Python | mit | 2,706 |
from itertools import filterfalse
from typing import (
Callable,
Iterable,
Iterator,
Optional,
Set,
TypeVar,
Union,
)
# Type and type variable definitions
_T = TypeVar('_T')
_U = TypeVar('_U')
def unique_everseen(
iterable: Iterable[_T], key: Optional[Callable[[_T], _U]] = None
) -> ... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/_itertools.py | Python | mit | 884 |
import functools
import os
import pathlib
import types
import warnings
from typing import Union, Iterable, ContextManager, BinaryIO, TextIO, Any
from . import _common
Package = Union[types.ModuleType, str]
Resource = str
def deprecated(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
war... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/_legacy.py | Python | mit | 3,494 |
import abc
from typing import BinaryIO, Iterable, Text
from ._compat import runtime_checkable, Protocol
class ResourceReader(metaclass=abc.ABCMeta):
"""Abstract base class for loaders to provide resource reading support."""
@abc.abstractmethod
def open_resource(self, resource: Text) -> BinaryIO:
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/abc.py | Python | mit | 3,886 |
import collections
import pathlib
import operator
from . import abc
from ._itertools import unique_everseen
from ._compat import ZipPath
def remove_duplicates(items):
return iter(collections.OrderedDict.fromkeys(items))
class FileReader(abc.TraversableResources):
def __init__(self, loader):
self.p... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/readers.py | Python | mit | 3,566 |
"""
Interface adapters for low-level readers.
"""
import abc
import io
import itertools
from typing import BinaryIO, List
from .abc import Traversable, TraversableResources
class SimpleReader(abc.ABC):
"""
The minimum, low-level interface required from a resource
provider.
"""
@abc.abstractprop... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/importlib_resources/simple.py | Python | mit | 2,836 |
castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/jaraco/__init__.py | Python | mit | 0 | |
import os
import subprocess
import contextlib
import functools
import tempfile
import shutil
import operator
@contextlib.contextmanager
def pushd(dir):
orig = os.getcwd()
os.chdir(dir)
try:
yield dir
finally:
os.chdir(orig)
@contextlib.contextmanager
def tarball_context(url, target_d... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/jaraco/context.py | Python | mit | 5,420 |
import functools
import time
import inspect
import collections
import types
import itertools
import pkg_resources.extern.more_itertools
from typing import Callable, TypeVar
CallableT = TypeVar("CallableT", bound=Callable[..., object])
def compose(*funcs):
"""
Compose any number of unary functions into a s... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/jaraco/functools.py | Python | mit | 13,515 |
import re
import itertools
import textwrap
import functools
try:
from importlib.resources import files # type: ignore
except ImportError: # pragma: nocover
from pkg_resources.extern.importlib_resources import files # type: ignore
from pkg_resources.extern.jaraco.functools import compose, method_cache
from ... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/jaraco/text/__init__.py | Python | mit | 15,526 |
from .more import * # noqa
from .recipes import * # noqa
__version__ = '8.12.0'
| castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/more_itertools/__init__.py | Python | mit | 83 |
import warnings
from collections import Counter, defaultdict, deque, abc
from collections.abc import Sequence
from functools import partial, reduce, wraps
from heapq import merge, heapify, heapreplace, heappop
from itertools import (
chain,
compress,
count,
cycle,
dropwhile,
groupby,
islice... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/more_itertools/more.py | Python | mit | 132,569 |
"""Imported from the recipes section of the itertools documentation.
All functions taken from the recipes section of the itertools library docs
[1]_.
Some backward-compatible usability improvements have been made.
.. [1] http://docs.python.org/library/itertools.html#recipes
"""
import warnings
from collections impor... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/more_itertools/recipes.py | Python | mit | 18,410 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
__all__ = [
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/__about__.py | Python | mit | 661 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from .__about__ import (
__author__,
__copyright__,
__email__,
__license__,
__summary__,
__title__,
__uri__,
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/__init__.py | Python | mit | 497 |
import collections
import functools
import os
import re
import struct
import sys
import warnings
from typing import IO, Dict, Iterator, NamedTuple, Optional, Tuple
# Python does not provide platform information at sufficient granularity to
# identify the architecture of the running executable in some cases, so we
# d... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/_manylinux.py | Python | mit | 11,488 |
"""PEP 656 support.
This module implements logic to detect if the currently running Python is
linked against musl, and what musl version is used.
"""
import contextlib
import functools
import operator
import os
import re
import struct
import subprocess
import sys
from typing import IO, Iterator, NamedTuple, Optional,... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/_musllinux.py | Python | mit | 4,378 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
class InfinityType:
def __repr__(self) -> str:
return "Infinity"
def __hash__(self) -> int:
return hash(repr(self... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/_structures.py | Python | mit | 1,431 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import operator
import os
import platform
import sys
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from pkg_resourc... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/markers.py | Python | mit | 8,496 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import re
import string
import urllib.parse
from typing import List, Optional as TOptional, Set
from pkg_resources.extern.pyparsing import... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/requirements.py | Python | mit | 4,706 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import abc
import functools
import itertools
import re
import warnings
from typing import (
Callable,
Dict,
Iterable,
Itera... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/specifiers.py | Python | mit | 30,110 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import logging
import platform
import sys
import sysconfig
from importlib.machinery import EXTENSION_SUFFIXES
from typing import (
Dict... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/tags.py | Python | mit | 15,699 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import re
from typing import FrozenSet, NewType, Tuple, Union, cast
from .tags import Tag, parse_tag
from .version import InvalidVersion, ... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/utils.py | Python | mit | 4,200 |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
import collections
import itertools
import re
import warnings
from typing import Callable, Iterator, List, Optional, SupportsInt, Tuple, Un... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/packaging/version.py | Python | mit | 14,665 |
# module pyparsing.py
#
# Copyright (c) 2003-2022 Paul T. McGuire
#
# 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, cop... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/__init__.py | Python | mit | 9,159 |
# actions.py
from .exceptions import ParseException
from .util import col
class OnlyOnce:
"""
Wrapper for parse actions, to ensure they are only called once.
"""
def __init__(self, method_call):
from .core import _trim_arity
self.callable = _trim_arity(method_call)
self.call... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/actions.py | Python | mit | 6,426 |
# common.py
from .core import *
from .helpers import delimited_list, any_open_tag, any_close_tag
from datetime import datetime
# some other useful expressions - using lower-case class name since we are really using this as a namespace
class pyparsing_common:
"""Here are some common low-level expressions that may ... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/common.py | Python | mit | 12,936 |
#
# core.py
#
import os
import typing
from typing import (
NamedTuple,
Union,
Callable,
Any,
Generator,
Tuple,
List,
TextIO,
Set,
Sequence,
)
from abc import ABC, abstractmethod
from enum import Enum
import string
import copy
import warnings
import re
import sys
from collections.... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/core.py | Python | mit | 213,310 |
import railroad
import pyparsing
import typing
from typing import (
List,
NamedTuple,
Generic,
TypeVar,
Dict,
Callable,
Set,
Iterable,
)
from jinja2 import Template
from io import StringIO
import inspect
jinja2_template_source = """\
<!DOCTYPE html>
<html>
<head>
{% if not head %}
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/diagram/__init__.py | Python | mit | 23,668 |
# exceptions.py
import re
import sys
import typing
from .util import col, line, lineno, _collapse_string_to_ranges
from .unicode import pyparsing_unicode as ppu
class ExceptionWordUnicode(ppu.Latin1, ppu.LatinA, ppu.LatinB, ppu.Greek, ppu.Cyrillic):
pass
_extract_alphanums = _collapse_string_to_ranges(Excepti... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/exceptions.py | Python | mit | 9,023 |
# helpers.py
import html.entities
import re
import typing
from . import __diag__
from .core import *
from .util import _bslash, _flatten, _escape_regex_range_chars
#
# global helpers
#
def delimited_list(
expr: Union[str, ParserElement],
delim: Union[str, ParserElement] = ",",
combine: bool = False,
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/helpers.py | Python | mit | 39,129 |
# results.py
from collections.abc import MutableMapping, Mapping, MutableSequence, Iterator
import pprint
from weakref import ref as wkref
from typing import Tuple, Any
str_type: Tuple[type, ...] = (str, bytes)
_generator_type = type((_ for _ in ()))
class _ParseResultsWithOffset:
__slots__ = ["tup"]
def __... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/results.py | Python | mit | 25,341 |
# testing.py
from contextlib import contextmanager
import typing
from .core import (
ParserElement,
ParseException,
Keyword,
__diag__,
__compat__,
)
class pyparsing_test:
"""
namespace class for classes useful in writing unit tests
"""
class reset_pyparsing_context:
"""
... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/testing.py | Python | mit | 13,402 |
# unicode.py
import sys
from itertools import filterfalse
from typing import List, Tuple, Union
class _lazyclassproperty:
def __init__(self, fn):
self.fn = fn
self.__doc__ = fn.__doc__
self.__name__ = fn.__name__
def __get__(self, obj, cls):
if cls is None:
cls = ... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/unicode.py | Python | mit | 10,787 |
# util.py
import warnings
import types
import collections
import itertools
from functools import lru_cache
from typing import List, Union, Iterable
_bslash = chr(92)
class __config_flags:
"""Internal class for defining compatibility and debugging flags"""
_all_names: List[str] = []
_fixed_names: List[st... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/pyparsing/util.py | Python | mit | 6,805 |
import io
import posixpath
import zipfile
import itertools
import contextlib
import sys
import pathlib
if sys.version_info < (3, 7):
from collections import OrderedDict
else:
OrderedDict = dict
__all__ = ['Path']
def _parents(path):
"""
Given a path with elements separated by
posixpath.sep, gen... | castiel248/Convert | Lib/site-packages/pkg_resources/_vendor/zipp.py | Python | mit | 8,425 |
import importlib.util
import sys
class VendorImporter:
"""
A PEP 302 meta path importer for finding optionally-vendored
or otherwise naturally-installed packages from root_name.
"""
def __init__(self, root_name, vendored_names=(), vendor_pkg=None):
self.root_name = root_name
self.... | castiel248/Convert | Lib/site-packages/pkg_resources/extern/__init__.py | Python | mit | 2,426 |
pip
| castiel248/Convert | Lib/site-packages/setuptools-65.5.0.dist-info/INSTALLER | none | mit | 4 |
Metadata-Version: 2.1
Name: setuptools
Version: 65.5.0
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
Project-URL: Documentation, https://setuptools.pypa.io/
Project-... | castiel248/Convert | Lib/site-packages/setuptools-65.5.0.dist-info/METADATA | none | mit | 6,301 |
_distutils_hack/__init__.py,sha256=TSekhUW1fdE3rjU3b88ybSBkJxCEpIeWBob4cEuU3ko,6128
_distutils_hack/__pycache__/__init__.cpython-311.pyc,,
_distutils_hack/__pycache__/override.cpython-311.pyc,,
_distutils_hack/override.py,sha256=Eu_s-NF6VIZ4Cqd0tbbA5wtWky2IZPNd8et6GLt1mzo,44
distutils-precedence.pth,sha256=JjjOniUA5XKl... | castiel248/Convert | Lib/site-packages/setuptools-65.5.0.dist-info/RECORD | none | mit | 37,228 |
castiel248/Convert | Lib/site-packages/setuptools-65.5.0.dist-info/REQUESTED | none | mit | 0 | |
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: true
Tag: py3-none-any
| castiel248/Convert | Lib/site-packages/setuptools-65.5.0.dist-info/WHEEL | none | mit | 92 |
[distutils.commands]
alias = setuptools.command.alias:alias
bdist_egg = setuptools.command.bdist_egg:bdist_egg
bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm
build = setuptools.command.build:build
build_clib = setuptools.command.build_clib:build_clib
build_ext = setuptools.command.build_ext:build_ext
build_py = set... | castiel248/Convert | Lib/site-packages/setuptools-65.5.0.dist-info/entry_points.txt | Text | mit | 2,740 |
_distutils_hack
pkg_resources
setuptools
| castiel248/Convert | Lib/site-packages/setuptools-65.5.0.dist-info/top_level.txt | Text | mit | 41 |
"""Extensions to the 'distutils' for large or complex distributions"""
import functools
import os
import re
import warnings
import _distutils_hack.override # noqa: F401
import distutils.core
from distutils.errors import DistutilsOptionError
from distutils.util import convert_path as _convert_path
from ._deprecatio... | castiel248/Convert | Lib/site-packages/setuptools/__init__.py | Python | mit | 8,429 |
class SetuptoolsDeprecationWarning(Warning):
"""
Base class for warning deprecations in ``setuptools``
This class is not derived from ``DeprecationWarning``, and as such is
visible by default.
"""
| castiel248/Convert | Lib/site-packages/setuptools/_deprecation_warning.py | Python | mit | 218 |
"""distutils
The main package for the Python Module Distribution Utilities. Normally
used from a setup script as
from distutils.core import setup
setup (...)
"""
import sys
import importlib
__version__ = sys.version[: sys.version.index(' ')]
try:
# Allow Debian and pkgsrc (only) to customize system
... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/__init__.py | Python | mit | 537 |
import collections
import itertools
# from jaraco.collections 3.5.1
class DictStack(list, collections.abc.Mapping):
"""
A stack of dictionaries that behaves as a view on those dictionaries,
giving preference to the last.
>>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)])
>>> stack['a']
2... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/_collections.py | Python | mit | 1,330 |
import functools
# from jaraco.functools 3.5
def pass_none(func):
"""
Wrap func so it's not called if its first param is None
>>> print_text = pass_none(print)
>>> print_text('text')
text
>>> print_text(None)
"""
@functools.wraps(func)
def wrapper(param, *args, **kwargs):
... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/_functools.py | Python | mit | 411 |
import sys
import importlib
def bypass_compiler_fixup(cmd, args):
return cmd
if sys.platform == 'darwin':
compiler_fixup = importlib.import_module('_osx_support').compiler_fixup
else:
compiler_fixup = bypass_compiler_fixup
| castiel248/Convert | Lib/site-packages/setuptools/_distutils/_macos_compat.py | Python | mit | 239 |
"""distutils._msvccompiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class
for Microsoft Visual Studio 2015.
The module is compatible with VS 2015 and later. You can find legacy support
for older versions in distutils.msvc9compiler and distutils.msvccompiler.
"""
# Written by Perry Stoll
# h... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/_msvccompiler.py | Python | mit | 19,672 |
"""distutils.archive_util
Utility functions for creating archive files (tarballs, zip files,
that sort of thing)."""
import os
from warnings import warn
import sys
try:
import zipfile
except ImportError:
zipfile = None
from distutils.errors import DistutilsExecError
from distutils.spawn import spawn
from d... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/archive_util.py | Python | mit | 8,603 |
"""distutils.bcppcompiler
Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""
# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.
# XXX looks like there's a L... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/bcppcompiler.py | Python | mit | 14,789 |
"""distutils.ccompiler
Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model."""
import sys
import os
import re
from distutils.errors import (
CompileError,
LinkError,
UnknownFileError,
DistutilsPlatformError,
DistutilsModuleError,
)
fr... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/ccompiler.py | Python | mit | 47,369 |
"""distutils.cmd
Provides the Command class, the base class for the command classes
in the distutils.command package.
"""
import sys
import os
import re
from distutils.errors import DistutilsOptionError
from distutils import util, dir_util, file_util, archive_util, dep_util
from distutils import log
class Command:
... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/cmd.py | Python | mit | 17,973 |
"""distutils.command
Package containing implementation of all the standard Distutils
commands."""
__all__ = [ # noqa: F822
'build',
'build_py',
'build_ext',
'build_clib',
'build_scripts',
'clean',
'install',
'install_lib',
'install_headers',
'install_scripts',
'install_dat... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/__init__.py | Python | mit | 430 |
"""
Backward compatibility for homebrew builds on macOS.
"""
import sys
import os
import functools
import subprocess
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 < ... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/_framework_compat.py | Python | mit | 1,614 |
"""distutils.command.bdist
Implements the Distutils 'bdist' command (create a built [binary]
distribution)."""
import os
import warnings
from distutils.core import Command
from distutils.errors import DistutilsPlatformError, DistutilsOptionError
from distutils.util import get_platform
def show_formats():
"""Pr... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/bdist.py | Python | mit | 5,441 |
"""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.core import Command
from distutils.util import get_platform
from distutils.dir_util import remove_tree, ... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py | Python | mit | 4,701 |
"""distutils.command.bdist_rpm
Implements the Distutils 'bdist_rpm' command (create RPM source and binary
distributions)."""
import subprocess
import sys
import os
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.file_util import write_file
from distutils.errors import (
Distut... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py | Python | mit | 22,051 |
"""distutils.command.build
Implements the Distutils 'build' command."""
import sys
import os
from distutils.core import Command
from distutils.errors import DistutilsOptionError
from distutils.util import get_platform
def show_compilers():
from distutils.ccompiler import show_compilers
show_compilers()
c... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/build.py | Python | mit | 5,617 |
"""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 req... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/build_clib.py | Python | mit | 7,728 |
"""distutils.command.build_ext
Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP)."""
import contextlib
import os
import re
import sys
from distutils.core import Command
from distutils.errors import (
DistutilsOp... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/build_ext.py | Python | mit | 31,558 |
"""distutils.command.build_py
Implements the Distutils 'build_py' command."""
import os
import importlib.util
import sys
import glob
from distutils.core import Command
from distutils.errors import DistutilsOptionError, DistutilsFileError
from distutils.util import convert_path
from distutils import log
class build... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/build_py.py | Python | mit | 16,568 |
"""distutils.command.build_scripts
Implements the Distutils 'build_scripts' command."""
import os
import re
from stat import ST_MODE
from distutils import sysconfig
from distutils.core import Command
from distutils.dep_util import newer
from distutils.util import convert_path
from distutils import log
import tokenize... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/build_scripts.py | Python | mit | 5,624 |
"""distutils.command.check
Implements the Distutils 'check' command.
"""
import contextlib
from distutils.core import Command
from distutils.errors import DistutilsSetupError
with contextlib.suppress(ImportError):
import docutils.utils
import docutils.parsers.rst
import docutils.frontend
import docut... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/check.py | Python | mit | 4,888 |
"""distutils.command.clean
Implements the Distutils 'clean' command."""
# contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18
import os
from distutils.core import Command
from distutils.dir_util import remove_tree
from distutils import log
class clean(Command):
description = "clean up te... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/clean.py | Python | mit | 2,603 |
"""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" i... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/config.py | Python | mit | 13,137 |
"""distutils.command.install
Implements the Distutils 'install' command."""
import sys
import os
import contextlib
import sysconfig
import itertools
from distutils import log
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.sysconfig import get_config_vars
from distutils.file_util ... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/install.py | Python | mit | 30,221 |
"""distutils.command.install_data
Implements the Distutils 'install_data' command, for installing
platform-independent data files."""
# contributed by Bastian Kleineidam
import os
from distutils.core import Command
from distutils.util import change_root, convert_path
class install_data(Command):
description =... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/install_data.py | Python | mit | 2,779 |
"""
distutils.command.install_egg_info
Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.
"""
import os
import sys
import re
from distutils.cmd import Command
from distutils import log, dir_util
class install_egg_info(Command):
"""Install an .egg-info file for th... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/install_egg_info.py | Python | mit | 2,785 |
"""distutils.command.install_headers
Implements the Distutils 'install_headers' command, to install C/C++ header
files to the Python include directory."""
from distutils.core import Command
# XXX force is never used
class install_headers(Command):
description = "install C/C++ header files"
user_options = ... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/install_headers.py | Python | mit | 1,189 |
"""distutils.command.install_lib
Implements the Distutils 'install_lib' command
(install all Python modules)."""
import os
import importlib.util
import sys
from distutils.core import Command
from distutils.errors import DistutilsOptionError
# Extension for Python source files.
PYTHON_SOURCE_EXTENSION = ".py"
cla... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/install_lib.py | Python | mit | 8,434 |
"""distutils.command.install_scripts
Implements the Distutils 'install_scripts' command, for installing
Python scripts."""
# contributed by Bastian Kleineidam
import os
from distutils.core import Command
from distutils import log
from stat import ST_MODE
class install_scripts(Command):
description = "install ... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/install_scripts.py | Python | mit | 1,936 |
import sys
def _pythonlib_compat():
"""
On Python 3.7 and earlier, distutils would include the Python
library. See pypa/distutils#9.
"""
from distutils import sysconfig
if not sysconfig.get_config_var('Py_ENABLED_SHARED'):
return
yield 'python{}.{}{}'.format(
sys.hexversi... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/py37compat.py | Python | mit | 672 |
"""distutils.command.register
Implements the Distutils 'register' command (register with the repository).
"""
# created 2002/10/21, Richard Jones
import getpass
import io
import urllib.parse
import urllib.request
from warnings import warn
from distutils.core import PyPIRCCommand
from distutils import log
class re... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/register.py | Python | mit | 11,765 |
"""distutils.command.sdist
Implements the Distutils 'sdist' command (create a source distribution)."""
import os
import sys
from glob import glob
from warnings import warn
from distutils.core import Command
from distutils import dir_util
from distutils import file_util
from distutils import archive_util
from distuti... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/sdist.py | Python | mit | 19,241 |
"""
distutils.command.upload
Implements the Distutils 'upload' subcommand (upload package to a package
index).
"""
import os
import io
import hashlib
from base64 import standard_b64encode
from urllib.request import urlopen, Request, HTTPError
from urllib.parse import urlparse
from distutils.errors import DistutilsErr... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/command/upload.py | Python | mit | 7,477 |
"""distutils.pypirc
Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
"""
import os
from configparser import RawConfigParser
from distutils.cmd import Command
DEFAULT_PYPIRC = """\
[distutils]
index-servers =
pypi
[pypi]
username:%s
pass... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/config.py | Python | mit | 4,920 |
"""distutils.core
The only module that needs to be imported to use the Distutils; provides
the 'setup' function (which is to be called from the setup script). Also
indirectly provides the Distribution and Command classes, although they are
really defined in distutils.dist and distutils.cmd.
"""
import os
import sys
... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/core.py | Python | mit | 9,451 |
"""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 os
import sys
import copy
import... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/cygwinccompiler.py | Python | mit | 12,537 |
import os
# If DISTUTILS_DEBUG is anything other than the empty string, we run in
# debug mode.
DEBUG = os.environ.get('DISTUTILS_DEBUG')
| castiel248/Convert | Lib/site-packages/setuptools/_distutils/debug.py | Python | mit | 139 |
"""distutils.dep_util
Utility functions for simple, timestamp-based dependency of files
and groups of files; also, function based entirely on such
timestamp dependency analysis."""
import os
from distutils.errors import DistutilsFileError
def newer(source, target):
"""Return true if 'source' exists and is more ... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/dep_util.py | Python | mit | 3,423 |
"""distutils.dir_util
Utility functions for manipulating directories and directory trees."""
import os
import errno
from distutils.errors import DistutilsInternalError, DistutilsFileError
from distutils import log
# cache for by mkpath() -- in addition to cheapening redundant calls,
# eliminates redundant "creating ... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/dir_util.py | Python | mit | 8,082 |
"""distutils.dist
Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""
import sys
import os
import re
import pathlib
import contextlib
from email import message_from_file
try:
import warnings
except ImportError:
warnings = None
from distutils.error... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/dist.py | Python | mit | 50,186 |
"""distutils.errors
Provides exceptions used by the Distutils modules. Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).
This module is safe to use in "from ... import *" mode; it... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/errors.py | Python | mit | 3,589 |
"""distutils.extension
Provides the Extension class, used to describe C/C++ extension
modules in setup scripts."""
import os
import warnings
# This class is really only used by the "build_ext" command, so it might
# make sense to put it in distutils.command.build_ext. However, that
# module is already big enough, a... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/extension.py | Python | mit | 10,270 |
"""distutils.fancy_getopt
Wrapper around the standard getopt module that provides the following
additional features:
* short and long options are tied together
* options have help strings, so fancy_getopt could potentially
create a complete usage summary
* options set attributes of a passed-in object
"""
im... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/fancy_getopt.py | Python | mit | 17,910 |
"""distutils.file_util
Utility functions for operating on single files.
"""
import os
from distutils.errors import DistutilsFileError
from distutils import log
# for generating verbose output in 'copy_file()'
_copy_action = {None: 'copying', 'hard': 'hard linking', 'sym': 'symbolically linking'}
def _copy_file_con... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/file_util.py | Python | mit | 8,226 |
"""distutils.filelist
Provides the FileList class, used for poking about the filesystem
and building lists of files.
"""
import os
import re
import fnmatch
import functools
from distutils.util import convert_path
from distutils.errors import DistutilsTemplateError, DistutilsInternalError
from distutils import log
... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/filelist.py | Python | mit | 13,713 |
"""A simple log mechanism styled after PEP 282."""
# The class here is styled after PEP 282 so that it could later be
# replaced with a standard Python logging implementation.
import sys
DEBUG = 1
INFO = 2
WARN = 3
ERROR = 4
FATAL = 5
class Log:
def __init__(self, threshold=WARN):
self.threshold = thre... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/log.py | Python | mit | 1,972 |
"""distutils.msvc9compiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio 2008.
The module is compatible with VS 2005 and VS 2008. You can find legacy support
for older versions of VS in distutils.msvccompiler.
"""
# Written by Perry Stoll
# hacked by Robin B... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/msvc9compiler.py | Python | mit | 30,235 |
"""distutils.msvccompiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
"""
# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
# finding DevStudio (through the registry)
import sys
import os
import warnings
from dist... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/msvccompiler.py | Python | mit | 23,602 |
def aix_platform(osname, version, release):
try:
import _aix_support
return _aix_support.aix_platform()
except ImportError:
pass
return "{}-{}.{}".format(osname, version, release)
| castiel248/Convert | Lib/site-packages/setuptools/_distutils/py38compat.py | Python | mit | 217 |
import sys
import platform
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 e... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/py39compat.py | Python | mit | 639 |
"""distutils.spawn
Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
Also provides the 'find_executable()' to search the path for a given
executable name.
"""
import sys
import os
import subprocess
from distutils.errors import Distuti... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/spawn.py | Python | mit | 3,517 |
"""Provide access to Python's configuration information. The specific
configuration variables available depend heavily on the platform and
configuration. The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys(). Additional convenience functions are a... | castiel248/Convert | Lib/site-packages/setuptools/_distutils/sysconfig.py | Python | mit | 18,858 |