Skip to content

Commit

Permalink
Add --no-python-deps options to build
Browse files Browse the repository at this point in the history
Former-commit-id: fb93f22c329dd9b236a0eb9be766e9b506b89a66
  • Loading branch information
alexheretic committed May 7, 2017
1 parent 7407618 commit 5a8d832
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 25 deletions.
43 changes: 26 additions & 17 deletions build-dist
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#!/usr/bin/env bash

## requires python-pip & python-wheel
## requires python-pip & python-wheel unless --no-python-deps
set -eu
APART_CORE_VERSION="0.1.0"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

pack_dependencies=true
for arg in "$@"; do
if [ "$arg" == '--no-python-deps' ]; then
pack_dependencies=false
echo 'Skipping python dependency inclusion'
fi
done

cd $DIR
rm -rf target
mkdir -p $DIR/target/lib/apart-gtk/src
Expand All @@ -22,26 +30,27 @@ cp apart-core-$APART_CORE_VERSION/target/release/apart-core lib/apart-gtk/
rm core.tar.gz
rm -rf apart-core-$APART_CORE_VERSION

if $pack_dependencies ; then
echo 'Pack dependiencies'
cd $DIR/target/lib/apart-gtk/src
pip wheel -r $DIR/dev-requirements.txt
wheel unpack humanize-*.whl
mv humanize-*/humanize ./
rm -rf humanize-*

echo 'Pack dependiencies'
cd $DIR/target/lib/apart-gtk/src
pip wheel -r $DIR/dev-requirements.txt
wheel unpack humanize-*.whl
mv humanize-*/humanize ./
rm -rf humanize-*

pip wheel pyzmq
wheel unpack pyzmq-*.whl
mv pyzmq-*/zmq ./
rm -rf pyzmq-*

pip wheel PyYAML
wheel unpack PyYAML-*.whl
mv PyYAML-*/yaml ./
rm -rf PyYAML-*
pip wheel pyzmq
wheel unpack pyzmq-*.whl
mv pyzmq-*/zmq ./
rm -rf pyzmq-*

pip wheel PyYAML
wheel unpack PyYAML-*.whl
mv PyYAML-*/yaml ./
rm -rf PyYAML-*
fi

echo 'Copy & compile sources'
cd $DIR/target/lib/apart-gtk/src
cp -r $DIR/src/* ./
python -m compileall ./

Expand Down
13 changes: 6 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Apart GTK
=========
Linux GUI for cloning disk partitions to images using the GTK toolkit.
Linux GUI for cloning & restoring disk partitions to & from compressed image files.

![Usage](apart-gtk-usage.gif?raw=true "Usage")

Expand All @@ -15,17 +15,17 @@ Available on the [Arch Linux AUR](https://aur.archlinux.org/packages/apart-gtk),
* pigz

## Dev Dependencies
See dev-requirements.txt for python requirements, these can be installed with `pip install -r dev-requirements.txt`.
See dev-requirements.txt for python requirements, these can be installed with `pip install -r dev-requirements.txt` or similar.

The apart-core project is written in Rust, so will require rustup and uses cargo to build.

## Run in test mode
With the dev dependencies installed run `./start-test-app` to run from src/ a version of the code with
partclone & partition info mocked. This is useful for GUI development, as you can clone and restore without actual
With the dev dependencies installed run `./start-test-app` to run from src/ a version of the code with
partclone & partition info mocked. This is useful for GUI development, as you can clone and restore without actual
data risk

## Build
Run `./build-dist` to build the distribution files to ./target
Run `./build-dist` to build the distribution files to ./target. Optionally `./build-dist --no-python-deps` can be called to skip the python dependency bundling.

## Manual Install
An install looks like the following,after running `./build-dist` copy from ./target to /usr
Expand All @@ -37,8 +37,7 @@ An install looks like the following,after running `./build-dist` copy from ./tar
│ ├─ apart-core
│ └─ src
│ ├─ app.py
│ ...
│ └─ python files & dependencies
│ └─ ... python files
└─ share
├─ applications/apart-gtk.desktop
├─ icons/hicolor/scalable/apps/apart.svg
Expand Down
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


# App versions, "major.minor", major => new stuff, minor => fixes
__version__ = '0.5'
__version__ = '0.6'


class LoadingBody(Gtk.Grid):
Expand Down

0 comments on commit 5a8d832

Please sign in to comment.