Skip to content

Commit d863b36

Browse files
committed
chore: fix issues with setup.py
1 parent 6c1b7e0 commit d863b36

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed
File renamed without changes.

knockapi/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import requests
22
from json.decoder import JSONDecodeError
3-
from ._version import __version__
3+
from knockapi.__about__ import __version__
44

55

66
class Connection(object):

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bump2version

setup.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
import setuptools
2-
from knockapi._version import __version__
2+
import os
3+
4+
base_dir = os.path.dirname(__file__)
35

46
with open("README.md", "r") as f:
57
long_description = f.read()
68

9+
about = {}
10+
with open(os.path.join(base_dir, "knockapi", "__about__.py")) as f:
11+
exec(f.read(), about)
12+
13+
14+
def read_requirements(filename):
15+
with open(filename) as f:
16+
return [line.strip() for line in f if line.strip() and not line.startswith("#")]
17+
18+
719
setuptools.setup(
820
name='knockapi',
9-
version=__version__,
21+
version=about['__version__'],
1022
python_requires='>=2.7.16, <4',
11-
install_requires=[
12-
'requests'
13-
],
23+
install_requires=read_requirements("requirements.txt"),
1424
extras_require={
15-
'dev': [
16-
'bump2version',
17-
]
25+
"dev": read_requirements("requirements-dev.txt"),
1826
},
1927
classifiers=[
2028
'Development Status :: 5 - Production/Stable',

0 commit comments

Comments
 (0)