从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的更多相关文章

  1. Github上关于iOS的各种开源项目集合(强烈建议大家收藏,查看,总有一款你需要)

    下拉刷新 EGOTableViewPullRefresh - 最早的下拉刷新控件. SVPullToRefresh - 下拉刷新控件. MJRefresh - 仅需一行代码就可以为UITableVie ...

  2. 参与github上开源项目的大致流程和注意事项

    Foreword github是一个很火的代码托管服务网站,可能好多人都想参与一两个项目玩一玩学习一下,但由于是纯英文的网站,可能又会止步于想法上没有动手实践.接下来我就介绍一下参与github上开源 ...

  3. GitHub 上有哪些完整的 iOS-App 源码值得参考

    作者:wjh2005链接:https://www.zhihu.com/question/28518265/answer/88750562来源:知乎著作权归作者所有,转载请联系作者获得授权. 1. Co ...

  4. GitHub上不错的Android开源项目(三)

    收集相关系列资料,自己用作参考,练习和实践.小伙伴们,总有一天,你也能写出 Niubility 的 Android App :-) GitHub上不错的Android开源项目(一):http://ww ...

  5. GitHub上不错的Android开源项目(二)

    收集相关系列资料,自己用作参考,练习和实践.小伙伴们,总有一天,你也能写出 Niubility 的 Android App :-) 系列文章如下: GitHub上不错的Android开源项目(一):h ...

  6. GitHub上最火的74个Android开源项目

    GitHub上最火的74个Android开源项目 1.ActionBarSherlock ActionBarSherlock应该算得上是GitHub上最火的Android开源项目了,它是一个独立的库, ...

  7. GitHub上最火的40个Android开源项目(二)

    21.drag-sort-listview DragSortListView(DSLV)是Android ListView的一个扩展,支持拖拽排序和左右滑动删除功能.重写了TouchIntercept ...

  8. Android github上的好的开源项目汇总

    转自:http://blog.csdn.net/ithomer/article/details/8882236 GitHub 上的开源项目不胜枚举,越来越多的开源项目正在迁移到GitHub平台上.基于 ...

  9. github上关于iOS的各种开源项目集合(转)

    UI 下拉刷新 EGOTableViewPullRefresh - 最早的下拉刷新控件. SVPullToRefresh - 下拉刷新控件. MJRefresh - 仅需一行代码就可以为UITable ...

随机推荐

  1. jsp 传值jsp 数据库 乱码解决的攻略 全套

    jsp传值给jsp中文乱码 传值给数据库乱码的解决方法 所有的用到编码的所有统一utf-8 1.装mysql的时候有选择编码的界面的那个地方选utf-8编码 2 建数据库的时候选择 字符集 排序规则所 ...

  2. C# WebQQ协议群发机器人(二)

    本文出处http://blog.csdn.net/zhujunxxxxx/ 如需转载请注明出处! 接着上一篇http://blog.csdn.net/zhujunxxxxx/article/detai ...

  3. HTTP Error 500.19

    HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related ...

  4. poj--3159--Candies(简单差分约束)

    Candies Time Limit: 1500MS   Memory Limit: 131072K Total Submissions: 26888   Accepted: 7398 Descrip ...

  5. 用户命令切换-命令su

    命令su格式为su [-] username su su - su test su root

  6. 4.matlab基础

    1 函数句柄 clear all; f1=@cos t=:pi/:pi f1(t) f2=@complex f2(,) clear all %函数句柄 f1=@char %函数句柄转换为字符串 s1= ...

  7. Spark RDD概念学习系列之典型RDD的特征

    不多说,直接上干货!

  8. Core Java(六)

    面向对象语言特性 (一) (一)  static 作用于 变量,方法,代码块 静态变量:被类的所有对象共享   在类加载时被加载   优先于对象 Student.country = "中国& ...

  9. 关于iOS11上MJRefresh tabview刷新后,重新加载另一组数据, 回不到顶部或者头尾显示混乱等问题解决

    MJRefresh在iOS11上存在很多bug 比如在iphoenx上首尾仍会显示的问题 刷新数据后tableview置顶不上去等问题 虽然官方给出了适配方案  但是问题还没有的到解决 比如tabvi ...

  10. Mongodb 启动关闭脚本并设置开机自动启动Mongodb

    配置文件内容:[root@yoon etc]# cat mongod.conf logpath=/export/log/mongodb.loglogappend=truefork = truedbpa ...