File tree 3 files changed +17
-2
lines changed
3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 7
7
- MongoDB: Added adapter amalgamating PyMongo to use CrateDB as backend
8
8
- SQLAlchemy: Clean up and refactor SQLAlchemy polyfills
9
9
to ` cratedb_toolkit.util.sqlalchemy `
10
+ - CFR: Build as a self-contained program using PyInstaller
10
11
11
12
## 2024/06/18 v0.0.14
12
13
- Add ` ctk cfr ` and ` ctk wtf ` diagnostics programs
Original file line number Diff line number Diff line change 1
1
# Copyright (c) 2021-2024, Crate.io Inc.
2
2
# Distributed under the terms of the AGPLv3 license, see LICENSE.
3
3
import logging
4
+ import multiprocessing
4
5
import sys
5
6
6
7
import click
@@ -77,3 +78,10 @@ def sys_import(ctx: click.Context, source: str):
77
78
except Exception as ex :
78
79
error_logger (ctx )(ex )
79
80
sys .exit (1 )
81
+
82
+
83
+ if getattr (sys , "frozen" , False ):
84
+ # https://github.com/pyinstaller/pyinstaller/issues/6368
85
+ multiprocessing .freeze_support ()
86
+ # https://stackoverflow.com/questions/45090083/freeze-a-program-created-with-pythons-click-pacage
87
+ cli (sys .argv [1 :])
Original file line number Diff line number Diff line change @@ -110,8 +110,8 @@ all = [
110
110
" cratedb-toolkit[full,influxdb,mongodb]" ,
111
111
]
112
112
cfr = [
113
- " pandas<3,>=1 " ,
114
- " pyarrow<17 " ,
113
+ " pandas<2.2 " ,
114
+ " pyarrow<16.1 " ,
115
115
]
116
116
cloud = [
117
117
" croud==1.11.1" ,
@@ -167,6 +167,9 @@ release = [
167
167
" build<2" ,
168
168
" twine<6" ,
169
169
]
170
+ release-cfr = [
171
+ " pyinstaller<7" ,
172
+ ]
170
173
service = [
171
174
" fastapi<0.112" ,
172
175
" uvicorn<0.31" ,
@@ -195,6 +198,7 @@ documentation = "https://github.com/crate-workbench/cratedb-toolkit"
195
198
homepage = " https://github.com/crate-workbench/cratedb-toolkit"
196
199
repository = " https://github.com/crate-workbench/cratedb-toolkit"
197
200
[project .scripts ]
201
+ cratedb-cfr = " cratedb_toolkit.cfr.cli:cli"
198
202
cratedb-retention = " cratedb_toolkit.retention.cli:cli"
199
203
cratedb-toolkit = " cratedb_toolkit.cli:cli"
200
204
cratedb-wtf = " cratedb_toolkit.wtf.cli:cli"
@@ -355,3 +359,5 @@ release = [
355
359
]
356
360
357
361
test = { cmd = " pytest" }
362
+
363
+ build-cfr = { cmd = " pyinstaller cratedb_toolkit/cfr/cli.py --onefile --name cratedb-cfr" }
You can’t perform that action at this time.
0 commit comments