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
11.56k stars 452 forks source link

Poetry Build is not working properly #4222

Closed Wanna-Pizza closed 1 month ago

Wanna-Pizza commented 1 month ago

Duplicate Check

Describe the bug

When I run poetry build - there is error:


Building flet-project (0.24.2-dev)
  - Building sdist

No file/folder found for package flet-project

GUYS. PLEASE. DONT SEND ME DOCS ABOUT "FLET BUILD". I DONT NEED IT.

I NEED TO STORE MODIFIED FLET INTO LIBRARY USING POETRY. OR HOW I CAN DO THAT??????????????

Im not sure how to fix that.

Code sample

Code ```Pyproject.toml [tool.poetry] name = "flet-project" version = "0.24.2-dev" description = "" authors = ["Appveyor Systems Inc. "] license = "Apache-2.0" [tool.poetry.dependencies] python = "<3.13,>=3.8" [tool.poetry.group.dev.dependencies] flet-core = {path = "packages/flet-core", develop = true} flet-cli = {path = "packages/flet-cli", develop = true} flet-desktop = {path = "packages/flet-desktop", develop = true} flet-web = {path = "packages/flet-web", develop = true} flet = {path = "packages/flet", develop = true} pytest = "^7.2.0" black = "^22.12.0" tomlkit = "^0.11.6" cryptography = "^39.0.0" pyinstaller = "^6.6.0" pillow = "^10.3.0" pre-commit = "^2.21.0" hypercorn = "^0.14.4" gunicorn = "^21.2.0" pypi-cleanup = "0.1.4" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" ```

To reproduce

idk... Try to poetry build

Expected behavior

To work it.

Screenshots / Videos

Captures [Upload media here]

Operating System

Windows

Operating system details

Windows 11

Flet version

0.24.1

Regression

No, it isn't

Suggestions

I dont know.

Logs

Logs ```console (flet-project-py3.11) PS H:\Flutter\project_flet\flet-project\sdk\python> poetry build Building flet-project (0.24.2-dev) - Building sdist No file/folder found for package flet-project ##### ADDITIONAL DETAILS Building flet-project (0.24.2-dev) - Building sdist Stack trace: 14 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\cleo\application.py:327 in run 325│ 326│ try: → 327│ exit_code = self._run(io) 328│ except BrokenPipeError: 329│ # If we are piped to another process, it may close early and send a 13 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\console\application.py:190 in _run 188│ self._load_plugins(io) 189│ → 190│ exit_code: int = super()._run(io) 191│ return exit_code 192│ 12 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\cleo\application.py:431 in _run 429│ io.input.interactive(interactive) 430│ → 431│ exit_code = self._run_command(command, io) 432│ self._running_command = None 433│ 11 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\cleo\application.py:473 in _run_command 471│ 472│ if error is not None: → 473│ raise error 474│ 475│ return terminate_event.exit_code 10 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\cleo\application.py:457 in _run_command 455│ 456│ if command_event.command_should_run(): → 457│ exit_code = command.run(io) 458│ else: 459│ exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED 9 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\cleo\commands\base_command.py:117 in run 115│ io.input.validate() 116│ → 117│ return self.execute(io) or 0 118│ 119│ def merge_application_definition(self, merge_args: bool = True) -> None: 8 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\cleo\commands\command.py:61 in execute 59│ 60│ try: → 61│ return self.handle() 62│ except KeyboardInterrupt: 63│ return 1 7 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\console\commands\build.py:66 in handle 64│ if not dist_dir.is_absolute(): 65│ dist_dir = self.poetry.pyproject_path.parent / dist_dir → 66│ self._build(fmt, executable=env.python, target_dir=dist_dir) 67│ 68│ return 0 6 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\console\commands\build.py:49 in _build 47│ 48│ for builder in builders: → 49│ builder(self.poetry, executable=executable).build(target_dir) 50│ 51│ def handle(self) -> int: 5 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\core\masonry\builders\sdist.py:80 in build 78│ tar_dir = f"{name}-{self._meta.version}" 79│ → 80│ files_to_add = self.find_files_to_add(exclude_build=False) 81│ 82│ for file in sorted(files_to_add, key=lambda x: x.relative_to_source_root()): 4 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\core\masonry\builders\sdist.py:321 in find_files_to_add 319│ 320│ def find_files_to_add(self, exclude_build: bool = False) -> set[BuildIncludeFile]: → 321│ to_add = super().find_files_to_add(exclude_build) 322│ 323│ # add any additional files 3 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\core\masonry\builders\builder.py:171 in find_files_to_add 169│ to_add = set() 170│ → 171│ for include in self._module.includes: 172│ include.refresh() 173│ formats = include.formats or ["sdist"] 2 ~\AppData\Local\Programs\Python\Python311\Lib\functools.py:1001 in __get__ 999│ val = cache.get(self.attrname, _NOT_FOUND) 1000│ if val is _NOT_FOUND: → 1001│ val = self.func(instance) 1002│ try: 1003│ cache[self.attrname] = val 1 ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\core\masonry\builders\builder.py:97 in _module 95│ includes.append(include) 96│ → 97│ return Module( 98│ self._package.name, 99│ self._path.as_posix(), ModuleOrPackageNotFound No file/folder found for package flet-project at ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\core\masonry\utils\module.py:65 in __init__ 61│ "include": str(src_py_file.relative_to(src)), 62│ "from": str(src.relative_to(self._path)), 63│ }] 64│ else: → 65│ raise ModuleOrPackageNotFound( 66│ f"No file/folder found for package {name}" 67│ ) 68│ 69│ for package in packages: ```

Additional details

No response

OwenMcDonnell commented 1 month ago

Read the docs about building flet apps using flet build for example.

Wanna-Pizza commented 1 month ago

Read the docs about building flet apps using flet build for example.

Omg. I don't need to build application that use flet. I need to compile library with new dart packages.

I'm asking the third question already, and instead of asking if you understood me correctly - you close the "problem".