- - add-data not behaving as expected

26 views
Skip to first unread message

Nmhor Kmhor

unread,
Aug 20, 2023, 6:09:27 AM8/20/23
to PyInstaller
My source location looks like
./
|-->program
      |--> config
              |   file1
              |   file2
              |--> development
                       |--> config
                               |   file3
                               |   file4

and I have --add-data program/config/*;config on the pyinstaller command line.
The destination in the _MEI...folder omits the development directory but includes everything else:

_MEI...
      |--> config
              |   file1
              |   file2
              |--> config
                      |   file3
                      |   file4
Any ideas how to fix this?

bwoodsend

unread,
Aug 21, 2023, 3:44:47 AM8/21/23
to PyInstaller

If you want to add a directory, you don’t want wildcards. Wildcards add the contents of a directory but not the directory itself. Just --add-data program/config:config gives me the following which I’m guessing is what you want?

_MEI.../ ├── base_library.zip ├── config │ ├── development │ │ └── config │ │ ├── file1 │ │ └── file2 │ ├── file1 │ └── file2 ├── the usual generic stuff

Nmhor Kmhor

unread,
Aug 24, 2023, 5:53:14 PM8/24/23
to PyInstaller
Thank you!
Reply all
Reply to author
Forward
0 new messages