~ubuntu-branches/ubuntu/trusty/python-keystoneclient/trusty-proposed

« back to all changes in this revision

Viewing changes to tools/install_venv.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-01-18 07:44:54 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20130118074454-g7w5blpynohn1s48
Tags: 1:0.2.2-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
 
170
170
def get_distro():
171
171
    if (os.path.exists('/etc/fedora-release') or
172
 
        os.path.exists('/etc/redhat-release')):
 
172
            os.path.exists('/etc/redhat-release')):
173
173
        return Fedora()
174
174
    elif os.path.exists('/etc/SuSE-release'):
175
175
        return Suse()
218
218
 
219
219
    # Tell the virtual env how to "import nova"
220
220
    pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages",
221
 
                        "keystoneclient.pth")
 
221
                           "keystoneclient.pth")
222
222
    f = open(pthfile, 'w')
223
223
    f.write("%s\n" % ROOT)
224
224
 
252
252
def parse_args():
253
253
    """Parse command-line arguments"""
254
254
    parser = optparse.OptionParser()
255
 
    parser.add_option("-n", "--no-site-packages", dest="no_site_packages",
 
255
    parser.add_option(
 
256
        "-n", "--no-site-packages", dest="no_site_packages",
256
257
        default=False, action="store_true",
257
258
        help="Do not inherit packages from global Python install")
258
259
    return parser.parse_args()