forked from thoth-station/kebechet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
37 lines (30 loc) · 1.22 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
"""This file contains packaging information for kebechet module."""
import os
from setuptools import setup, find_packages
from pathlib import Path
def get_install_requires(): # noqa: D103
with open("requirements.txt", "r") as requirements_file:
# TODO: respect hashes in requirements.txt file
res = requirements_file.readlines()
return [req.split(" ", maxsplit=1)[0] for req in res if req]
def get_version(): # noqa: D103
with open(os.path.join("kebechet", "__init__.py")) as f:
content = f.readlines()
for line in content:
if line.startswith("__version__ ="):
# dirty, remove trailing and leading chars
return line.split(" = ")[1][1:-2]
raise ValueError("No version identifier found")
setup(
name="kebechet",
entry_points={"console_scripts": ["kebechet=kebechet.cli:cli"]},
version=get_version(),
description="Keep your dependencies in your projects fresh and up2date",
long_description=Path("README.rst").read_text(),
long_description_content_type="text/markdown",
author="Fridolin Pokorny",
author_email="[email protected]",
license="GPLv3+",
packages=find_packages(),
install_requires=get_install_requires(),
)