Open rmarquet21 opened 1 year ago
you forgot to rerun with -vvv
and provide the output
you forgot to rerun with
-vvv
and provide the output
poetry build -vvv
Trying to detect current active python executable as specified in the config.
Found: /Users/robin/.pyenv/versions/3.8.16/bin/python
Stack trace:
13 ~/Library/Application Support/pypoetry/venv/lib/python3.10/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
12 ~/Library/Application Support/pypoetry/venv/lib/python3.10/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ā
11 ~/Library/Application Support/pypoetry/venv/lib/python3.10/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ā
10 ~/Library/Application Support/pypoetry/venv/lib/python3.10/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
9 ~/Library/Application Support/pypoetry/venv/lib/python3.10/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
8 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/cleo/commands/base_command.py:119 in run
117ā io.input.validate()
118ā
ā 119ā status_code = self.execute(io)
120ā
121ā if status_code is None:
7 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/cleo/commands/command.py:62 in execute
60ā
61ā try:
ā 62ā return self.handle()
63ā except KeyboardInterrupt:
64ā return 1
6 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/console/commands/build.py:34 in handle
32ā
33ā builder = Builder(self.poetry)
ā 34ā builder.build(fmt, executable=env.python)
35ā
36ā return 0
5 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/core/masonry/builder.py:39 in build
37ā
38ā for builder in builders:
ā 39ā builder(self._poetry, executable=executable).build(target_dir)
40ā
4 ~/Library/Application Support/pypoetry/venv/lib/python3.10/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()):
3 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/core/masonry/builders/sdist.py:323 in find_files_to_add
321ā
322ā def find_files_to_add(self, exclude_build: bool = False) -> set[BuildIncludeFile]:
ā 323ā to_add = super().find_files_to_add(exclude_build)
324ā
325ā # add any additional files, starting with all LICENSE files
2 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/core/masonry/builders/builder.py:189 in find_files_to_add
187ā
188ā if not current_file.is_dir() and not self.is_excluded(
ā 189ā include_file.relative_to_source_root()
190ā ):
191ā to_add.add(include_file)
1 ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/core/masonry/builders/builder.py:399 in relative_to_source_root
397ā def relative_to_source_root(self) -> Path:
398ā if self.source_root is not None:
ā 399ā return self.path.relative_to(self.source_root)
400ā
401ā return self.path
ValueError
'/Users/robin/.pyenv/versions/3.10.9/bin/python3.10' is not in the subpath of '/Users/robin/Documents/rmarquet21/st_annotation' OR one path is relative and the other is absolute.
at ~/.pyenv/versions/3.10.11/lib/python3.10/pathlib.py:818 in relative_to
814ā n = len(to_abs_parts)
815ā cf = self._flavour.casefold_parts
816ā if (root or drv) if n == 0 else cf(abs_parts[:n]) != cf(to_abs_parts):
817ā formatted = self._format_parsed_parts(to_drv, to_root, to_parts)
ā 818ā raise ValueError("{!r} is not in the subpath of {!r}"
819ā " OR one path is relative and the other is absolute."
820ā .format(str(self), str(formatted)))
821ā return self._from_parsed_parts('', root if n == 1 else '',
822ā abs_parts[n:])
I expect you'll want to investigate what's going on near find_files_to_add()
, stick some print statements or similar in there.
Perhaps you've got a symlink or something that's behaving unexpectedly.
I find, I have a symlink, in my node_modules, you know how to remove them from build ?
.
āāā CHANGELOG.md
āāā LICENSE
āāā MANIFEST.in
āāā README.md
āāā examples
ā āāā example.py
āāā poetry.lock
āāā pyproject.toml
āāā requirements.txt
āāā setup.py
āāā src
āāā st_text_annotator
āāā __init__.py
āāā frontend
āāā build
āāā node_modules
āāā package-lock.json
āāā package.json
āāā public
āāā src
āāā tsconfig.json
9 directories, 13 files
I try with exclude = ["./src/st_text_annotator/frontend/node_modules/**/*"]
but this do nothing
I use a symbolic link for the build/
folder and point it to a different file system. This is done for performance reasons on our CI server (Jenkins). Poetry builds break because of this. But Gradle (Java) builds and other types of builds do not. I use poetry 1.7.1.
Any updates on this? I've run into the same issue.
In case it is of help for somebody else: I had this problem, and it was because there was a virtual environment created inside the project directory I was trying to install with "pip install .". After removing the virtual environment directory, it worked correctly.
-vvv
option) and have included the output below.Issue
Hello, I'm trying to do a poetry build of my Python app. The problem is that I keep getting an error that says '/Users/robin/.pyenv/versions/3.10.9/bin/python3.10' is not in the subpath of '/Users/robin/Documents/rmarquet21/st_annotation' OR one path is relative, and the other is absolute. I have tried to find a solution to my issue, but I haven't found any. I also use pyenv and currently have a global version of Python 3.8, so I don't understand where version 3.10.9 is coming from.
pyproject.toml
output