File tree Expand file tree Collapse file tree 2 files changed +25
-11
lines changed
Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Original file line number Diff line number Diff line change 11[metadata]
22name = yeelib
33author = Johannes Hoppe
4- author-email = info@johanneshoppe.com
5- summary = Python library for Xiaomi Mi Yeelight.
4+ author_email = info@johanneshoppe.com
5+ description = Python library for Xiaomi Mi Yeelight.
66long_description = README.rst
7- home-page = https://github.com/codingjoe/yeelib
7+ url = https://github.com/codingjoe/yeelib
88license = Apache-2
99classifier =
1010 Development Status :: 5 - Production/Stable
@@ -25,10 +25,6 @@ keywords =
2525 asyncio
2626 home-automation
2727
28- [files]
29- packages =
30- yeelib
31-
3228[bdist_wheel]
3329universal = 1
3430
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
2+ import subprocess
3+
24from setuptools import setup
35
4- setup (
5- setup_requires = ['pbr' ],
6- pbr = True ,
7- )
6+
7+ def get_version ():
8+ try :
9+ output = subprocess .check_output ( # nosec
10+ ['git' , 'describe' , '--tags' ]
11+ ).decode ().strip ()
12+ except subprocess .CalledProcessError :
13+ pass
14+ else :
15+ try :
16+ tag , commit_num , sha = output .split ('-' , 3 )
17+ except ValueError :
18+ pep440_version = output
19+ else :
20+ pep440_version = '%s.dev%s' % (tag , commit_num )
21+
22+ return pep440_version
23+
24+
25+ setup (version = get_version ())
You can’t perform that action at this time.
0 commit comments