-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
38 lines (30 loc) · 1.13 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
import os
from setuptools import find_packages, setup
def read_requirements(filename: os.PathLike):
with open(filename) as f:
return [line.strip() for line in f if line.strip() and not line.startswith('#')]
required_deps = read_requirements("requirements.txt")
def __createManifest__(subdirs):
"""inventory all files in path and create a manifest file"""
current = os.path.dirname(__file__)
relative_paths = [os.path.relpath(path, current) for path in subdirs]
with open(os.path.join(current, "MANIFEST.in"), "w") as manifest:
manifest.writelines(
"recursive-include {} *.json".format(" ".join(relative_paths))
)
add_il = os.path.join(os.path.dirname(__file__), "plmfit")
__createManifest__([add_il])
print("MANIFEST.in created")
setup(
name="plmfit",
version="1.0.0",
description="PLMFit",
long_description="PLMFit",
author="Thomas Bikias, Evangelos Stamkopoulos",
packages=find_packages(),
license="MIT",
zip_safe=True,
install_requires=required_deps,
include_package_data=True,
entry_points={"console_scripts": ["plmfit=plmfit.__main__:main"]},
)