Skip to content

Commit

Permalink
Merge pull request #19 from mmann1123/osx-build
Browse files Browse the repository at this point in the history
Build for OSX
  • Loading branch information
mmann1123 authored Jun 13, 2024
2 parents 80bc42b + 0aedfc8 commit 28b82fd
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 8 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This is a Dash application that creates a leaderboard of OpenStreetMap contribut

## Executables

Executable files for windows and linux are currently available for download:
Executable files for `OSx`, `Windows` and `linux` are available for download:

<a href="https://www.dropbox.com/scl/fo/07gchwqkr5kl2c4julr52/AGoB9nqB9aCRBVJnMg5V4CA?rlkey=x23yu6k6utvb98izvjjyexcub&st=mdh91bij&dl=0"> <img src="https://github.com/mmann1123/OSM_LeaderBoard/blob/main/static/download.png?raw=true" alt="exe" height="45"></a>

Expand Down Expand Up @@ -58,14 +58,17 @@ newer_than_date: "2010-12-01"

## Running the Application

To run the application, use the following command:
1) **From the downloaded executable file**: double click on the file to run the application. Then select or drag your `config.yaml` file to the upload box. The leaderboard will be displayed in the browser window once the api calls are complete.

```bash
cd OSM_LeaderBoard
python dash_app.py
```
2) **From Python**: From the terminal window, navigate to the directory where the `dash_app.py` file is located. To download and run the application, use the following command:

```bash
git clone https://github.com/mmann1123/OSM_LeaderBoard.git
cd OSM_LeaderBoard/osm_leaderboard
python dash_app.py
```

In the browser window select or drag your `config.yaml` file to the upload box. The leaderboard will be displayed in the browser window once the api calls are complete.
In the browser window select or drag your `config.yaml` file to the upload box. The leaderboard will be displayed in the browser window once the api calls are complete.


# Demo
Expand Down
37 changes: 37 additions & 0 deletions leaderboard_osx.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['dash_app.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='leaderboard_osx',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
2 changes: 1 addition & 1 deletion osm_leaderboard/dash_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def open_browser(port):
def main():
logging.info("Executing main block.")
# Ensure compatibility with Windows exe for threading
if platform.system() == "Windows":
if platform.system() in ["Windows", "Darwin"]:
freeze_support()

try:
Expand Down
37 changes: 37 additions & 0 deletions osm_leaderboard/leaderboard_osx.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -*- mode: python ; coding: utf-8 -*-


a = Analysis(
['dash_app.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)

exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='leaderboard_osx',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

0 comments on commit 28b82fd

Please sign in to comment.