[fix] use pip parse requirements in setup.py

This commit is contained in:
Anand Doshi 2015-12-09 12:15:20 +05:30
parent a68a3b5cc1
commit 29fe53f63c

View File

@ -1,9 +1,8 @@
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',
@ -14,5 +13,6 @@ setup(
packages=find_packages(),
zip_safe=False,
include_package_data=True,
install_requires=install_requires
install_requires=[str(ir.req) for ir in requirements],
dependency_links=[str(ir._link) for ir in requirements if ir._link]
)