github上Devstack的一些变动,截至8.20
从github下直接clone下来的代码在执行之前须要对一些文件进行改动,否则会出现关于REQUIREMENTS的错误
说明:代码前边是"-"号的,须要删除,代码前边是“+”号的,是须要加入上去的。注意区分哪些是凝视,哪些是代码,只是多解释了。
1./inc/python
66行,function pip_install_gr { #这个函数内
# Wrapper for ``pip install`` to set cache and proxy environment variables
# Uses globals ``OFFLINE``, ``PIP_VIRTUAL_ENV``,
-# ``PIP_UPGRADE``, ``TRACK_DEPENDS``, ``*_proxy``
+# ``PIP_UPGRADE``, ``TRACK_DEPENDS``, ``*_proxy``,
+# ``REQUIREMENTS_MODE``
# pip_install package [package ...]
function pip_install {
local xtrace=$(set +o | grep xtrace)
103行。function pip_install { #这个函数内
fi
fi + cmd_pip="$cmd_pip install"
+
+ # Handle a constraints file, if needed.
+ if [ "$REQUIREMENTS_MODE" == "constraints" -a -n "$REQUIREMENTS_DIR" ]; then
+ cmd_pip="$cmd_pip -c $REQUIREMENTS_DIR/upper-constraints.txt"
+ fi
+
local pip_version=$(python -c "import pip; \
print(pip.__version__.strip('.')[0])")
if (( pip_version<6 )); then
116行。function pip_install { #这个函数内
https_proxy="${https_proxy:-}" \
no_proxy="${no_proxy:-}" \
PIP_FIND_LINKS=$PIP_FIND_LINKS \
- $cmd_pip install $upgrade \
+ $cmd_pip $upgrade \
$@
# Also install test requirements
128行,function pip_install { #这个函数内
https_proxy=${https_proxy:-} \
no_proxy=${no_proxy:-} \
PIP_FIND_LINKS=$PIP_FIND_LINKS \
- $cmd_pip install $upgrade \</span>
+ $cmd_pip $upgrade \</span>
-r $test_req
fi<span style="color:#aa22aa;">
215行,说明:这个函数我并没有在源文件里找到。不知道是不是须要自己手动加入,假设有知道结果的希望能够告诉我。
function setup_package_with_req_sync { #这个函数内
# ``errexit`` requires us to trap the exit code when the repo is changed
local update_requirements=$(cd $project_dir && git diff --exit-code >/dev/null || echo "changed") - if [[ $update_requirements != "changed" ]]; then</span>
+ if [[ $update_requirements != "changed" && "$REQUIREMENTS_MODE" != "constraints" ]]; then
if is_in_projects_txt $project_dir; then
(cd $REQUIREMENTS_DIR; \
./.venv/bin/python update.py $project_dir)
2. /lib/infra
33行。
<div class="diff ctx"># bring down global requirements</div><div class="diff ctx"> git_clone $REQUIREMENTS_REPO $REQUIREMENTS_DIR $REQUIREMENTS_BRANCH</div><div class="diff ctx"> [ ! -d $PIP_VIRTUAL_ENV ] && virtualenv $PIP_VIRTUAL_ENV</div><div class="diff add">+ # XXX: Remove when 7.1 is released.</div><div class="diff add">+ $REQUIREMENTS_DIR/.venv/bin/pip install -U git+https://github.com/pypa/pip@develop#egg=pip</div><div class="diff ctx"> # We don't care about testing git pbr in the requirements venv.</div><div class="diff ctx"> PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install -U pbr</div><div class="diff ctx"> PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install $REQUIREMENTS_DIR</div>
3../stack.sh
685行,
# Configure an appropriate Python environment
if [[ "$OFFLINE" != "True" ]]; then
+ REQUIREMENTS_MODE=${REQUIREMENTS_MODE:-} \
PYPI_ALTERNATIVE_URL=${PYPI_ALTERNATIVE_URL:-""} $TOP_DIR/tools/install_pip.sh
fi
699行。
virtualenv --system-site-packages $DEST/.venv
source $DEST/.venv/bin/activate
$DEST/.venv/bin/pip freeze > $DEST/requires-pre-pip
+ # XXX: Remove when 7.1 is released.
+ $DEST/.venv/bin/pip install -U git+https://github.com/pypa/pip@develop#egg=pip
fi # Do the ugly hacks for broken packages and distros
4. ./stackrc
149行,
# Zero disables timeouts
GIT_TIMEOUT=${GIT_TIMEOUT:-0} +# Requirements enforcing mode
+#
+# - strict (default) : ensure projects.txt requirements files match
+# what's in global requirements.
+#
+# - constraints : do not modify project requirements at all. Instead
+# use upper-constraints.txt to constraint the versions of things installed
+# via pip for all pip invocations made during stack.sh.
+REQUIREMENTS_MODE=${REQUIREMENTS_MODE:-strict} # Repositories
# ------------
5. /tools/build_wheel.sh
56行。
# Prepare the workspace
TMP_VENV_PATH=$(mktemp -d tmp-venv-XXXX)
virtualenv $TMP_VENV_PATH
+# Back this out when 7.1 is released.
+$TMP_VENV_PATH/bin/pip install -U git+https://github.com/pypa/pip@develop#egg=pip # Install modern pip and wheel
-PIP_VIRTUAL_ENV=$TMP_VENV_PATH pip_install -U pip wheel
+PIP_VIRTUAL_ENV=$TMP_VENV_PATH pip_install -U wheel # BUG: cffi has a lot of issues. It has no stable ABI, if installed
# code is built with a different ABI than the one that's detected at
6. /tools/install_pip.sh
62行。
function install_get_pip {
}
+function install_constraints_pip {
+ # Constraints requires pip 7.1.0 or newer. For now, when constraints are
+ # used, if -c isn't in the help, install develop.
+ if !(pip install -h | grep -- --constraint); then
+ sudo -H -E python -m pip install -U git+https://github.com/pypa/pip@develop#egg=pip
+ fi
+}
+
+
function configure_pypi_alternative_url {
PIP_ROOT_FOLDER="$HOME/.pip"
PIP_CONFIG_FILE="$PIP_ROOT_FOLDER/pip.conf"
97行,
get_versions
uninstall_package python-pip install_get_pip
+if [[ "$REQUIREMENTS_MODE" == "constraints" ]]; then
+ install_constraints_pip
+fi if [[ -n $PYPI_ALTERNATIVE_URL ]]; then
configure_pypi_alternative_url
再说一下,改动代码的时候,加号和减号记得自己删除掉,别直接都粘贴上去了。
github上Devstack的一些变动,截至8.20的更多相关文章
- Github上关于iOS的各种开源项目集合(强烈建议大家收藏,查看,总有一款你需要)
下拉刷新 EGOTableViewPullRefresh - 最早的下拉刷新控件. SVPullToRefresh - 下拉刷新控件. MJRefresh - 仅需一行代码就可以为UITableVie ...
- 参与github上开源项目的大致流程和注意事项
Foreword github是一个很火的代码托管服务网站,可能好多人都想参与一两个项目玩一玩学习一下,但由于是纯英文的网站,可能又会止步于想法上没有动手实践.接下来我就介绍一下参与github上开源 ...
- GitHub 上有哪些完整的 iOS-App 源码值得参考
作者:wjh2005链接:https://www.zhihu.com/question/28518265/answer/88750562来源:知乎著作权归作者所有,转载请联系作者获得授权. 1. Co ...
- GitHub上不错的Android开源项目(三)
收集相关系列资料,自己用作参考,练习和实践.小伙伴们,总有一天,你也能写出 Niubility 的 Android App :-) GitHub上不错的Android开源项目(一):http://ww ...
- GitHub上不错的Android开源项目(二)
收集相关系列资料,自己用作参考,练习和实践.小伙伴们,总有一天,你也能写出 Niubility 的 Android App :-) 系列文章如下: GitHub上不错的Android开源项目(一):h ...
- GitHub上最火的74个Android开源项目
GitHub上最火的74个Android开源项目 1.ActionBarSherlock ActionBarSherlock应该算得上是GitHub上最火的Android开源项目了,它是一个独立的库, ...
- GitHub上最火的40个Android开源项目(二)
21.drag-sort-listview DragSortListView(DSLV)是Android ListView的一个扩展,支持拖拽排序和左右滑动删除功能.重写了TouchIntercept ...
- Android github上的好的开源项目汇总
转自:http://blog.csdn.net/ithomer/article/details/8882236 GitHub 上的开源项目不胜枚举,越来越多的开源项目正在迁移到GitHub平台上.基于 ...
- github上关于iOS的各种开源项目集合(转)
UI 下拉刷新 EGOTableViewPullRefresh - 最早的下拉刷新控件. SVPullToRefresh - 下拉刷新控件. MJRefresh - 仅需一行代码就可以为UITable ...
随机推荐
- iOS推送 (百度推送)
近期在使用推送,所以与大家分享一下我所遇到的问题,与解决这个问题的方法.! 1.首先生成CertificateSigningRequest文件. 点击钥匙串訪问-->从证书颁发机构请求证书--& ...
- ym—— Android网络框架Volley(终极篇)
转载请注明本文出自Cym的博客(http://blog.csdn.net/cym492224103).谢谢支持! 没看使用过Volley的同学能够,先看看Android网络框架Volley(体验篇)和 ...
- js 获取手机浏览器类型,修改css文件的class的值
/*========================================= 函数功能:获取浏览器类型 =========================================*/ ...
- 杂项-建模:BIM
ylbtech-杂项-建模:BIM 建筑信息模型是建筑学.工程学及土木工程的新工具.建筑信息模型或建筑资讯模型一词由Autodesk所创的.它是来形容那些以三维图形为主.物件导向.建筑学有关的电脑辅助 ...
- Response.Redirect(),Server.Transfer(),Server.Execute()的区别与网站优化
转 http://blog.csdn.net/dannywj1371/article/details/10213631 1.Response.Redirect():Response.Redirect方 ...
- c# TextBox
1. text内容全选事件 textBox1.selectAll(); 2.失去与获取焦点事件 textox1.LostFocus += new EventHandler(txt_LostFocus) ...
- 杂文 | 金沙江创投朱啸虎谈微信小程序
我一直在想怎么去描述和朱啸虎的聊天. 最简单的开头一定是说“独角兽捕手朱啸虎”看好小程序了,这个赛道蕴含了许多无比巨大.充沛的机会,所以约到朱啸虎同学深聊这个赛道的创业.但是这样的开头太平,不好玩.事 ...
- 自动刷github提交记录
前言 进入自己github主页会看到自己的提交记录,如果某天没有提交记录,那天的小方框就显示灰色.强迫症的我,每次进来看着就感觉不爽, 想着自己每天记得提交点东西,争取像阮一峰大神一样,每天都有提交记 ...
- Android使用Dribble Api
使用Dribble提供的Api获取上面的设计分享 使用了Material Design.SceneTransitionAnimation 使用了Volley Gson 1. 申请Dribble开发者应 ...
- UVa 11729 Commando War 【贪心】
题意:有n个部下,交待每个部下完成他相应的任务需要bi的时间,然后完成这项任务需要ji的时间, 选择交待任务的顺序,使得总的花费的时间最少 因为不管怎么样,交待所需要的n*bi的时间都是要花费的, 然 ...