forked from czasg/pywss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
41 lines (33 loc) · 1.07 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
import os
import re
import codecs
from setuptools import setup, find_packages
"""pip install twine
1、python setup check
2、python setup sdist
3、twine upload dist/__packages__-__version__.tar.gz
"""
def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
return codecs.open(os.path.join(here, *parts), 'r', encoding='utf-8').read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
else:
raise RuntimeError("Unable to find version string.")
setup(
name='pywss',
version=find_version('pywss', 'version.py'),
description="This is a web-socket-server by python",
long_description="see https://github.com/CzaOrz/Pywss",
author='czaOrz',
author_email='[email protected]',
url='https://github.com/CzaOrz/Pywss',
packages=find_packages(),
classifiers=[
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
)