forked from blazehu/pycmdbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·40 lines (34 loc) · 910 Bytes
/
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
# coding=utf-8
import os
from setuptools import setup, find_packages
# Package meta-data.
NAME = "pycmdbuild"
DESCRIPTION = "Python library to access the REST interface of a CMDBuild server"
URL = "https://github.com/blazehu/pycmdbuild/tree/master"
EMAIL = "[email protected]"
AUTHOR = "yhhu"
VERSION = "0.1.1"
def get_version(project='cmdbuild'):
package_root = os.path.dirname(__file__)
version_path = os.path.join(package_root, project, 'version')
if os.path.exists(version_path):
with open(version_path) as f:
version = f.read().strip()
else:
version = VERSION
return version
setup(
name=NAME,
version=get_version(),
description=DESCRIPTION,
author=AUTHOR,
author_email=EMAIL,
url=URL,
packages=find_packages(),
requires=["requests"],
package_data={
'cmdbuild': [
'version',
],
},
)