File: install_requirements.py

package info (click to toggle)
flask-login 0.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 396 kB
  • sloc: python: 2,180; makefile: 141; sh: 30
file content (22 lines) | stat: -rw-r--r-- 513 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import sys
import os


is_dev = sys.argv[1] == "dev" if len(sys.argv) > 1 else False


if sys.version_info >= (3, 3):
    requirements = "requirements.txt"
elif (2, 6) <= sys.version_info < (3, 0):
    if is_dev:
        requirements = "py2-requirements.txt"
    else:
        requirements = "requirements.txt"
else:
    raise AssertionError("only support 2.6, 2.7, 3.3")


if __name__ == "__main__":
    if is_dev:
        requirements = "dev-%s" % requirements
    os.system("pip install -r %s" % requirements)