Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging #20

Open
wants to merge 6 commits into
base: master/s-line
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified Dockerfile
100644 → 100755
Empty file.
43 changes: 43 additions & 0 deletions build_package.sh
Original file line number Diff line number Diff line change
@@ -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
6 changes: 4 additions & 2 deletions requirements-testing.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pytest
coverage
pytest==4.1.1
coverage==4.5.2
setuptools==40.6.3
setuptools-scm==3.2.0
4 changes: 3 additions & 1 deletion requirements.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
typing
typing==3.6.6
dbus-python

13 changes: 7 additions & 6 deletions setup.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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 = "[email protected]",
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']
)