diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 diff --git a/build_package.sh b/build_package.sh new file mode 100755 index 0000000..6023b6c --- /dev/null +++ b/build_package.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Abort on errors, as well as unset variables. Makes the script less error prone. +set -o errexit + +rm -rf dist || true +rm -rf build_env | true + +#------------------------------------------------------ +# Set up Python + +virtualenv build_env +source build_env/bin/activate + +pip3 install -r requirements.txt +pip3 install -r requirements-testing.txt + +#------------------------------------------------------ +# Python Package build + +python3 setup.py bdist_wheel + +#------------------------------------------------------ +# Debian package build + +BUILD_DIR=_build_armhf +VERSION=9999.99.99 + +rm -rf $BUILD_DIR || true +mkdir -p $BUILD_DIR + +cd $BUILD_DIR +cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCPACK_PACKAGE_VERSION=${VERSION} -DEMBEDDED=ON +make package +cd .. + +rm -rf build_env + +echo "" +echo "Your fresh packages:" +echo "" +ls -alp dist/*.whl +ls -alp $BUILD_DIR/*.deb diff --git a/requirements-testing.txt b/requirements-testing.txt old mode 100644 new mode 100755 index fea764c..08e0a27 --- a/requirements-testing.txt +++ b/requirements-testing.txt @@ -1,2 +1,4 @@ -pytest -coverage \ No newline at end of file +pytest==4.1.1 +coverage==4.5.2 +setuptools==40.6.3 +setuptools-scm==3.2.0 diff --git a/requirements.txt b/requirements.txt old mode 100644 new mode 100755 index c997f36..971a88b --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ -typing +typing==3.6.6 +dbus-python + diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 843b34d..6a55d48 --- a/setup.py +++ b/setup.py @@ -1,14 +1,15 @@ -# Copyright (c) 2018 Ultimaker B.V. +# Copyright (c) 2019 Ultimaker B.V. # libCharon is released under the terms of the LGPLv3 or higher. -from distutils.core import setup +import setuptools -setup( - name = "Charon", - version = "1.0", +setuptools.setup( + name = "libCharon", + use_scm_version=True, description = "Library to read and write file packages.", author = "Ultimaker", author_email = "r.dulek@ultimaker.com", url = "https://github.com/Ultimaker/libCharon", - packages = ["Charon", "Charon.Client", "Charon.Service", "Charon.filetypes"] + packages = ["Charon", "Charon.Client", "Charon.Service", "Charon.filetypes"], + setup_requires=['setuptools_scm'] )