Skip to content

Commit 7fccf20

Browse files
committed
Remove pdr
1 parent a44b835 commit 7fccf20

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

setup.cfg

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
22
name = yeelib
33
author = 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.
66
long_description = README.rst
7-
home-page = https://github.com/codingjoe/yeelib
7+
url = https://github.com/codingjoe/yeelib
88
license = Apache-2
99
classifier =
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]
3329
universal = 1
3430

setup.py

100644100755
Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
#!/usr/bin/env python
2+
import subprocess
3+
24
from 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())

0 commit comments

Comments
 (0)