comparison setup.py @ 693:a06689439eb0

Don't use pip to parse requirements.txt. This was not a public API
author Stefano Rivera <stefano@rivera.za.net>
date Tue, 10 Sep 2019 17:00:01 -0300
parents 6cd8182a05d8
children 15d304a1b54b
comparison
equal deleted inserted replaced
692:6cd8182a05d8 693:a06689439eb0
10 import py2exe 10 import py2exe
11 py2exe # To make pyflakes happy. 11 py2exe # To make pyflakes happy.
12 except ImportError: 12 except ImportError:
13 pass 13 pass
14 14
15 try: 15 reqs = []
16 from pip.req import parse_requirements 16 with open('requirements.txt') as f:
17 import os 17 for line in f:
18 game_dir = os.path.dirname(__file__) 18 reqs.append(line.strip())
19 req_file = os.path.join(game_dir, 'requirements.txt')
20 install_reqs = parse_requirements(req_file)
21 reqs = [str(ir.req) for ir in install_reqs]
22 except ImportError:
23 reqs = []
24 19
25 # This should probably be pulled from constants.py 20 # This should probably be pulled from constants.py
26 VERSION_STR = "0.1" 21 VERSION_STR = "0.1"
27 22
28 setup( 23 setup(