Skip to content

Commit

Permalink
Add new requiremnts.txt for smooth packaging on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
GraphicalDot committed Aug 22, 2019
1 parent b2eb568 commit fe1a168
Show file tree
Hide file tree
Showing 71 changed files with 183 additions and 294 deletions.
41 changes: 41 additions & 0 deletions Application/Backup.Datapod.mac.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

import distutils
if distutils.distutils_path.endswith('__init__.py'):
distutils.distutils_path = os.path.dirname(distutils.distutils_path)


a = Analysis(['application.py'],
pathex=['/Users/kaali/Programs/datapod-backend-layer/Application'],
binaries=[],
datas=[],
hiddenimports=['_striptime'],
hookspath=['pyinstaller_hooks'],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='Datapod',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False )
app = BUNDLE(exe,
name='Datapod.app',
icon=None,
bundle_identifier=None)
39 changes: 39 additions & 0 deletions Application/Datapod_OSX.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

import distutils
if distutils.distutils_path.endswith('__init__.py'):
distutils.distutils_path = os.path.dirname(distutils.distutils_path)
a = Analysis(['application.py'],
pathex=['/Users/kaali/Programs/datapod-backend-layer/Application'],
binaries=[],
datas=[],
hiddenimports=['engineio.async_eventlet', '_striptime', 'engineio.async_gevent'],
hookspath=['pyinstaller_hooks'],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='Datapod_OSX',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False , icon='datapod.ico')
app = BUNDLE(exe,
name='Datapod_OSX.app',
icon='datapod.ico',
bundle_identifier=None)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
39 changes: 39 additions & 0 deletions Application/Executables/Datapodmac.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None
import distutils
if distutils.distutils_path.endswith('__init__.py'):
distutils.distutils_path = os.path.dirname(distutils.distutils_path)

a = Analysis(['../application.py'],
pathex=['/Users/kaali/Programs/datapod-backend-layer/Application/Executables'],
binaries=[],
datas=[],
hiddenimports=['_striptime'],
hookspath=['../pyinstaller_hooks'],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='Datapodmac',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False , icon='datapod.ico')
app = BUNDLE(exe,
name='Datapodmac.app',
icon='datapod.ico',
bundle_identifier=None)
42 changes: 42 additions & 0 deletions Application/Executables/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

import os
import platform
import subprocess
from loguru import logger
import shutil
def os_command_output(command:str, final_message:str) -> str:

process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
while True:
line = process.stdout.readline()
if not line:
logger.success(final_message)
break
yield line.decode().split("\r")[0]



def build_app():

if platform.system() == "Linux":
logger.info("Removing build directory")
shutil.rmtree("build")
backup_command = f"pyi-makespec --hidden-import _strptime --additional-hooks-dir pyinstaller_hooks --onefile --console --name Datapod --icon datapod.ico application.py"

for out in os_command_output(backup_command, "Making Spec file completed"):
logger.info(out)
#backup_command = f"tar --create --lzma --no-check-device --verbose --listed-incremental={self.user_index} -f {temp.name} {self.raw_data_path}"
command = "pyinstaller Datapod.spec"
for out in os_command_output(command, "Build Complete"):
logger.info(out)

elif platform.system() == "Darwin":
pass
#backup_command = f"gtar --create --lzma --no-check-device --verbose --listed-incremental={self.user_index} -f {temp.name} {self.raw_data_path}"
else:
raise Exception("The platform is not available for this os distribution")


if __name__ == "__main__":
build_app()

Binary file modified Application/__pycache__/application.cpython-37.pyc
Binary file not shown.
Binary file modified Application/__pycache__/config.cpython-37.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions Application/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from sanic_cors import CORS
from zmq.asyncio import ZMQEventLoop

import pprint


from spf import SanicPluginsFramework
Expand Down Expand Up @@ -177,11 +178,10 @@ def main():
# app.config.archive_path = config.archive_path
app.config.from_object(config.config_object)
#app.config["SIO"] = sio
import pprint
pprint.pprint(app.config)
#app.error_handler.add(Exception, server_error_handler)

app.run(host="localhost", port=app.config.PORT, workers=1)
app.run(host="0.0.0.0", port=app.config.PORT, workers=1)

