Skip to content

Instantly share code, notes, and snippets.

@untergeek
Last active October 30, 2017 10:23
Show Gist options
  • Save untergeek/48501aa38087d5823a98 to your computer and use it in GitHub Desktop.
Save untergeek/48501aa38087d5823a98 to your computer and use it in GitHub Desktop.
Build a Windows binary for Curator with Nuitka

Curator Binary Creation (Windows Edition)

Prerequisites

Please install in this order.

Install Python

  • Download 2.7.9 (64-bit)
  • Install with these options:
    • Install for all users
    • Customize Python 2.7.9:
      • Select Add python.exe to Path

Install Visual Studio 2013 Express

Install Nuitka

Install Python Dependencies

Open a CMD window and run:

C:\Users\user>pip install elasticsearch click

The resulting output should look like this:

Downloading/unpacking elasticsearch
Downloading/unpacking urllib3>=1.0,<2.0 (from elasticsearch)
Downloading/unpacking click
Installing collected packages: elasticsearch, urllib3, click
Successfully installed elasticsearch urllib3 click
Cleaning up...

Build a binary

These steps will create a "distribution" folder called curator-3.0.3.dist with the Curator binary, and all necessary libraries and dependencies inside. Note: The curator.exe binary must remain within the folder with the libraries and dependencies in order to execute.

Get latest release package of Curator

Build the binary

Open a CMD window and run:

  1. cd curator-3.0.3 (or whatever path you put it in).
nuitka --standalone --recurse-all run_curator.py
  1. When prompted:
Nuitka will make use of Dependency Walker (http://dependencywalker.com) tool to analyze the dependencies of Python extension modules. Is it OK to download and put it in APPData (no installer needed, cached, one time question).
Proceed and download? [Yes]/No

Type Yes and press enter to continue.

  1. ren run_curator.dist curator-3.0.3.dist
  2. cd curator-3.0.3.dist
  3. ren run_curator.exe curator.exe

Optional: Zip the package (curator-3.0.3.dist)

This step is optional. You can now zip and copy the file to any Windows machine that will run 64-bit binaries. It should not have any dependencies on any other software.

@wolfamongus2
Copy link

ERROR. ERROR. RIP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment