-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
48 lines (42 loc) · 1.6 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
from setuptools import setup, find_packages
import io
import os
import re
here = os.path.abspath(os.path.dirname(__file__))
# Read the version number from a source file.
def find_version(*file_paths):
pathname = os.path.join(here, *file_paths)
with io.open(pathname, mode='r', encoding='latin1') as verf:
version_file = verf.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.MULTILINE)
print version_file
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
# Get the long description from the relevant file
description = "Python Microframework for REST endpoints"
long_description = description
with io.open('DESCRIPTION.rst', encoding='utf-8') as descf:
long_description = descf.read()
setup(
name="resto",
version=find_version('resto', '__init__.py'),
description=description,
long_description=long_description,
url='http://github.com/rafaelpivato/resto',
author='Rafael Pivato',
author_email='[email protected]',
license='MIT',
classifiers=[
'Development Status :: 1 - Planning',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP :: WSGI',
'Topic :: Software Development :: Libraries :: Application Frameworks',
],
keywords='rest framework micro microframework wsgi',
packages=find_packages(exclude=["contrib", "docs", "tests*"]),
)