Skip to content

Commit f57c41a

Browse files
authored
Merge pull request #6 from inwx/pip_fixes
Fixes pip installation errors & Adds pypi deployment script
2 parents 1decb96 + 13202c2 commit f57c41a

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

INWX/Domrobot.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
import hashlib
33
import hmac
44
import json
5+
import random
6+
import string
57
import struct
68
import sys
79
import time
8-
import random
9-
import string
10-
import requests
1110
import xmlrpc.client
1211
from enum import Enum
1312

13+
import requests
14+
1415

1516
class ApiType(Enum):
1617
XML_RPC = '/xmlrpc/'
@@ -125,7 +126,8 @@ def call_api(self, api_method, method_params=None):
125126
'User-Agent': 'DomRobot/' + ApiClient.CLIENT_VERSION + ' (Python ' + self.get_python_version() + ')'
126127
}
127128

128-
response = self.api_session.post(self.api_url + self.api_type.value, data=payload.encode('UTF-8'), headers=headers)
129+
response = self.api_session.post(self.api_url + self.api_type.value, data=payload.encode('UTF-8'),
130+
headers=headers)
129131

130132
if self.debug_mode:
131133
print('Request (' + api_method + '): ' + payload)

requirements.txt

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

scripts/deploy.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
rm -rf dist && python setup.py sdist bdist_wheel && python -m twine upload dist/*

setup.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
import setuptools
2-
from INWX.Domrobot import ApiClient
2+
3+
version = '3.0.4'
4+
5+
with open("requirements.txt", "r") as fh:
6+
install_requires = fh.read()
37

48
with open("README.md", "r") as fh:
59
long_description = fh.read()
610

711
setuptools.setup(
8-
name='inwx_domrobot',
9-
version=ApiClient.CLIENT_VERSION,
12+
name='inwx-domrobot',
13+
version=version,
1014
author='INWX Developer',
1115
author_email='[email protected]',
1216
description='INWX API Python Client',
1317
long_description=long_description,
1418
long_description_content_type='text/markdown',
1519
url='https://github.com/inwx/python-client',
16-
download_url='https://github.com/inwx/python-client/archive/v' + ApiClient.CLIENT_VERSION + '.tar.gz',
20+
download_url='https://github.com/inwx/python-client/archive/v' + version + '.tar.gz',
1721
packages=setuptools.find_packages(),
1822
keywords=['INWX', 'API', 'PYTHON', 'CLIENT', 'DOMROBOT'],
19-
install_requires=[
20-
'requests'
21-
],
23+
install_requires=install_requires,
2224
classifiers=[
2325
'Development Status :: 5 - Production/Stable',
2426
'Intended Audience :: Developers',

0 commit comments

Comments
 (0)