Omgezet naar python module

This commit is contained in:
Marcel Nijenhof
2021-05-30 09:29:07 +02:00
parent 79579a20d7
commit 53a331eb81
6 changed files with 58 additions and 6 deletions

27
.drone.yml Normal file
View File

@@ -0,0 +1,27 @@
---
kind: pipeline
type: exec
name: default
platform:
os: linux
arch: amd64
steps:
- name: Run unit test
environment:
PYTHONPATH: .
commands:
- python setup.py test
- name: Build package files
commands:
- python setup.py sdist
- name: Versie toevoegen aan download
environment:
DOWNLOADDIR: /usr/share/nginx/html/download/python/dd-api-oper
commands:
- mkdir -p "$${DOWNLOADDIR}"
- cd dist
- for f in *;do if [ -f "$${DOWNLOADDIR}/$${f}" ] ; then echo version error;exit 1;else cp "$${f}" "$${DOWNLOADDIR}";fi;done
- ls -l "$${DOWNLOADDIR}"
when:
branch:
- master

10
.gitignore vendored
View File

@@ -1,6 +1,4 @@
nijenhofm.crt *.swp
nijenhofm.key dd-oper-api/__pycache__
test-ddapi-nijenhofm dd_oper_api.egg-info
dist
__pycache__:
ddapioper.cpython-37.pyc

1
LICENSE Normal file
View File

@@ -0,0 +1 @@
TODO

26
setup.py Normal file
View File

@@ -0,0 +1,26 @@
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="dd-oper-api", # Replace with your own username
version="0.0.1",
author="Marcel Nijenhof",
author_email="pip@pion.xs4all.nl",
description="Interface for dd-oper 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 :: TODO",
"Operating System :: OS Independent",
"Topic :: dd-oper api"
],
python_requires='>=3.6',
)