Skip to content

Commit

Permalink
Remove pdr
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed Apr 6, 2019
1 parent a44b835 commit 7fccf20
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
10 changes: 3 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[metadata]
name = yeelib
author = Johannes Hoppe
author-email = info@johanneshoppe.com
summary = Python library for Xiaomi Mi Yeelight.
author_email = info@johanneshoppe.com
description = Python library for Xiaomi Mi Yeelight.
long_description = README.rst
home-page = https://github.com/codingjoe/yeelib
url = https://github.com/codingjoe/yeelib
license = Apache-2
classifier =
Development Status :: 5 - Production/Stable
Expand All @@ -25,10 +25,6 @@ keywords =
asyncio
home-automation

[files]
packages =
yeelib

[bdist_wheel]
universal = 1

Expand Down
26 changes: 22 additions & 4 deletions setup.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
#!/usr/bin/env python
import subprocess

from setuptools import setup

setup(
setup_requires=['pbr'],
pbr=True,
)

def get_version():
try:
output = subprocess.check_output( # nosec
['git', 'describe', '--tags']
).decode().strip()
except subprocess.CalledProcessError:
pass
else:
try:
tag, commit_num, sha = output.split('-', 3)
except ValueError:
pep440_version = output
else:
pep440_version = '%s.dev%s' % (tag, commit_num)

return pep440_version


setup(version=get_version())

0 comments on commit 7fccf20

Please sign in to comment.