/
snap
/
core20
/
2866
/
usr
/
lib
/
python3
/
dist-packages
/
setuptools
/
/snap/core20/2866/usr/lib/python3/dist-packages/setuptools
mkdir
upload
Name
Size
Mode
Actions
command/
-
0755
rm
extern/
-
0755
rm
_vendor/
-
0755
rm
__pycache__/
-
0755
rm
archive_util.py
6626
0644
edit
dl
rm
build_meta.py
9960
0644
edit
dl
rm
cli-32.exe
65536
0644
edit
dl
rm
cli-64.exe
74752
0644
edit
dl
rm
cli.exe
65536
0644
edit
dl
rm
config.py
20575
0644
edit
dl
rm
depends.py
5517
0644
edit
dl
rm
dep_util.py
949
0644
edit
dl
rm
dist.py
49872
0644
edit
dl
rm
errors.py
524
0644
edit
dl
rm
extension.py
1729
0644
edit
dl
rm
glob.py
5084
0644
edit
dl
rm
gui-32.exe
65536
0644
edit
dl
rm
gui-64.exe
75264
0644
edit
dl
rm
gui.exe
65536
0644
edit
dl
rm
installer.py
5336
0644
edit
dl
rm
launch.py
787
0644
edit
dl
rm
lib2to3_ex.py
2013
0644
edit
dl
rm
monkey.py
5264
0644
edit
dl
rm
msvc.py
46807
0644
edit
dl
rm
namespaces.py
3223
0644
edit
dl
rm
package_index.py
42394
0644
edit
dl
rm
py27compat.py
1504
0644
edit
dl
rm
py31compat.py
838
0644
edit
dl
rm
py33compat.py
1330
0644
edit
dl
rm
py34compat.py
245
0644
edit
dl
rm
sandbox.py
14284
0644
edit
dl
rm
script (dev).tmpl
218
0644
edit
dl
rm
script.tmpl
138
0644
edit
dl
rm
site-patch.py
2346
0644
edit
dl
rm
ssl_support.py
8543
0644
edit
dl
rm
unicode_utils.py
996
0644
edit
dl
rm
version.py
144
0644
edit
dl
rm
wheel.py
8468
0644
edit
dl
rm
windows_support.py
714
0644
edit
dl
rm
_deprecation_warning.py
218
0644
edit
dl
rm
_imp.py
2388
0644
edit
dl
rm
__init__.py
7273
0644
edit
dl
rm
Edit:
/snap/core20/2866/usr/lib/python3/dist-packages/setuptools/extension.py
(1729B)
import re import functools import distutils.core import distutils.errors import distutils.extension from setuptools.extern.six.moves import map from .monkey import get_unpatched def _have_cython(): """ Return True if Cython can be imported. """ cython_impl = 'Cython.Distutils.build_ext' try: # from (cython_impl) import build_ext __import__(cython_impl, fromlist=['build_ext']).build_ext return True except Exception: pass return False # for compatibility have_pyrex = _have_cython _Extension = get_unpatched(distutils.core.Extension) class Extension(_Extension): """Extension that uses '.c' files in place of '.pyx' files""" def __init__(self, name, sources, *args, **kw): # The *args is needed for compatibility as calls may use positional # arguments. py_limited_api may be set only via keyword. self.py_limited_api = kw.pop("py_limited_api", False) _Extension.__init__(self, name, sources, *args, **kw) def _convert_pyx_sources_to_lang(self): """ Replace sources with .pyx extensions to sources with the target language extension. This mechanism allows language authors to supply pre-converted sources but to prefer the .pyx sources. """ if _have_cython(): # the build has Cython, so allow it to compile the .pyx files return lang = self.language or '' target_ext = '.cpp' if lang.lower() == 'c++' else '.c' sub = functools.partial(re.sub, '.pyx$', target_ext) self.sources = list(map(sub, self.sources)) class Library(Extension): """Just like a regular Extension, but built as a library instead"""
Save
cmd:
run