From 29fe53f63c8fae263243abfd3c5138c6a943bd98 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 9 Dec 2015 12:15:20 +0530 Subject: [PATCH] [fix] use pip parse requirements in setup.py --- setup.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/setup.py b/setup.py index 0cca10682d..d81e7b7ead 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,18 @@ from setuptools import setup, find_packages +from pip.req import parse_requirements version = "6.12.6" - -with open("requirements.txt", "r") as f: - install_requires = f.readlines() +requirements = parse_requirements("requirements.txt", session="") setup( - name='erpnext', - version=version, - description='Open Source ERP', - author='Frappe Technologies', - author_email='info@erpnext.com', - packages=find_packages(), - zip_safe=False, - include_package_data=True, - install_requires=install_requires + name='erpnext', + version=version, + description='Open Source ERP', + author='Frappe Technologies', + author_email='info@erpnext.com', + packages=find_packages(), + zip_safe=False, + include_package_data=True, + install_requires=[str(ir.req) for ir in requirements], + dependency_links=[str(ir._link) for ir in requirements if ir._link] )