setup.py (745B)
1 from setuptools import setup 2 import configparser 3 import os 4 5 6 requirements = [] 7 f = open('requirements.txt', 'r') 8 while True: 9 l = f.readline() 10 if l == '': 11 break 12 requirements.append(l.rstrip()) 13 f.close() 14 15 test_requirements = [] 16 f = open('test_requirements.txt', 'r') 17 while True: 18 l = f.readline() 19 if l == '': 20 break 21 test_requirements.append(l.rstrip()) 22 f.close() 23 24 postgres_requirements = [ 25 'psycopg2==2.8.6', 26 ] + requirements 27 sqlite_requirements = [ 28 ] + requirements 29 setup( 30 install_requires=requirements, 31 tests_require=test_requirements, 32 extras_require={ 33 'postgres': postgres_requirements, 34 'sqlite': sqlite_requirements, 35 } 36 )