Skip to content

Commit

Permalink
Included setup.py for freezing, changed if/if not to if/else blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
NullSense committed Dec 7, 2015
1 parent 86104c5 commit 6e9bef7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 77 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Run.lnk
*.pyc
*.gif

setup.py
cacert.pem
build
praw.ini
4 changes: 2 additions & 2 deletions WallDit.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ def is_ok_submission_url(window, submission, link_search_limit):
if any(term in url for term in dont_include) or url.endswith(tuple(suffixes)) or not url:
counter = counter +1
return False
if submission.over_18 and window.handle_nsfw_checkbox() == False:
elif submission.over_18 and window.handle_nsfw_checkbox() == False:
counter = counter +1
return False
if counter == link_search_limit:
elif counter == link_search_limit:
window.handle_status_label("Error: Submission are all invalid, up the counter or try again")
else:
print("Submission: no errors.\n\n")
Expand Down
72 changes: 0 additions & 72 deletions WallDit_QT.py

This file was deleted.

4 changes: 2 additions & 2 deletions WallDit_QT.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
if self.nsfw_checkbox.isChecked():
print("NSFW: checked")
return True
if not self.nsfw_checkbox.isChecked():
else:
print("NSFW: unchecked")
return False

Expand All @@ -42,7 +42,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
def handle_boot_checkbox(self): # when executable is released, gonna implement
if self.boot_checkbox.isChecked():
print("boot: checked")
if not self.boot_checkbox.isChecked():
else:
print("boot: unchecked")

def handle_subreddit_line(self):
Expand Down
30 changes: 30 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import sys
import cx_Freeze
import PySide
import praw
import requests.certs
import requests
from cx_Freeze import setup, Executable

exe = Executable(
script="WallDit_QT.pyw",
base="Win32GUI",
targetName="WallDit_QT.exe"
)

setup(name = 'WallDit_QT',
version = '1.0',
author = 'Disco Dolan',
description ='Set your wallpaper interactively!',
executables = [exe],
options = {
'build_exe': {
"include_files": [
(requests.certs.where(),'cacert.pem'),
'praw.ini',
'README.md'
]
}
},
requires = ['PySide', 'cx_Freeze', 'praw', 'shutil', 'requests']
)

0 comments on commit 6e9bef7

Please sign in to comment.