-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some files needed to build the windows executable
- Loading branch information
1 parent
1ce6950
commit 0f33eab
Showing
5 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env python | ||
|
||
from distutils.core import setup | ||
import py2exe | ||
import os | ||
import glob | ||
|
||
def find_data_files(source,target,patterns): | ||
"""Locates the specified data-files and returns the matches | ||
in a data_files compatible format. | ||
source is the root of the source data tree. | ||
Use '' or '.' for current directory. | ||
target is the root of the target data tree. | ||
Use '' or '.' for the distribution directory. | ||
patterns is a sequence of glob-patterns for the | ||
files you want to copy. | ||
""" | ||
if glob.has_magic(source) or glob.has_magic(target): | ||
raise ValueError("Magic not allowed in src, target") | ||
ret = {} | ||
for pattern in patterns: | ||
pattern = os.path.join(source,pattern) | ||
for filename in glob.glob(pattern): | ||
if os.path.isfile(filename): | ||
targetpath = os.path.join(target,os.path.relpath(filename,source)) | ||
path = os.path.dirname(targetpath) | ||
ret.setdefault(path,[]).append(filename) | ||
return sorted(ret.items()) | ||
|
||
setup(name="Spreader", | ||
version="1.4.0", | ||
author="Thomas Liu", | ||
author_email="[email protected]", | ||
url="https://tfliu.com", | ||
license="GNU General Public License (GPL)", | ||
scripts=["cards_server.py","cards_gui_client.py","cards_client.py"], | ||
console=["cards_server.py","cards_client.py"], | ||
windows=[{"script": "cards_gui_client.py", "icon_resources": [(1, "spreader.ico")]}], | ||
data_files=find_data_files('.','',[ | ||
'img/*','LICENSE.','README.md','settings.ini', 'CHANGELOG', 'test-adjs.txt','test-nouns.txt' | ||
]), | ||
options={"py2exe": {"includes": ["sip"]}}) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.