-
Notifications
You must be signed in to change notification settings - Fork 58
/
setup.py
executable file
·36 lines (30 loc) · 1.02 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python
import re
from os.path import exists
from setuptools import find_packages, setup
def parse_requirements(file_name):
requirements = []
for line in open(file_name, "r").read().split("\n"):
if re.match(r"(\s*#)|(\s*$)", line):
continue
if re.match(r"\s*-e\s+", line):
requirements.append(re.sub(r"\s*-e\s+.*#egg=(.*)$", r"\1", line))
elif re.match(r"(\s*git)|(\s*hg)", line):
pass
else:
requirements.append(line)
return requirements
setup(
name="django-hordak",
version=open("VERSION").read().strip(),
author="Adam Charnock",
author_email="[email protected]",
packages=find_packages(),
scripts=[],
url="https://github.com/adamcharnock/django-hordak",
license="MIT",
description="Double entry book keeping in Django",
long_description=open("README.rst").read() if exists("README.rst") else "",
include_package_data=True,
install_requires=parse_requirements("requirements.txt"),
)