Some file cleanup

This commit is contained in:
blitzmann
2017-11-26 18:36:06 -05:00
parent 1daef5354d
commit 2365112292
11 changed files with 8 additions and 248 deletions

1
.version Normal file
View File

@@ -0,0 +1 @@
v1.33.2-100-gc000b19

View File

@@ -8,7 +8,7 @@ import requests.certs
label = subprocess.check_output([
"git", "describe", "--tags"]).strip()
with open('gitversion', 'w+') as f:
with open('.version', 'w+') as f:
f.write(label.decode())
block_cipher = None

View File

@@ -8,7 +8,7 @@ import requests.certs
label = subprocess.check_output([
"git", "describe", "--tags"]).strip()
with open('gitversion', 'w+') as f:
with open('.version', 'w+') as f:
f.write(label.decode())
block_cipher = None

View File

@@ -1,6 +1,7 @@
logbook >= 0.10.0
matplotlib
wxPython >= 4.0.0b2
logbook >= 1.0.0
matplotlib >= 2.0.0
python-dateutil
urllib3
requests==2.11.1
sqlalchemy==1.0.5
requests == 2.0.0
sqlalchemy == 1.0.5

View File

@@ -1,8 +0,0 @@
PyInstaller >= 3.2.1
cycler >= 0.10.0
functools32 >= 3.2.3
future >= 0.16.0
numpy >= 1.12
pyparsing >= 2.1.10
pytz >= 2016.10
six

View File

@@ -1,9 +0,0 @@
PyInstaller >= 3.2.1
cycler >= 0.10.0
functools32 >= 3.2.3
future >= 0.16.0
numpy >= 1.12
pyparsing >= 2.1.10
pypiwin32 >= 219
pytz >= 2016.10
six >= 1.10.0

View File

@@ -1,11 +0,0 @@
PyInstaller >= 3.2.1
cx_freeze == 4.3.4
cycler >= 0.10.0
functools32 >= 3.2.3
future >= 0.16.0
numpy >= 1.12
pyparsing >= 2.1.10
pypiwin32 >= 219
pytz >= 2016.10
six >= 1.10.0
tornado

View File

@@ -1,10 +0,0 @@
pytest == 3.0.3
pytest-mock == 1.2
pytest-cov == 2.3.1
pytest-capturelog == 0.7
coverage == 4.2
coveralls == 1.1
codecov
virtualenv>=15.0.0
tox
wheel

View File

@@ -1,22 +0,0 @@
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
import requests.certs
APP = ['pyfa.py']
DATA_FILES = ['eve.db', 'README.md', 'LICENSE', 'imgs', requests.certs.where()]
OPTIONS = {
'argv_emulation': False,
'iconfile': 'dist_assets/mac/pyfa.icns',
'packages': ['eos', 'gui', 'service', 'utils', 'sqlalchemy']
}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)

103
setup.py
View File

@@ -1,103 +0,0 @@
"""
Distribution builder for pyfa.
Windows executable: python setup.py build
Windows executable + installer: python setup.py bdist_msi
"""
import requests.certs
# The modules that contain the bulk of teh source
packages = ['eos', 'gui', 'service', 'utils']
# Extra files that will be copied into the root directory
include_files = ['eve.db', 'LICENSE', 'README.md', (requests.certs.where(), 'cacert.pem')]
# this is read by dist.py to package the icons
icon_dirs = ['gui', 'icons', 'renders']
includes = []
# collection.abc due to bug:
# https://bitbucket.org/anthony_tuininga/cx_freeze/issues/127/collectionssys-error
# All the other stuff is crap that I have. VENV isn't working right for me for a few dependancies, so bleh
excludes = ['Tkinter', 'collections.abc', 'IPython', 'PyQt4', 'PIL', 'nose', 'tornado', 'zmq', 'mysql', 'scipy']
if __name__ == "__main__":
import sys
# noinspection PyPackageRequirements,PyUnresolvedReferences
from cx_Freeze import setup, Executable
import config
import tempfile
import os
import zipfile
import shutil
tmpdir = tempfile.mkdtemp()
imagesFile = os.path.join(tmpdir, "imgs.zip")
def zipdir(path, zip):
for root, dirs, files in os.walk(path):
for file in files:
zip.write(os.path.join(root, file))
os.chdir('imgs')
with zipfile.ZipFile(imagesFile, 'w') as images:
for dir in icon_dirs:
zipdir(dir, images)
os.chdir('..')
app_name = 'pyfa'
app_version = '{}'.format(config.version)
app_description = 'Python fitting assistant'
# Windows-specific options
build_options_winexe = {
'packages': packages,
'include_files': include_files+[imagesFile],
'includes': includes,
'excludes': excludes,
'compressed': True,
'optimize': 2,
'include_msvcr': True,
}
build_options_winmsi = {
'upgrade_code': '{E80885AC-31BA-4D9A-A04F-9E5915608A6C}',
'add_to_path': False,
'initial_target_dir': r'[ProgramFilesFolder]\{}'.format(app_name),
}
# Mac-specific options (untested)
build_options_macapp = {
'iconfile': 'dist_assets/mac/pyfa.icns',
'bundle_name': app_name,
}
build_options_macdmg = {
'volume_label': app_name,
'applications-shortcut': True,
}
# Generic executable options
executable_options = {
'script': 'pyfa.py',
# Following are windows-specific options, they are stored
# on a per-executable basis
'base': 'Win32GUI' if sys.platform == 'win32' else None,
'icon': 'dist_assets/win/pyfa.ico',
'shortcutDir': 'DesktopFolder',
'shortcutName': app_name,
}
setup(
name=app_name,
version=app_version,
description=app_description,
options={
'build_exe': build_options_winexe,
'bdist_msi': build_options_winmsi,
'bdist_mac': build_options_macapp,
'bdist_dmg': build_options_macdmg,
},
executables=[Executable(**executable_options)]
)
shutil.rmtree(tmpdir)

