Compare commits
26 Commits
0.9
...
b32bce956f
Author | SHA1 | Date | |
---|---|---|---|
b32bce956f | |||
22bb4e6bd3 | |||
49954d762b | |||
30504239e1 | |||
|
42799296a9 | ||
|
ac54b7cd0d | ||
|
1df2a42196 | ||
|
2909ea7ed4 | ||
|
f55d6c2e19 | ||
|
664b215f16 | ||
|
5fe756ce97 | ||
|
bf28862f1f | ||
|
fe29441d1d | ||
|
d0043f3f18 | ||
|
583997d64c | ||
|
04daf49b0a | ||
|
b19f5d9049 | ||
|
2052bfd2cc | ||
|
418d3e6041 | ||
|
08cd160713 | ||
|
da80bd93d9 | ||
|
61997df1f3 | ||
|
047bb783b7 | ||
|
281bbfdac4 | ||
|
bcd761653f | ||
|
f521992f58 |
45
.drone.yml
45
.drone.yml
@@ -11,9 +11,9 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: Run unit test
|
- name: Run unit test
|
||||||
environment:
|
environment:
|
||||||
PYTHONPATH: .
|
PYTHONPATH: src
|
||||||
commands:
|
commands:
|
||||||
- python3 setup.py test
|
- python3 tests/main.py
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@@ -28,9 +28,9 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: Run unit test
|
- name: Run unit test
|
||||||
environment:
|
environment:
|
||||||
PYTHONPATH: .
|
PYTHONPATH: src
|
||||||
commands:
|
commands:
|
||||||
- python3 setup.py test
|
- python3 tests/main.py
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@@ -45,9 +45,9 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: Run unit test
|
- name: Run unit test
|
||||||
environment:
|
environment:
|
||||||
PYTHONPATH: .
|
PYTHONPATH: src
|
||||||
commands:
|
commands:
|
||||||
- python3 setup.py test
|
- python3 tests/main.py
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@@ -62,9 +62,9 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: Run unit test
|
- name: Run unit test
|
||||||
environment:
|
environment:
|
||||||
PYTHONPATH: .
|
PYTHONPATH: src
|
||||||
commands:
|
commands:
|
||||||
- python3 setup.py test
|
- tox
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@@ -75,10 +75,10 @@ steps:
|
|||||||
- name: Run unit test
|
- name: Run unit test
|
||||||
image: python:3.6
|
image: python:3.6
|
||||||
environment:
|
environment:
|
||||||
PYTHONPATH: .
|
PYTHONPATH: src
|
||||||
commands:
|
commands:
|
||||||
- pip install python-dateutil
|
- pip install python-dateutil
|
||||||
- python setup.py test
|
- python tests/main.py
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@@ -89,11 +89,11 @@ steps:
|
|||||||
- name: Run unit test
|
- name: Run unit test
|
||||||
image: python:latest
|
image: python:latest
|
||||||
environment:
|
environment:
|
||||||
PYTHONPATH: .
|
PYTHONPATH: src
|
||||||
commands:
|
commands:
|
||||||
- pip install python-dateutil
|
- pip install python-dateutil
|
||||||
- python --version
|
- python --version
|
||||||
- python setup.py test
|
- python tests/main.py
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@@ -108,8 +108,10 @@ platform:
|
|||||||
steps:
|
steps:
|
||||||
- name: Build package files
|
- name: Build package files
|
||||||
commands:
|
commands:
|
||||||
- python3 setup.py sdist bdist_wheel
|
- python3 -m build
|
||||||
|
- name: Run final test after build
|
||||||
|
commands:
|
||||||
|
- tox
|
||||||
- name: Versie toevoegen aan download
|
- name: Versie toevoegen aan download
|
||||||
environment:
|
environment:
|
||||||
DOWNLOADDIR: /usr/share/nginx/html/download/python/lmwsip
|
DOWNLOADDIR: /usr/share/nginx/html/download/python/lmwsip
|
||||||
@@ -121,13 +123,20 @@ steps:
|
|||||||
do
|
do
|
||||||
if [ -f "$${DOWNLOADDIR}/$${f}" ]
|
if [ -f "$${DOWNLOADDIR}/$${f}" ]
|
||||||
then
|
then
|
||||||
echo version error
|
echo Version already availeble
|
||||||
exit 1
|
|
||||||
else
|
else
|
||||||
cp "$${f}" "$${DOWNLOADDIR}";
|
cp "$${f}" "$${DOWNLOADDIR}";
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
- ls -l "$${DOWNLOADDIR}"
|
- ls -l "$${DOWNLOADDIR}"
|
||||||
|
- name: Versie upload naar pypi test
|
||||||
|
environment:
|
||||||
|
TWINE_USERNAME:
|
||||||
|
from_secret: twine_username
|
||||||
|
TWINE_PASSWORD:
|
||||||
|
from_secret: twine_password
|
||||||
|
commands:
|
||||||
|
- python3 -m twine upload dist/*
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
@@ -151,13 +160,13 @@ steps:
|
|||||||
# Make sure we run the pip installed version
|
# Make sure we run the pip installed version
|
||||||
commands:
|
commands:
|
||||||
- rm -rf lmwsip
|
- rm -rf lmwsip
|
||||||
- pip install --extra-index-url https://marceln.org/download/python lmwsip
|
- pip install lmwsip
|
||||||
- python -c "import lmwsip"
|
- python -c "import lmwsip"
|
||||||
- python -c "import lmwsip; print(lmwsip.__version__)"
|
- python -c "import lmwsip; print(lmwsip.__version__)"
|
||||||
- >
|
- >
|
||||||
[ $(python -c "import lmwsip; print(lmwsip.__version__)") =
|
[ $(python -c "import lmwsip; print(lmwsip.__version__)") =
|
||||||
$(python setup.py --version) ]
|
$(python setup.py --version) ]
|
||||||
- python -m unittest -v lmwsip.tests
|
- python tests/main.py
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,3 +7,4 @@ lmwsip_marceln.egg-info
|
|||||||
test/__pycache__
|
test/__pycache__
|
||||||
lmwsip.egg-info
|
lmwsip.egg-info
|
||||||
*.swp
|
*.swp
|
||||||
|
.tox
|
||||||
|
@@ -12,12 +12,10 @@ how to use it.
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
The package is not available on [PyPI](https://pypi.org/).
|
Just install the package with 'pip':
|
||||||
At the moment the package is hosted at https://marceln.org/download/python.
|
|
||||||
|
|
||||||
You can install the package with pip:
|
|
||||||
```
|
```
|
||||||
pip install --extra-index-url https://marceln.org/download/python lmwsip
|
pip install lmwsip
|
||||||
```
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=$(grep version setup.py | sed -e 's/.*="//' -e 's/",//')
|
VERSION=$(grep version setup.cfg | sed 's/.*= *//')
|
||||||
sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" lmwsip/__init__.py
|
sed -i "s/^__version__ = .*/__version__ = '${VERSION}'/" src/lmwsip/__init__.py
|
||||||
git add lmwsip/__init__.py
|
git add src/lmwsip/__init__.py
|
||||||
|
|
||||||
python setup.py test
|
tox
|
||||||
yamllint .drone.yml
|
yamllint .drone.yml
|
||||||
|
6
pyproject.toml
Normal file
6
pyproject.toml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = [
|
||||||
|
"setuptools>=42",
|
||||||
|
"wheel"
|
||||||
|
]
|
||||||
|
build-backend = "setuptools.build_meta"
|
25
setup.cfg
Normal file
25
setup.cfg
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
[metadata]
|
||||||
|
name = lmwsip
|
||||||
|
version = 0.9.6
|
||||||
|
author = Marcel Nijenhof
|
||||||
|
author_email = pypi@marceln.org
|
||||||
|
description = Interface for the lmw sip protocol
|
||||||
|
long_description = file: README.md
|
||||||
|
long_description_content_type = text/markdown
|
||||||
|
url = https://git.marceln.org/Werk/lmwsip
|
||||||
|
classifiers =
|
||||||
|
Programming Language :: Python :: 3
|
||||||
|
License :: OSI Approved :: MIT License
|
||||||
|
Operating System :: OS Independent
|
||||||
|
Development Status :: 4 - Beta
|
||||||
|
|
||||||
|
[options]
|
||||||
|
package_dir =
|
||||||
|
= src
|
||||||
|
install_requires =
|
||||||
|
python-dateutil
|
||||||
|
packages = find:
|
||||||
|
python_requires = >= 3.6
|
||||||
|
|
||||||
|
[options.packages.find]
|
||||||
|
where = src
|
28
setup.py
28
setup.py
@@ -1,26 +1,4 @@
|
|||||||
import setuptools
|
from setuptools import setup
|
||||||
|
|
||||||
with open("README.md", "r") as fh:
|
if __name__ == "__main__":
|
||||||
long_description = fh.read()
|
setup()
|
||||||
|
|
||||||
setuptools.setup(
|
|
||||||
name="lmwsip", # Replace with your own username
|
|
||||||
version="0.9.0",
|
|
||||||
author="Marcel Nijenhof",
|
|
||||||
author_email="pip@marceln.org",
|
|
||||||
description="Interface for the lmw sip protocol",
|
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
url="https://marceln.org/git/Werk/lmwsip",
|
|
||||||
packages=setuptools.find_packages(),
|
|
||||||
install_requires=[
|
|
||||||
'python-dateutil'
|
|
||||||
],
|
|
||||||
classifiers=[
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"License :: OSI Approved :: MIT License",
|
|
||||||
"Operating System :: OS Independent",
|
|
||||||
"Topic :: Lmw sip interface"
|
|
||||||
],
|
|
||||||
python_requires='>=3.6',
|
|
||||||
)
|
|
||||||
|
@@ -12,7 +12,7 @@ from datetime import datetime, timedelta
|
|||||||
from dateutil import tz
|
from dateutil import tz
|
||||||
|
|
||||||
""" Version info changed by git hook """
|
""" Version info changed by git hook """
|
||||||
__version__ = '0.9.0'
|
__version__ = '0.9.6'
|
||||||
|
|
||||||
class LmwSip:
|
class LmwSip:
|
||||||
"""Class to connect to the LMW Standard Interface prototcol (sip)
|
"""Class to connect to the LMW Standard Interface prototcol (sip)
|
||||||
@@ -489,7 +489,12 @@ Support for:
|
|||||||
'xH60': ('WN', 1, 60),
|
'xH60': ('WN', 1, 60),
|
||||||
'xNI60': ('WN', 1, 60),
|
'xNI60': ('WN', 1, 60),
|
||||||
'xQ60': ('WN', 1, 60),
|
'xQ60': ('WN', 1, 60),
|
||||||
'xH60R': ('WN', 1, 60)
|
'xH60R': ('WN', 1, 60),
|
||||||
|
'QfQStt10': ('WN', 1, 10),
|
||||||
|
'QfQTr10': ('WN', 1, 10),
|
||||||
|
'QfQSt10': ('WN', 1, 10),
|
||||||
|
'QfHYS10': ('WN', 1, 10),
|
||||||
|
'QfQSy10': ('WN', 1, 10)
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, user=None, password=None,
|
def __init__(self, user=None, password=None,
|
||||||
@@ -668,9 +673,9 @@ recieve a answer from the sip server
|
|||||||
if (len(bytebuf) == 0):
|
if (len(bytebuf) == 0):
|
||||||
c+=1
|
c+=1
|
||||||
self.log.debug("recv: bytebuf: %s" % bytebuf)
|
self.log.debug("recv: bytebuf: %s" % bytebuf)
|
||||||
if self.cleartelnet:
|
if self.cleartelnet:
|
||||||
if bytebuf[0] == 255:
|
if bytebuf[0] == 255:
|
||||||
bytebuf = b''
|
bytebuf = b''
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.error("SipLmw.recv: socket timeout: %s", e)
|
self.log.error("SipLmw.recv: socket timeout: %s", e)
|
||||||
self.closesocket()
|
self.closesocket()
|
@@ -4,10 +4,10 @@ import sys
|
|||||||
import io
|
import io
|
||||||
import unittest
|
import unittest
|
||||||
import lmwsip
|
import lmwsip
|
||||||
import lmwsip.tests.stubSipServer
|
import stubSipServer
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from lmwsip.tests.stubSipServer import sipServer
|
from stubSipServer import sipServer
|
||||||
from lmwsip.run import run
|
from lmwsip.run import run
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from dateutil import tz
|
from dateutil import tz
|
Reference in New Issue
Block a user