-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
34 lines (31 loc) · 1.1 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
import os, re
from setuptools import setup
with open("ReadMe.md", encoding='utf-8') as f:
mdstr = f.read()
def capture_sgfutil_readme(s):
# Capture paragraph from the ReadMe.md
first_paragraph = re.search('(?<=\n).*?library.*?(?=\n)', s).group()
install_section = re.search('(?<=\n)## Install.*?(?=##)', s, re.DOTALL).group().strip()
return '\n\n'.join(["# sgfutil", first_paragraph, install_section])
_long_description = capture_sgfutil_readme(mdstr)
# Main
setup(
name = "sgfutil",
version = '0.1.1',
packages = ['sgfutil'],
include_package_data = True,
install_requires = ["ply"],
# Meta
author = "wklchris",
author_email="wklchris@hotmail.com",
url = "https://github.com/wklchris/python-sgfutil",
description = "An SGF utilization library for Go/chess game players.",
long_description = _long_description,
long_description_content_type = "text/markdown",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6'
)