项目设置、流程搭建与单元测试指南
项目构建与虚拟环境设置
在项目开发中,构建临时目录并复制项目文件是常见操作。我们创建了一个名为 build_dir 的目标,用于创建临时构建目录,并将所有可能参与构建的项目文件复制到该目录中:
build_dir:
# Creates a temporary build-directory, copies the project-files
# to it.
# Creating "$(TMPDIR)"
mkdir -p $(TMPDIR)
# Copying project-files to $(TMPDIR)
cp -R bin $(TMPDIR)
cp -Ret cetera$(TMPDIR)
cp -R src $(TMPDIR)
cp -R var $(TMPDIR)
cp setup.py $(TMPDIR)
对于每个环境,还会编写 prep 目标以及最终目标,用于根据需要重命名和删除文件,并在临时构建目录中执行 setup.py 文件。以开发环境为例:
dev_prep:
# Renames any dev-specific files so that they will be the "real"
# files included in the build.
# At this point, there are none,
超级会员免费看
订阅专栏 解锁全文
2411

被折叠的 条评论
为什么被折叠?



