~zulcss/cinder/cinder-ca-g2

« back to all changes in this revision

Viewing changes to tools/install_venv.py

  • Committer: Chuck Short
  • Date: 2013-01-28 15:28:46 UTC
  • mfrom: (7.2.1 raring)
  • Revision ID: zulcss@ubuntu.com-20130128152846-1yl2iijulcbznp0g
* New upstream release for the Ubuntu Cloud Archive.
* debian/patches/series: Enable skip_failed_tests to fix FTBFS. 
* New upstream release. 
* debian/patches/avoid_setuptools_git_dependency.patch: Rediff
  due to upstream changes.
* debian/control: Add python-keystoneclient as a dependency
* Improve upstart configurations:
  - d/*.upstart: Switch to using start-stop-daemon instead of su,
    stop on [!2345] to catch all transitions.
* d/control: General tidy of package descriptions.
* d/control: Drop BD on python-all-dev as its not required.
* d/*.postrm: Dropped; update-rc.d calls for purge are handled by
  debhelper and are not require for upstart configurations.
* d/patches: removing hp3parclient dependency from tools/test-requires
* d/patches, d/control: adding stevedore dependency, merging deps patches
* d/patches: remove failing tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
143
143
 
144
144
 
145
145
def get_distro():
146
 
    if os.path.exists('/etc/fedora-release') or \
147
 
       os.path.exists('/etc/redhat-release'):
 
146
    if (os.path.exists('/etc/fedora-release') or
 
147
            os.path.exists('/etc/redhat-release')):
148
148
        return Fedora()
149
149
    else:
150
150
        return Distro()
197
197
    pip_install('-r', TEST_REQUIRES)
198
198
 
199
199
    # Tell the virtual env how to "import cinder"
200
 
    pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages",
201
 
                        "cinder.pth")
 
200
    pthfile = os.path.join(venv, "lib",
 
201
                           PY_VERSION, "site-packages",
 
202
                           "cinder.pth")
202
203
    f = open(pthfile, 'w')
203
204
    f.write("%s\n" % ROOT)
204
205
 
233
234
    """Parses command-line arguments."""
234
235
    parser = optparse.OptionParser()
235
236
    parser.add_option("-n", "--no-site-packages", dest="no_site_packages",
236
 
        default=False, action="store_true",
237
 
        help="Do not inherit packages from global Python install")
 
237
                      default=False, action="store_true",
 
238
                      help="Do not inherit packages from "
 
239
                           "global Python install")
238
240
    return parser.parse_args()
239
241
 
240
242