remove dead + duplicate python code
parent
7237128a1d
commit
08f9316b56
|
@ -1,23 +0,0 @@
|
||||||
import os
|
|
||||||
import sysconfig
|
|
||||||
from Cython.Distutils import build_ext
|
|
||||||
|
|
||||||
def get_ext_filename_without_platform_suffix(filename):
|
|
||||||
name, ext = os.path.splitext(filename)
|
|
||||||
ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
|
|
||||||
|
|
||||||
if ext_suffix == ext:
|
|
||||||
return filename
|
|
||||||
|
|
||||||
ext_suffix = ext_suffix.replace(ext, '')
|
|
||||||
idx = name.find(ext_suffix)
|
|
||||||
|
|
||||||
if idx == -1:
|
|
||||||
return filename
|
|
||||||
else:
|
|
||||||
return name[:idx] + ext
|
|
||||||
|
|
||||||
class BuildExtWithoutPlatformSuffix(build_ext):
|
|
||||||
def get_ext_filename(self, ext_name):
|
|
||||||
filename = super().get_ext_filename(ext_name)
|
|
||||||
return get_ext_filename_without_platform_suffix(filename)
|
|
|
@ -36,7 +36,6 @@ common/filter_simple.py
|
||||||
common/stat_live.py
|
common/stat_live.py
|
||||||
common/spinner.py
|
common/spinner.py
|
||||||
common/text_window.py
|
common/text_window.py
|
||||||
common/cython_hacks.py
|
|
||||||
common/SConscript
|
common/SConscript
|
||||||
|
|
||||||
common/kalman/.gitignore
|
common/kalman/.gitignore
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
class lazy_property(object):
|
|
||||||
"""Defines a property whose value will be computed only once and as needed.
|
|
||||||
|
|
||||||
This can only be used on instance methods.
|
|
||||||
"""
|
|
||||||
def __init__(self, func):
|
|
||||||
self._func = func
|
|
||||||
|
|
||||||
def __get__(self, obj_self, cls):
|
|
||||||
value = self._func(obj_self)
|
|
||||||
setattr(obj_self, self._func.__name__, value)
|
|
||||||
return value
|
|
Loading…
Reference in New Issue