Comments (3)
I'm going to try my recipe from simonw/datasette#93 (comment)
from datasette-app.
I used the pre-existing recipe:
pip install wheel
pip install datasette pyinstaller
BASE=$(python -c 'import os; print(os.path.dirname(__import__("datasette").__file__))') \
pyinstaller -F \
--add-data "$BASE/templates:datasette/templates" \
--add-data "$BASE/static:datasette/static" \
--hidden-import datasette.publish \
--hidden-import datasette.publish.heroku \
--hidden-import datasette.publish.cloudrun \
--hidden-import datasette.facets \
--hidden-import datasette.sql_functions \
--hidden-import datasette.actor_auth_cookie \
--hidden-import datasette.default_permissions \
--hidden-import datasette.default_magic_parameters \
--hidden-import datasette.blob_renderer \
--hidden-import datasette.default_menu_links \
--hidden-import uvicorn \
--hidden-import uvicorn.logging \
--hidden-import uvicorn.loops \
--hidden-import uvicorn.loops.auto \
--hidden-import uvicorn.protocols \
--hidden-import uvicorn.protocols.http \
--hidden-import uvicorn.protocols.http.auto \
--hidden-import uvicorn.protocols.websockets \
--hidden-import uvicorn.protocols.websockets.auto \
--hidden-import uvicorn.lifespan \
--hidden-import uvicorn.lifespan.on \
$(which datasette)
It sort-of worked: dist/datasette
is a binary that starts. But... it takes about 9 seconds to start the server!
https://stackoverflow.com/questions/9469932/app-created-with-pyinstaller-has-a-slow-startup suggests that this might be because I am using "one file" mode, with the -F
flag (a shortcut for --onefile
).
So I swapped that out for --onedir
- but that's not finding and copying in the templates. Need to investigate more.
More detailed explanation of how one file v.s. one folder works here: https://pyinstaller.readthedocs.io/en/stable/operating-mode.html#bundling-to-one-folder
from datasette-app.
Closed in favour of #25.
from datasette-app.
Related Issues (20)
- Create `brew install --cask datasette-app` for macOS HOT 1
- Publish ("export") to web with authentication and metadata (minimum feature set) HOT 4
- Can't "go back" after choosing view as JSON or CSV and saving/storing queries in underlying SQLite
- Allow for load / open of data from URL where CSV (or JSON?) is compressed
- Allow handling of larger CSV files e.g. CFPB complaints data HOT 1
- Switch to Playwright for automated tests HOT 28
- Failing to render in retina resolution when running on my MacBook Pro (macOS Catalina) HOT 1
- Research faster launch times
- Mechanism for plugins that need a specific DB HOT 3
- "Loading..." hangs on launch after parsing "tag_name" in a plugin HOT 6
- npm test is failing HOT 2
- All sorts of features not working due to bad HTTP requests HOT 9
- London Fire Brigade demo breaks HOT 7
- Import CSV from URL should show errors
- New Playwright tests should exercise key features
- Ability to use templates
- The icon looks blurry in the alt-tab window
- Loading... hangs on launch with packaging.version.InvalidVersion HOT 6
- "About Datasette" button fails to open information window HOT 2
- Unable to load preload script HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasette-app.