diff --git a/build-dist b/build-dist index f547ced..28855ec 100755 --- a/build-dist +++ b/build-dist @@ -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 @@ -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 ./ diff --git a/readme.md b/readme.md index 6d3b2db..7b8aec1 100644 --- a/readme.md +++ b/readme.md @@ -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") @@ -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 @@ -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 diff --git a/src/app.py b/src/app.py index dc1701a..aa9a27c 100755 --- a/src/app.py +++ b/src/app.py @@ -12,7 +12,7 @@ # App versions, "major.minor", major => new stuff, minor => fixes -__version__ = '0.5' +__version__ = '0.6' class LoadingBody(Gtk.Grid):