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

Add example configuration and script to build a windows installer #569

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
26 changes: 26 additions & 0 deletions installer.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[Application]
name=twarc
version=2.8.0
entry_point=twarc.command2:twarc2

[Python]
version=3.9.7
bitness=64
format=bundled

[Include]
# Requires downloading and/or creating necessary windows wheels locally
# See windows_installer.sh
local_wheels = wheels/*.whl

packages=twarc

# Other files and folders that should be installed
files = LICENSE
README.md

[Command twarc2]
entry_point=twarc.command2:twarc2

[Command twarc]
entry_point=twarc.command:main
27 changes: 27 additions & 0 deletions windows_installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This constructs a windows installer for this version of twarc, using pynsist
# It assumes that nsis is present on the system, and that a Python interpreter
# and Pip are present

sudo apt install nsis

pip install pynsist

# First we're going to setup dependencies by downloading wheels
# There's also a way to specify this in the nsis script, but this is more
# explicit, and necessary for the one dependency that doesn't have a wheel
# anyway.

mkdir wheels

# configobj doesn't have a wheel available, so we'll make a local one.
pip wheel configobj --no-deps -w wheels

# get wheels for everything else, ignoring the one wheel already present
pip download -r requirements.txt -d wheels --platform win_amd64 --platform any --only-binary=:all: -f wheels/

pynsist installer.cfg