-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·31 lines (24 loc) · 897 Bytes
/
setup.py
File metadata and controls
executable file
·31 lines (24 loc) · 897 Bytes
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
from setuptools import setup, find_packages
def find_version(path):
import re
# path shall be a plain ascii text file.
s = open(path, "rt").read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", s, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Version not found")
def get_requirements(filename):
with open(filename, "r") as fh:
return [l.strip() for l in fh]
setup(
name="billy_penn",
version=find_version("billy_penn/__init__.py"),
author="Nick Hand",
maintainer="Nick Hand",
maintainer_email="nick.hand@phila.gov",
packages=find_packages(),
description="A package for meta information about the City of Philadelphia's government",
license="MIT",
python_requires=">=3.6",
install_requires=get_requirements("requirements.txt"),
)