"""
server = app.create_server(
Expand Down
Binary file modified Application/backup/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file modified Application/backup/__pycache__/back.cpython-37.pyc
Binary file not shown.
Binary file modified Application/backup/__pycache__/backup_api.cpython-37.pyc
Binary file not shown.
Binary file modified Application/data_sources/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file modified Application/data_sources/__pycache__/api.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Application/data_sources/takeout/__pycache__/api.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion Application/data_sources/takeout/parse_emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import asyncio
import functools
import aiohttp
from sockets.sockets import broadcast
import concurrent.futures
from tenacity import *
from database_calls.db_emails import store_email, store_email_attachment, store_email_content
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified Application/database_calls/__pycache__/db_emails.cpython-37.pyc
Binary file not shown.
Binary file modified Application/database_calls/__pycache__/db_images.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Application/errors_module/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file modified Application/errors_module/__pycache__/errors.cpython-37.pyc
Binary file not shown.
Binary file not shown.
36 changes: 20 additions & 16 deletions Application/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
aiofiles==0.4.0
aiohttp==3.5.4
aioify==0.3.1
altgraph==0.16.1
appnope==0.1.0
asn1crypto==0.24.0
async-timeout==3.0.1
asyncinit==0.2.4
Expand Down Expand Up @@ -31,22 +31,32 @@ cryptography==2.6.1
Cython==0.29.10
dateparser==0.7.1
decorator==4.0.11
dnspython==1.16.0
docutils==0.14
e==1.4.5
ecdsa==0.13.2
Elixir==0.7.1
eventlet==0.25.1
ExifRead==2.1.2
extruct==0.7.2
Faker==1.0.5
future==0.17.1
geocoder==1.38.1
geographiclib==1.49
geopy==1.19.0
gevent==1.4.0
gpsphoto==2.2.3
greenlet==0.4.15
h11==0.8.1
h2==3.1.1
hpack==3.0.0
html2text==2018.1.9
html5lib==1.0.1
httpcore==0.3.0
httptools==0.0.13
humanfriendly==4.18
humanize==0.5.1
hyperframe==5.2.0
hyperlink==19.0.0
idna==2.8
idna-ssl==1.1.0
Expand All @@ -59,30 +69,25 @@ isodate==0.6.0
jedi==0.13.3
Jinja2==2.10.1
jmespath==0.9.4
loguru==0.3.1
loguru==0.3.2
lxml==4.3.3
macholib==1.11
MarkupSafe==1.1.1
mf2py==1.1.2
mnemonic==0.18
module-wrapper==0.2.4
monotonic==1.5
moviepy==0.2.3.2
multidict==4.5.2
netifaces==0.10.6
Nuitka==0.6.4
numpy==1.16.3
paramiko==2.6.0
parso==0.4.0
pbkdf2==1.3
pbr==5.2.0
peewee==3.9.6
pefile==2019.4.18
pexpect==4.7.0
pickleshare==0.7.5
piexif==1.1.2
Pillow==6.0.0
plyvel==1.0.5
poetry-version==0.1.3
prompt-toolkit==2.0.9
protobuf==3.7.1
ptyprocess==0.6.0
Expand All @@ -92,7 +97,7 @@ pycparser==2.19
pycryptodome==3.8.1
Pygments==2.3.1
PyHamcrest==1.9.0
PyInstaller==3.4
PyInstaller==3.5
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyotp==2.2.7
Expand All @@ -104,11 +109,9 @@ python-axolotl==0.1.42
python-axolotl-curve25519==0.4.1.post2
python-binance==0.7.1
python-dateutil==2.8.0
python-dotenv==0.10.3
-e git+https://github.com/GraphicalDot/datapod-backend-layer.git@1e554e6e1671008b7eb07038541ec917b3170144#egg=python_engineio
python-engineio==3.9.2.dev0
python-jose==3.0.1
python-magic==0.4.15
python-socketio==4.3.0
pytz==2019.1
PyYAML==3.13
pyzmq==18.0.1
Expand All @@ -117,14 +120,16 @@ rdflib==4.2.2
rdflib-jsonld==0.4.0
regex==2019.6.8
requests==2.22.0
requests-async==0.5.0
requests-file==1.4.3
requests-toolbelt==0.7.0
reverse-geocoder==1.5.1
rfc3986==1.3.2
rsa==3.4.2
s3transfer==0.2.0
sanic==19.3.1
Sanic-Cors==0.9.8.post2
Sanic-Plugins-Framework==0.8.1
sanic==19.6.2
Sanic-Cors==0.9.8
Sanic-Plugins-Framework==0.7.0
sanic-sse==0.2.1
scipy==1.2.1
selenium==4.0.0a1
Expand All @@ -138,7 +143,6 @@ Tempita==0.5.2
tenacity==5.0.4
text-unidecode==1.2
tldextract==2.2.1
tomlkit==0.5.5
tqdm==4.11.2
traitlets==4.3.2
Twisted==19.2.1
Expand Down
Loading

0 comments on commit fe1a168

Please sign in to comment.