-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
53 lines (44 loc) · 1.72 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
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
import os
import re
here = os.path.abspath(os.path.dirname(__file__))
def read_text(fname):
if os.path.isfile(fname):
with open(os.path.join(here, fname)) as f:
return f.read()
else:
print("warning: file {} does not exist".format(fname))
return ""
def get_version(path):
src = read_text(path)
pat = re.compile(r"""^version = ['"](.+?)['"]$""", re.MULTILINE)
result = pat.search(src)
version = result.group(1)
return version
long_description = read_text("README.md")
install_requires = [
l
for l in read_text("requirements.lock").split("\n")
if l.strip() and not l.strip().startswith("#")
]
name = "fs_server"
gh_repo = "https://github.com/weaming/fs-server"
setup(
name=name, # Required
version=get_version("{}/__init__.py".format(name)), # Required
# This is a one-line description or tagline of what your project does.
description="simple crontab implemented on thread executor pool", # Required
long_description=long_description, # Optional
long_description_content_type="text/markdown", # Optional
install_requires=install_requires,
# You can use `find_packages()` or the `py_modules` argument which expect a
# single python file
packages=find_packages(exclude=["contrib", "docs", "tests"]), # Required
entry_points={"console_scripts": ["fs-server=fs_server.__main__:main"]}, # Optional
url=gh_repo, # Optional
author="weaming", # Optional
author_email="[email protected]", # Optional
keywords="socks,sendfile,async,fileserver", # Optional
project_urls={"Bug Reports": gh_repo, "Source": gh_repo}, # Optional
)