forked from Jeremy-Gaillard/CityUtils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
48 lines (39 loc) · 1.23 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
# -*- coding: utf-8 -*-
import os
import re
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
requirements = (
'psycopg2',
'pyyaml'
)
def find_version(*file_paths):
"""
see https://github.com/pypa/sampleproject/blob/master/setup.py
"""
with open(os.path.join(here, *file_paths), 'r') as f:
version_file = f.read()
# The version line must have the form
# __version__ = 'ver'
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string. "
"Should be at the first line of __init__.py.")
setup(
name='city_utils',
version=find_version('city_utils', '__init__.py'),
description="Various city processing utilities",
url='https://github.com/Oslandia/TODO',
author='dev',
author_email='[email protected]',
license='GPLv3',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2.7',
],
packages=find_packages(),
install_requires=requirements
)