-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
28 lines (23 loc) · 882 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
from setuptools import setup
import os, subprocess, datetime
gitIdCmd = 'git log -1 --format="%h"'
if __name__ == '__main__':
gitId = subprocess.check_output(gitIdCmd).decode('utf-8').rstrip()
print('gitId: ', gitId)
today = datetime.date.today()
# It would be nice to include the git id, but it causes
# setuptools to print an 'invalid version' warning
today_str = '{}.{:03d}.{:02d}.{:02d}'#.{}'
today_str = today_str.format(today.year//1000,
today.year%1000,
today.month,
today.day) #, gitId)
setup(
name='Hippy',
version=today_str,
url='https://github.com/HPInc/hippy',
description='HP Sprout Python Client',
packages=['hippy'],
install_requires=['websockets'],
license='MIT',
)