-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build error with poetry build system #2794
Comments
Are you actually on 2.16.1 or are you on latest master? |
i downloaded the master repository and tried building from there but the package.json file indicate locust version as 2.16.1 over there |
The installation procedure changed just a couple days ago (not yet part of a release), you're going to need to use Poetry now: https://docs.locust.io/en/latest/developing-locust.html#developing-locust |
i see, thank you for this documentation..it seems i was trying with older one |
@mquinnfd Is there a way we could give people a more sensible error message? For me (on macos, with poetry installed but not active), "pip install -e ." actually works (but doesnt generate the UI I guess) |
@andrewbaldwin44 package.json has version 2.16.1 hard coded, which is weird. Can we make it use the same versioning as locust somehow? |
executed the following commands in order, still didn't work
error: Command ['C:\Users\ADMINI~1\AppData\Local\Temp\2\tmpx4ifi4zk\.venv\Scripts\python.exe', 'C:\Users\Administrator\Desktop\Akshit\locust\pre_build.py'] errored with the following return code 1 |
I think the problem is that you are missing @mquinnfd perhaps pre_build.py needs to call yarn directly, so we don't depend on make as well? You'll probably need to install yarn as well, |
it works after installing make! but now locust is not available as an executable command on commandline logs for successful install: commandline error: NOTE: previously it was making the executable in C:\Python312\Scripts folder |
With Poetry, you automatically install into a virtual env, so you need to activate it ( |
i'm now able to build my local code successfully, thank you for the support! |
No worries, thanks for reporting this! Keeping this ticket open for Matthew to take a look :) |
Yeah I suppose the point of having it wrapped with @cyberw I'll take an action to:
|
Your suggested solution (call yarn directly) sounds fine or at least better than adding an extra dependency ( Another option might be (if possible) to just fail if someone uses |
Pr for this is over here: #2801 I can't think of a way to fail a |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself! |
Prerequisites
Description
Building editable for locust (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building editable for locust (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [38 lines of output]
Building front end...
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\Akshit\locust\pre_build.py", line 14, in
build()
File "C:\Users\Administrator\Desktop\Akshit\locust\pre_build.py", line 10, in build
subprocess.run(["make", "frontend_build"])
File "C:\Python312\Lib\subprocess.py", line 548, in run
with Popen(*popenargs, **kwargs) as process:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\subprocess.py", line 1026, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Python312\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 273, in build_editable
return hook(wheel_directory, config_settings, metadata_directory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-3jvfpl2m\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 82, in build_editable
return WheelBuilder.make_in(
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-3jvfpl2m\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 88, in make_in
wb.build(target_dir=directory)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-3jvfpl2m\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 117, in build
self._build(zip_file)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-3jvfpl2m\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 172, in _build
self._run_build_script(self._package.build_script)
File "C:\Users\Administrator\AppData\Local\Temp\2\pip-build-env-3jvfpl2m\overlay\Lib\site-packages\poetry\core\masonry\builders\wheel.py", line 262, in _run_build_script
subprocess.check_call([self.executable.as_posix(), build_script])
File "C:\Python312\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:/Python312/python.exe', 'pre_build.py']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building editable for locust
Failed to build locust
ERROR: Could not build wheels for locust, which is required to install pyproject.toml-based projects
Command line
pip install -e locust/
Locustfile contents
Python version
3.12.3
Locust version
2.16.1
Operating system
Windows 11
The text was updated successfully, but these errors were encountered: