Skip to content

Commit 238a965

Browse files
committed
Add CLI build file using cx_Freeze, small fix to let us build binaries, and pip requirements file
1 parent a578159 commit 238a965

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

build_cli.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env python
2+
# coding: utf-8
3+
4+
import os
5+
import sys
6+
from cx_Freeze import setup, Executable
7+
8+
options = {
9+
'build_exe': {
10+
'packages': [
11+
'atexit',
12+
],
13+
'excludes': [
14+
# 'tkinter',
15+
],
16+
},
17+
'bdist_mac': {
18+
'bundle_name': 'BASC-Archiver',
19+
'iconfile': 'build-files/icon.icns',
20+
'custom_info_plist': 'build-files/Info.plist',
21+
},
22+
'bdist_dmg': {
23+
'volume_label': 'BASC-Archiver',
24+
},
25+
}
26+
27+
setup(
28+
name='BASC-Archiver',
29+
version='0.8.2',
30+
description='Makes a complete archive of imageboard threads including images, HTML, and JSON.',
31+
options=options,
32+
executables=[Executable('thread-archiver')],
33+
)

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cx-freeze
2+
docopt
3+
requests
4+
basc_py4chan

thread-archiver

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Options:
3232

3333
from docopt import docopt
3434
import time
35+
import sys
3536

3637
from basc_archiver import _version, Options, Archiver
3738

@@ -50,7 +51,7 @@ if __name__ == '__main__':
5051
if archiver.existing_threads < 1:
5152
print('')
5253
print('We could not find any of the supplied threads, exiting.')
53-
exit(0)
54+
sys.exit(0)
5455

5556
# download thread loop
5657
try:

0 commit comments

Comments
 (0)