flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
9.43k stars 360 forks source link

Flet build `--exclude` command option #3125

Closed BrentHuang closed 1 week ago

BrentHuang commented 2 weeks ago

flet build does not have the exclude option and cannot exclude some directories or files.

ndonkoHenri commented 2 weeks ago

Which directories do you wish to see excluded? Please provide more information. Flet build packages only content of your project directory.

BrentHuang commented 2 weeks ago

For example, in my project, there is a logs directory, which contains log files, and a scripts directory, which contains my packaging scripts, which are not needed.

image

In the above picture, there are .po files in the translations directory, which also do not need to be packaged.

FeodorFitsner commented 2 weeks ago

package command in serious_python package already has --exclude option, but I see flet build passes hard-coded assets,build there. We need to expose this option in flet build.

Another option would be "automate" exclusion list by parsing .gitignore. Don't know if other tools do that, but sounds like a nice idea :)

BrentHuang commented 2 weeks ago

A semantically clear exclude is better.

BrentHuang commented 2 weeks ago

A semantically clear exclude is better, because some files and directories may not necessarily be in .gitignore file.

BrentHuang commented 1 week ago

flet build --build-number=1 --build-version="1.0.0" --exclude="scripts/ logs/ .gitignore babel.cfg i18n.bat README.md requirements.txt .pod.po" -vv windows

flet 0.22.1 --exclude like this? but has no effect like this, no files and dirs excluded.