From 8bab858be6699bf393694dfe05c2c49f01e5c27a Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Sat, 13 Jan 2018 20:18:50 -0500 Subject: pyinstaller release method (#16) pyinstaller packages up all of a python script's dependencies and builds them into standalone executables. It can either do a directory (containing a single executable and a bunch of shared libraries) or a self-contained executable that effectively just contains a compressed version of the directory. The problem is, if you have several scripts like we do, you get several large directories or standalone binaries, and there's a ton of duplication between them. Fortunately it looks like using the directory method and just combining the directories works fine (for this project). This PR runs the above build on any tagged commit and publishes a release in github containing the pyinstall-ified tarball. If the tag is named like "v1.2.3" _and_ the tag is on the master branch, then the github release will be marked as "production". Otherwise, it will be marked as a "pre-release". This means that we can build testable tarballs of the extension in a pull request by tagging a commit. --- reorder.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 reorder.py (limited to 'reorder.py') diff --git a/reorder.py b/reorder.py deleted file mode 100644 index a30a0a47..00000000 --- a/reorder.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/python -# -# Remove selected objects from the document and readd them in the order they -# were selected. - -import sys -sys.path.append("/usr/share/inkscape/extensions") -import os -import inkex - - -class Reorder(inkex.Effect): - - def get_selected_in_order(self): - selected = [] - - for i in self.options.ids: - path = '//*[@id="%s"]' % i - for node in self.document.xpath(path, namespaces=inkex.NSS): - selected.append(node) - - return selected - - def effect(self): - objects = self.get_selected_in_order() - - for obj in objects[1:]: - obj.getparent().remove(obj) - - insert_parent = objects[0].getparent() - insert_pos = insert_parent.index(objects[0]) - - insert_parent.remove(objects[0]) - - insert_parent[insert_pos:insert_pos] = objects - -if __name__ == '__main__': - e = Reorder() - e.affect() -- cgit v1.2.3