-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (48 loc) · 1.58 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env python
# encoding: utf-8
import codecs
import os
import re
from setuptools import setup
MAIN_PKG = "githelpers"
def _read_from_file(relpath):
"""Return the text contained in the file at *relpath* as unicode."""
thisdir = os.path.dirname(__file__)
path = os.path.join(thisdir, relpath)
with codecs.open(path, encoding="utf8") as f:
text = f.read()
return text
NAME = "githelpers"
DESCRIPTION = "Provides Git helper scripts such as `next`, `prev`, and `fix`."
KEYWORDS = "git"
AUTHOR = "Steve Canny"
AUTHOR_EMAIL = "stcanny@gmail.com"
URL = "https://github.com/scanny"
PACKAGES = [MAIN_PKG, "githelpers.scripts"]
ENTRY_POINTS = {
"console_scripts": [
"drop = githelpers.scripts.drop:main",
"fix = githelpers.scripts.fix:main",
"git-lawg = githelpers.scripts.lawg:main",
"next = githelpers.scripts.next:main",
"prev = githelpers.scripts.prev:main",
]
}
# ---------------------------------------------------------------------------
# Everything below is calculated and shouldn't normally need editing
# ---------------------------------------------------------------------------
# read version from main package __init__.py
init_py = _read_from_file(os.path.join(MAIN_PKG, "__init__.py"))
VERSION = re.search('__version__ = "([^"]+)"', init_py).group(1)
params = {
"author": AUTHOR,
"author_email": AUTHOR_EMAIL,
"description": DESCRIPTION,
"entry_points": ENTRY_POINTS,
"keywords": KEYWORDS,
"name": NAME,
"packages": PACKAGES,
"url": URL,
"version": VERSION,
}
setup(**params)