import os
import shutil
from distutils.core import setup
from distutils.command.build_ext import build_ext
from Cython.Build import cythonize
BUILD_CONFIG = {
'SupportExt': ['models.py'], # 需要编辑的文件名
'CopyOnlyFile': ['__main__.py', '__init__.py'], # cope
'CopyOnlyDir': ['assets'], # cope文件目录
'IgnoreDir': ['dist', 'dis_apps', 'build', '__pycache__', 'migrations'], # 忽略
}
curr_dir = os.getcwd()
def copy_tree(src, dst):
""" not like shutil.copytree, dst can be exists """
assert os.path.exists(src)
assert os.path.isdir(src)
os.makedirs(dst, exist_ok=True)
for fn in os.listdir(src):
s = os.path.join(src, fn)
t = os.path.join(dst, fn)
if os.path.isfile(s):
shutil.copy2(s, t)
elif os.path.isdir(s):
copy_tree(s, t)
d
Cpython加密python代码
最新推荐文章于 2023-12-07 12:17:27 发布