Skip to content

Commit

Permalink
fix(pyinstaller): add a datafile from cookiecutter to the binary bund…
Browse files Browse the repository at this point in the history
…le of pyInstaller
  • Loading branch information
slouchart authored and jeremyVignelles committed Oct 17, 2023
1 parent 2c05314 commit c51361d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ddb.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@

block_cipher = None

# since version 2.2.3, cookiecutter comes with a VERSION.txt file that needs to be included
# as a datafile. This is kind of a temporary hack until a PR for cookiecutter is accepted
# to turn this VERSION.txt file into a regular Python module.

import cookiecutter
from pathlib import Path
COOKIECUTTER_PATH = Path(cookiecutter.__file__).parent.resolve()


a = Analysis(['ddb/__main__.py'],
pathex=[],
binaries=[],
datas=[
('ddb/feature/jsonnet/lib/*', 'ddb/feature/jsonnet/lib')
('ddb/feature/jsonnet/lib/*', 'ddb/feature/jsonnet/lib'),
(str(COOKIECUTTER_PATH / 'VERSION.txt'), 'cookiecutter'),
],
hiddenimports=[
'ddb.feature.jsonnet.docker',
Expand Down

0 comments on commit c51361d

Please sign in to comment.