-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
45 lines (36 loc) · 1.16 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
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
from __future__ import print_function
import ast
import os
import setuptools
import sys
os.chdir(os.path.dirname(os.path.abspath(__file__)))
if sys.version_info[0] != 3:
print("Only Python 3 is supported!")
sys.exit(1)
def read_requirements(path="requirements.txt"):
fullpath = os.path.join(os.path.dirname(__file__), path)
with open(fullpath, "r") as f:
lines = [line.strip() for line in f.readlines() if line]
return [line for line in lines if line]
def get_version(path="russell/__version__.py"):
with open(path) as fh:
for line in fh:
if line.startswith("__version__ ="):
return ast.literal_eval(line[14:])
setuptools.setup(
name="russell",
packages=["russell"],
version=get_version(),
license="GPL-3.0",
description="A static HTML blog generator.",
author="Andreas Lutro",
author_email="[email protected]",
url="https://github.com/anlutro/russell",
keywords=["blog", "static", "html", "generator"],
classifiers=[],
install_requires=read_requirements(),
entry_points={
"console_scripts": ["russell=russell.cli:main"],
},
)