-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
46 lines (40 loc) · 1.32 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
#!/usr/bin/env python3
import setuptools
import os
import pip
import pkg_resources
with open("README.md", "r") as fh:
long_description = fh.read()
def parse_requirements_from_file(path):
"""Parses requirements from a requirements file.
Args:
path (str): path to the requirements file.
Yields:
pkg_resources.Requirement: package resource requirement.
"""
with open(path, "r") as file_object:
file_contents = file_object.read()
for req in pkg_resources.parse_requirements(file_contents):
try:
requirement = str(req.req)
except AttributeError:
requirement = str(req)
yield requirement
setuptools.setup(
name="mans_to_es",
version="1.7",
author="LDO-CERT",
author_email="[email protected]",
description="Send .mans to ElasticSearch",
long_description=long_description,
long_description_content_type="text/markdown",
license="Apache License, Version 2.0",
url="https://github.com/LDO-CERT/mans_to_es",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
],
entry_points={"console_scripts": ["mans_to_es=mans_to_es.mans_to_es:main"]},
install_requires=parse_requirements_from_file("requirements.txt"),
)