You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm very new with this package manager and I am trying to learn how to properly use it by trying to convert old projects to use uv.
I do most of my development work on Windows but deploy on Linux. Most of my projects use the uwsgi package but I do not want it to install on Windows.
uv add "uwsgi; platform_system == 'Linux'"
warning: No `requires-python` value found in the workspace. Defaulting to `>=3.12`.
x Failed to build `uwsgi==2.0.28`
|-> The build backend returned an error
`-> Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit code: 1)
[stderr]
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "C:\Users\jacobthetechy\AppData\Local\uv\cache\builds-v0\.tmpUMmIEX\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jacobthetechy\AppData\Local\uv\cache\builds-v0\.tmpUMmIEX\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "C:\Users\jacobthetechy\AppData\Local\uv\cache\builds-v0\.tmpUMmIEX\Lib\site-packages\setuptools\build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\jacobthetechy\AppData\Local\uv\cache\builds-v0\.tmpUMmIEX\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
exec(code, locals())
File "<string>", line 3, in <module>
File "C:\Users\jacobthetechy\AppData\Local\uv\cache\sdists-v6\pypi\uwsgi\2.0.28\IcmJI-FyWg16K1hit9AeZ\src\uwsgiconfig.py", line 8, in <module>
uwsgi_os = os.uname()[0]
^^^^^^^^
AttributeError: module 'os' has no attribute 'uname'. Did you mean: 'name'?
hint: This usually indicates a problem with the package or the build environment.
help: `uwsgi` (v2.0.28) was included because `new_project` (v0.1.0) depends on `uwsgi`
From this issue comment I followed the build failure guided a little checked how pip would attempt to install.
pip install --use-pep517 "uwsgi; platform_system == 'Linux'"
Ignoring uwsgi: markers 'platform_system == "Linux"' don't match your environment
I expected uv to follow this behavior, but if there is a proper way to add uwsgi as a dependency without it failing on Windows I am open to learn.
The text was updated successfully, but these errors were encountered:
If you use uv add, we need to resolve your dependencies for all possible environments. So we still need to resolve it, even if it's not going to be installed on the current platform. And in this case, that appears to mean that we have to build it.
You can add this to your pyproject.toml to skip the build and instead pre-define the metadata:
[[tool.uv.dependency-metadata]]
name = "uwsgi"version = "2.0.28"requires-dist = []
The best would be if the package was updated to report static metadata via a pyproject.toml file, but in the absence of that, there aren't great options unfortunately!
I'm very new with this package manager and I am trying to learn how to properly use it by trying to convert old projects to use
uv
.I do most of my development work on Windows but deploy on Linux. Most of my projects use the
uwsgi
package but I do not want it to install on Windows.From this issue comment I followed the build failure guided a little checked how pip would attempt to install.
I expected
uv
to follow this behavior, but if there is a proper way to adduwsgi
as a dependency without it failing on Windows I am open to learn.The text was updated successfully, but these errors were encountered: