Rushabh Mehta | e460aa2 | 2013-12-11 11:32:21 +0530 | [diff] [blame] | 1 | from setuptools import setup, find_packages |
Anand Doshi | db6b832 | 2016-06-09 16:29:12 +0530 | [diff] [blame] | 2 | import re, ast |
Rushabh Mehta | e460aa2 | 2013-12-11 11:32:21 +0530 | [diff] [blame] | 3 | |
Anand Doshi | db6b832 | 2016-06-09 16:29:12 +0530 | [diff] [blame] | 4 | # get version from __version__ variable in erpnext/__init__.py |
Ankush Menat | 494bd9e | 2022-03-28 18:52:46 +0530 | [diff] [blame] | 5 | _version_re = re.compile(r"__version__\s+=\s+(.*)") |
Anand Doshi | db6b832 | 2016-06-09 16:29:12 +0530 | [diff] [blame] | 6 | |
Ankush Menat | 494bd9e | 2022-03-28 18:52:46 +0530 | [diff] [blame] | 7 | with open("requirements.txt") as f: |
| 8 | install_requires = f.read().strip().split("\n") |
Ameya Shenoy | da33b14 | 2018-04-30 11:17:12 +0530 | [diff] [blame] | 9 | |
Ankush Menat | 494bd9e | 2022-03-28 18:52:46 +0530 | [diff] [blame] | 10 | with open("erpnext/__init__.py", "rb") as f: |
| 11 | version = str(ast.literal_eval(_version_re.search(f.read().decode("utf-8")).group(1))) |
Anand Doshi | db6b832 | 2016-06-09 16:29:12 +0530 | [diff] [blame] | 12 | |
Rushabh Mehta | e460aa2 | 2013-12-11 11:32:21 +0530 | [diff] [blame] | 13 | setup( |
Ankush Menat | 494bd9e | 2022-03-28 18:52:46 +0530 | [diff] [blame] | 14 | name="erpnext", |
Anand Doshi | 29fe53f | 2015-12-09 12:15:20 +0530 | [diff] [blame] | 15 | version=version, |
Ankush Menat | 494bd9e | 2022-03-28 18:52:46 +0530 | [diff] [blame] | 16 | description="Open Source ERP", |
| 17 | author="Frappe Technologies", |
| 18 | author_email="info@erpnext.com", |
Anand Doshi | 29fe53f | 2015-12-09 12:15:20 +0530 | [diff] [blame] | 19 | packages=find_packages(), |
| 20 | zip_safe=False, |
| 21 | include_package_data=True, |
Ankush Menat | 494bd9e | 2022-03-28 18:52:46 +0530 | [diff] [blame] | 22 | install_requires=install_requires, |
Pratik Vyas | 0240dc5 | 2014-02-14 16:10:55 +0530 | [diff] [blame] | 23 | ) |