View File

@@ -1,79 +0,0 @@
fits = ["306", "317", "318", "320", "321", "322", "323", "330", "334", "337", "338", "342", "348", "349", "350",
"374", "377", "379", "382",
"387", "389", "390", "393", "394", "395", "397", "399", "420", "423", "424", "427", "431", "432", "436",
"437", "438", "439", "440", "444",
"446", "450", "453", "457", "458", "459", "461", "464", "471", "472", "473", "474", "478", "483", "484",
"485", "486", "487", "494", "495",
"496", "501", "504", "505", "508", "509", "513", "515", "517", "518", "519", "522", "523", "526", "527",
"528", "529", "530", "531", "532",
"534", "535", "536", "537", "539", "540", "541", "542", "543", "546", "547", "548", "550", "551", "554",
"555", "556", "558", "559", "560",
"563", "565", "566", "568", "569", "570", "571", "572", "574", "576", "578", "581", "582", "583", "585",
"586", "587", "589", "593", "594",
"598", "602", "603", "606", "610", "611", "612", "613", "614", "618", "620", "621", "624", "626", "627",
"628", "629", "630", "631", "632",
"633", "634", "635", "637", "638", "640", "644", "645", "648", "649", "654", "655", "656", "657", "665",
"666", "667", "668", "669", "671",
"674", "677", "678", "685", "686", "690", "691", "692", "693", "694", "695", "696", "698", "699", "702",
"704", "712", "713", "714", "716",
"718", "722", "723", "726", "727", "728", "730", "731", "733", "735", "736", "737", "738", "741", "745",
"746", "749", "750", "751", "756",
"757", "758", "759", "766", "769", "778", "779", "780", "782", "783", "786", "788", "789", "791", "794",
"796", "798", "801", "808", "817",
"818", "819", "822", "823", "827", "831", "837", "838", "839", "846", "847", "856", "857", "866", "867",
"868", "869", "871", "877", "880",
"881", "885", "886", "889", "892", "893", "894", "895", "897", "905", "906", "908", "910", "911", "912",
"915", "916", "917", "922", "924",
"926", "931", "932", "933", "934", "936", "939", "942", "947", "949", "951", "952", "955", "957", "958",
"959", "961", "962", "968", "969",
"971", "974", "975", "977", "978", "979", "980", "982", "984", "985", "987", "988", "989", "990", "991",
"992", "997", "999", "1004", "1005",
"1008", "1009", "1015", "1016", "1025", "1026", "1027", "1036", "1037", "1043", "1044", "1045", "1046",
"1047", "1048", "1049", "1051",
"1060", "1061", "1062", "1063", "1065", "1066", "1067", "1069", "1073", "1074", "1075", "1076", "1078",
"1083", "1084", "1085", "1086",
"1088", "1089", "1090", "1091", "1092", "1094", "1096", "1099", "1100", "1101", "1102", "1104", "1105",
"1112", "1114", "1115", "1117",
"1119", "1121", "1122", "1124", "1128", "1132", "1134", "1139", "1140", "1142", "1143", "1144", "1145",
"1146", "1150", "1151", "1152",
"1155", "1156", "1157", "1161", "1163", "1164", "1166", "1167", "1170", "1172", "1173", "1174", "1176",
"1180", "1181", "1184", "1185",
"1187", "1194", "1196", "1199", "1200", "1201", "1202", "1203", "1206", "1207", "1214", "1216", "1218",
"1220", "1225", "1228", "1230",
"1235", "1236", "1237", "1239", "1243", "1244", "1245", "1249", "1250", "1251", "1252", "1255", "1261",
"1262", "1264", "1265", "1266",
"1267", "1269", "1270", "1272", "1273", "1275", "1276", "1281", "1284", "1285", "1286", "1291", "1292",
"1293", "1297", "1299", "1300",
"1301", "1302", "1304", "1305", "1306", "1310", "1311", "1312", "1315", "1322", "1331", "1332", "1338",
"1341", "1345", "1346", "1358",
"1359", "1360", "1362", "1364", "1370", "1373", "1374", "1387", "1391", "1393", "1394", "1395", "1400",
"1403", "1404", "1406", "1408",
"1411", "1412", "1413", "1414", "1415", "1419", "1420", "1421", "1422", "1423", "1424", "1426", "1427",
"1428", "1429", "1430", "1440",
"1441", "1443", "1445", "1447", "1450", "1451", "1454", "1455", "1456", "1457", "1458", "1459", "1462",
"1463", "1465", "1466", "1468",
"1469", "1471", "1476", "1479", "1481", "1482", "1483", "1484", "1485", "1486", "1487", "1489", "1490",
"1491", "1493", "1495", "1499",
"1503", "1505", "1506", "1508", "1511", "1517", "1528", "1529", "1532", "1534", "1535", "1537", "1542",
"1543", "1544", "1546", "1547",
"1548", "1549", "1550", ]
import time
for fitID in fits[:100]:
time.sleep(.200)
print(fitID)
wx.PostEvent(self, FitSelected(fitID=int(fitID), startup=2))
from service.fit import Fit
sFit = Fit.getInstance()
for x in fits:
try:
print(x)
fit = sFit.getFit(int(x))
fit.clear()
fit.calculateModifiedAttributes()
except Exception as e:
print(("failed on ",x))
print(e)
raise e