I am on Windows 11. When using python 3.10 or 3.11, I can't install astroz via `python -m pip install astroz'
PS D:\WindowsData\Projects\Python\astroz_test> uv venv --python 3.11 --seed .venv
Using CPython 3.11.9 interpreter at: C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\python.exe
Creating virtual environment with seed packages at: .venv
warning: Failed to hardlink files; falling back to full copy. This may lead to degraded performance.
If the cache and target directories are on different filesystems, hardlinking may not be supported.
If this is intentional, set `export UV_LINK_MODE=copy` or use `--link-mode=copy` to suppress this warning.
+ packaging==26.0
+ pip==26.0.1
+ setuptools==81.0.0
+ wheel==0.46.3
Activate with: .venv\Scripts\activate
PS D:\WindowsData\Projects\Python\astroz_test> .venv/Scripts/activate
(.venv) PS D:\WindowsData\Projects\Python\astroz_test> python -m pip install astroz
Collecting astroz
Using cached astroz-0.7.1.tar.gz (17 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting numpy (from astroz)
Using cached numpy-2.4.2-cp311-cp311-win_amd64.whl.metadata (6.6 kB)
Using cached numpy-2.4.2-cp311-cp311-win_amd64.whl (12.6 MB)
Building wheels for collected packages: astroz
Building wheel for astroz (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for astroz (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [122 lines of output]
C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2027-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
corresp(dist, value, root_dir)
C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-311\astroz
copying astroz\api.py -> build\lib.win-amd64-cpython-311\astroz
copying astroz\__init__.py -> build\lib.win-amd64-cpython-311\astroz
running egg_info
writing astroz.egg-info\PKG-INFO
writing dependency_links to astroz.egg-info\dependency_links.txt
writing requirements to astroz.egg-info\requires.txt
writing top-level names to astroz.egg-info\top_level.txt
reading manifest file 'astroz.egg-info\SOURCES.txt'
writing manifest file 'astroz.egg-info\SOURCES.txt'
copying astroz\_astroz.pyi -> build\lib.win-amd64-cpython-311\astroz
copying astroz\py.typed -> build\lib.win-amd64-cpython-311\astroz
running build_ext
info: initialize build.zig template file with 'zig init'
info: see 'zig --help' for more options
error: no build.zig file found, in the current directory or any parent directories
Building with: zig build python-bindings -Dpython-include=C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\Include -Doptimize=ReleaseFast -Dpython-lib=python3.11
Traceback (most recent call last):
File "D:\WindowsData\Projects\Python\astroz-0.7.1\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
main()
File "D:\WindowsData\Projects\Python\astroz-0.7.1\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\WindowsData\Projects\Python\astroz-0.7.1\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 280, in build_wheel
return _build_backend().build_wheel(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\build_meta.py", line 441, in build_wheel
return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\build_meta.py", line 429, in _build
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in _build_with_temp_dir
self.run_setup()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
exec(code, locals())
File "<string>", line 102, in <module>
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
return distutils.core.setup(**attrs) # type: ignore[return-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 186, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands
dist.run_commands()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1000, in run_commands
self.run_command(cmd)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\dist.py", line 1107, in run_command
super().run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1019, in run_command
cmd_obj.run()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\command\bdist_wheel.py", line 370, in run
self.run_command("build")
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 341, in run_command
self.distribution.run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\dist.py", line 1107, in run_command
super().run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1019, in run_command
cmd_obj.run()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 341, in run_command
self.distribution.run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\dist.py", line 1107, in run_command
super().run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1019, in run_command
cmd_obj.run()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 97, in run
_build_ext.run(self)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 367, in run
self.build_extensions()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 483, in build_extensions
self._build_extensions_serial()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-ainhy547\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 509, in _build_extensions_serial
self.build_extension(ext)
File "<string>", line 50, in build_extension
File "C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['zig', 'build', 'python-bindings', '-Dpython-include=C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Include', '-Doptimize=ReleaseFast', '-Dpython-lib=python3.11']' 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 wheel for astroz
Failed to build astroz
error: failed-wheel-build-for-install
× Failed to build installable wheels for some pyproject.toml based projects
╰─> astroz
I tried this with python 3.10 and 3.11 - same end result. So I set out to build it manually. I downloaded the 0.7.1 zip file. Initially zig build fails because it is not able to find zlib.
(.venv) PS D:\WindowsData\Projects\Python\astroz-0.7.1> zig build
install
└─ lib
└─ install astroz
└─ compile lib astroz Debug native
└─ compile lib cfitsio Debug native failure
error: error: unable to find dynamic system library 'z' using strategy 'paths_first'. searched paths: none
Manually installing zlib and then explicitly telling zig build where to find it solves that problem
(.venv) PS D:\WindowsData\Projects\Python\astroz-0.7.1> zig build --search-prefix "C:\Program Files (x86)\GnuWin32"
But when trying to install, there is an error related to zig not being able to find python311 dynamic library
(.venv) PS D:\WindowsData\Projects\Python\astroz-0.7.1> python -m pip install ${pwd}/bindings/python
Processing .\bindings\python
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting numpy (from astroz==0.5.1)
Using cached numpy-2.4.2-cp311-cp311-win_amd64.whl.metadata (6.6 kB)
Using cached numpy-2.4.2-cp311-cp311-win_amd64.whl (12.6 MB)
Building wheels for collected packages: astroz
Building wheel for astroz (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for astroz (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [129 lines of output]
C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2027-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
corresp(dist, value, root_dir)
C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\config\_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
running egg_info
writing astroz.egg-info\PKG-INFO
writing dependency_links to astroz.egg-info\dependency_links.txt
writing requirements to astroz.egg-info\requires.txt
writing top-level names to astroz.egg-info\top_level.txt
reading manifest file 'astroz.egg-info\SOURCES.txt'
writing manifest file 'astroz.egg-info\SOURCES.txt'
running build_ext
python-bindings
+- install _astroz
+- compile lib _astroz ReleaseFast native failure
error: error: unable to find dynamic system library 'python3.11' using strategy 'paths_first'. searched paths: none
error: process exited with error code 1
failed command: "C:\\Users\\<USERNAME>\\scoop\\apps\\zig-dev\\0.16.0-dev.2510\\zig.exe" build-lib -lpython3.11 -OReleaseFast -I "C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Include" --dep astroz "-Mroot=D:\\WindowsData\\Projects\\Python\\astroz-0.7.1\\bindings\\python\\src\\main.zig" -OReleaseFast --dep zignal "-Mastroz=D:\\WindowsData\\Projects\\Python\\astroz-0.7.1\\src\\lib.zig" --dep build_options "-Mzignal=C:\\Users\\<USERNAME>\\AppData\\Local\\zig\\p\\zignal-0.10.0-dev-OrZ3sxJyJgATX9TyC9k2sFPlGmwaMav02bCxSKQvyfZr\\src\\root.zig" "-Mbuild_options=.zig-cache\\c\\7bb453a1ebd76435e4994f7fb56c60fb\\options.zig" -lc -femit-implib --cache-dir .zig-cache --global-cache-dir "C:\\Users\\<USERNAME>\\AppData\\Local\\zig" --name _astroz -dynamic --zig-lib-dir "C:\\Users\\<USERNAME>\\scoop\\apps\\zig-dev\\0.16.0-dev.2510\\lib\\" --listen=-
Build Summary: 1/4 steps succeeded (1 failed)
python-bindings transitive failure
+- install _astroz transitive failure
+- compile lib _astroz ReleaseFast native failure
error: the following build command failed with exit code 1:
.zig-cache\o\2fdfc276b5f94c990c9ed0ce22bd02eb\build.exe C:\Users\<USERNAME>\scoop\apps\zig-dev\0.16.0-dev.2510\zig.exe C:\Users\<USERNAME>\scoop\apps\zig-dev\0.16.0-dev.2510\lib D:\WindowsData\Projects\Python\astroz-0.7.1 .zig-cache C:\Users\<USERNAME>\AppData\Local\zig --seed 0xe8a57c13 -Z07da7772b0790780 python-bindings -Dpython-include=C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\Include -Doptimize=ReleaseFast -Dpython-lib=python3.11
Building with: zig build python-bindings -Dpython-include=C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\Include -Doptimize=ReleaseFast -Dpython-lib=python3.11
Traceback (most recent call last):
File "D:\WindowsData\Projects\Python\astroz-0.7.1\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
main()
File "D:\WindowsData\Projects\Python\astroz-0.7.1\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\WindowsData\Projects\Python\astroz-0.7.1\.venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 280, in build_wheel
return _build_backend().build_wheel(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\build_meta.py", line 441, in build_wheel
return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\build_meta.py", line 429, in _build
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in _build_with_temp_dir
self.run_setup()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
exec(code, locals())
File "<string>", line 102, in <module>
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
return distutils.core.setup(**attrs) # type: ignore[return-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 186, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands
dist.run_commands()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1000, in run_commands
self.run_command(cmd)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\dist.py", line 1107, in run_command
super().run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1019, in run_command
cmd_obj.run()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\command\bdist_wheel.py", line 370, in run
self.run_command("build")
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 341, in run_command
self.distribution.run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\dist.py", line 1107, in run_command
super().run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1019, in run_command
cmd_obj.run()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 341, in run_command
self.distribution.run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\dist.py", line 1107, in run_command
super().run_command(command)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1019, in run_command
cmd_obj.run()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 97, in run
_build_ext.run(self)
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 367, in run
self.build_extensions()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 483, in build_extensions
self._build_extensions_serial()
File "C:\Users\<USERNAME>\AppData\Local\Temp\pip-build-env-lm6ld44e\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 509, in _build_extensions_serial
self.build_extension(ext)
File "<string>", line 50, in build_extension
File "C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python311\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['zig', 'build', 'python-bindings', '-Dpython-include=C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Include', '-Doptimize=ReleaseFast', '-Dpython-lib=python3.11']' 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 wheel for astroz
Failed to build astroz
error: failed-wheel-build-for-install
× Failed to build installable wheels for some pyproject.toml based projects
╰─> astroz
I explored two possible issues:
- the zig build command that gets executed gets passed a parameter
-Dpython-lib=python3.11. The library name is actually python311 without the period
- the zig build command that gets executed gets passed an explicit folder for include files
-Dpython-include= , but not for library files -Dpython-lib-path
Note that these issues also were present when 'just' installing astroz using pip.
When I issue a build command that explicitly handles the above, I get a compile error:
zig build python-bindings -Dpython-include="C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Include" -Doptimize=ReleaseFast -Dpython-lib-path="C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Libs" -Dpython-lib="python311"
python-bindings
└─ install _astroz
└─ compile lib _astroz ReleaseFast native 1 errors
src\Datetime.zig:11:19: error: root source file struct 'time' has no member named 'Instant'
instant: ?std.time.Instant,
~~~~~~~~^~~~~~~~
C:\Users\<USERNAME>\scoop\apps\zig-dev\0.16.0-dev.2510\lib\std\time.zig:1:1: note: struct declared here
pub const epoch = @import("time/epoch.zig");
^~~
referenced by:
Datetime: src\lib.zig:6:30
Datetime: bindings\python\src\satrec.zig:11:24
9 reference(s) hidden; use '-freference-trace=11' to see all references
error: 1 compilation errors
failed command: "C:\\Users\\<USERNAME>\\scoop\\apps\\zig-dev\\0.16.0-dev.2510\\zig.exe" build-lib -lpython311 -OReleaseFast -I "C:\\\\Users\\\\<USERNAME>\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python311\\\\Include" -L "C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Libs" --dep astroz "-Mroot=D:\\WindowsData\\Projects\\Python\\astroz-0.7.1\\bindings\\python\\src\\main.zig" -OReleaseFast --dep zignal "-Mastroz=D:\\WindowsData\\Projects\\Python\\astroz-0.7.1\\src\\lib.zig" --dep build_options "-Mzignal=C:\\Users\\<USERNAME>\\AppData\\Local\\zig\\p\\zignal-0.10.0-dev-OrZ3sxJyJgATX9TyC9k2sFPlGmwaMav02bCxSKQvyfZr\\src\\root.zig" "-Mbuild_options=.zig-cache\\c\\7bb453a1ebd76435e4994f7fb56c60fb\\options.zig" -lc -femit-implib --cache-dir .zig-cache --global-cache-dir "C:\\Users\\<USERNAME>\\AppData\\Local\\zig" --name _astroz -dynamic --zig-lib-dir "C:\\Users\\<USERNAME>\\scoop\\apps\\zig-dev\\0.16.0-dev.2510\\lib\\" --listen=-
Build Summary: 1/4 steps succeeded (1 failed)
python-bindings transitive failure
└─ install _astroz transitive failure
└─ compile lib _astroz ReleaseFast native 1 errors
error: the following build command failed with exit code 1:
.zig-cache\o\2fdfc276b5f94c990c9ed0ce22bd02eb\build.exe C:\Users\<USERNAME>\scoop\apps\zig-dev\0.16.0-dev.2510\zig.exe C:\Users\<USERNAME>\scoop\apps\zig-dev\0.16.0-dev.2510\lib D:\WindowsData\Projects\Python\astroz-0.7.1 .zig-cache C:\Users\<USERNAME>\AppData\Local\zig --seed 0x3b65cbac -Zdf8981a027adfb64 python-bindings -Dpython-include=C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Include -Doptimize=ReleaseFast -Dpython-lib-path=C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Libs -Dpython-lib=python311
So then I just cloned the latest version of the repository, and ran the command again:
zig build python-bindings -Dpython-include="C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Include" -Doptimize=ReleaseFast -Dpython-lib-path="C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Libs" -Dpython-lib="python311"
python-bindings
└─ install _astroz
└─ compile lib _astroz ReleaseFast native failure
error: dllexport GlobalValue must have default or protected visibility
ptr @isnan
dllexport GlobalValue must have default or protected visibility
ptr @isnanf
dllexport GlobalValue must have default or protected visibility
ptr @isnanl
dllexport GlobalValue must have default or protected visibility
ptr @nan
dllexport GlobalValue must have default or protected visibility
ptr @nanf
dllexport GlobalValue must have default or protected visibility
ptr @nanl
dllexport GlobalValue must have default or protected visibility
ptr @copysignl
dllexport GlobalValue must have default or protected visibility
ptr @strnlen
dllexport GlobalValue must have default or protected visibility
ptr @mempcpy
dllexport GlobalValue must have default or protected visibility
ptr @strtok_r
dllexport GlobalValue must have default or protected visibility
ptr @wmemchr
dllexport GlobalValue must have default or protected visibility
ptr @wmemcmp
dllexport GlobalValue must have default or protected visibility
ptr @wmemcpy
dllexport GlobalValue must have default or protected visibility
ptr @wmempcpy
dllexport GlobalValue must have default or protected visibility
ptr @wmemmove
dllexport GlobalValue must have default or protected visibility
ptr @wmemset
dllexport GlobalValue must have default or protected visibility
ptr @wcsnlen
dllexport GlobalValue must have default or protected visibility
ptr @__QNAN
dllexport GlobalValue must have default or protected visibility
ptr @__SNAN
dllexport GlobalValue must have default or protected visibility
ptr @__INF
dllexport GlobalValue must have default or protected visibility
ptr @__DENORM
dllexport GlobalValue must have default or protected visibility
ptr @__QNANF
dllexport GlobalValue must have default or protected visibility
ptr @__SNANF
dllexport GlobalValue must have default or protected visibility
ptr @__INFF
dllexport GlobalValue must have default or protected visibility
ptr @__DENORMF
dllexport GlobalValue must have default or protected visibility
ptr @__QNANL
dllexport GlobalValue must have default or protected visibility
ptr @__SNANL
dllexport GlobalValue must have default or protected visibility
ptr @__INFL
dllexport GlobalValue must have default or protected visibility
ptr @__DENORML
dllexport GlobalValue must have default or protected visibility
ptr @__isnan
dllexport GlobalValue must have default or protected visibility
ptr @__isnanf
dllexport GlobalValue must have default or protected visibility
ptr @__isnanl
LLVM ERROR: Broken module found, compilation aborted!
error: process exited with error code 9
failed command: "C:\\Users\\<USERNAME>\\scoop\\apps\\zig-dev\\0.16.0-dev.2510\\zig.exe" build-lib -lpython311 -OReleaseFast -I "C:\\\\Users\\\\<USERNAME>\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python311\\\\Include" -L "C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Libs" --dep astroz "-Mroot=D:\\WindowsData\\Projects\\Python\\astroz\\bindings\\python\\src\\main.zig" -OReleaseFast --dep zignal "-Mastroz=D:\\WindowsData\\Projects\\Python\\astroz\\src\\lib.zig" --dep build_options "-Mzignal=C:\\Users\\<USERNAME>\\AppData\\Local\\zig\\p\\zignal-0.10.0-dev-OrZ3sxJyJgATX9TyC9k2sFPlGmwaMav02bCxSKQvyfZr\\src\\root.zig" "-Mbuild_options=.zig-cache\\c\\7bb453a1ebd76435e4994f7fb56c60fb\\options.zig" -lc -femit-implib --cache-dir .zig-cache --global-cache-dir "C:\\Users\\<USERNAME>\\AppData\\Local\\zig" --name _astroz -dynamic --zig-lib-dir "C:\\Users\\<USERNAME>\\scoop\\apps\\zig-dev\\0.16.0-dev.2510\\lib\\" --listen=-
Build Summary: 1/4 steps succeeded (1 failed)
python-bindings transitive failure
└─ install _astroz transitive failure
└─ compile lib _astroz ReleaseFast native failure
error: the following build command failed with exit code 1:
.zig-cache\o\2fdfc276b5f94c990c9ed0ce22bd02eb\build.exe C:\Users\<USERNAME>\scoop\apps\zig-dev\0.16.0-dev.2510\zig.exe C:\Users\<USERNAME>\scoop\apps\zig-dev\0.16.0-dev.2510\lib D:\WindowsData\Projects\Python\astroz .zig-cache C:\Users\<USERNAME>\AppData\Local\zig --seed 0x203e6f43 -Zc215f7d4f7c07a9c python-bindings -Dpython-include=C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Include -Doptimize=ReleaseFast -Dpython-lib-path=C:\\Users\\<USERNAME>\\AppData\\Local\\Programs\\Python\\Python311\\Libs -Dpython-lib=python311
This is yet again a different error. At this point I decided to submit an issue for it here.
Note: I tried this on Ubuntu22.04 (python 3.10/3.11) and had the same issues with 'installing using pip. When trying to manually build, I do get initial build errors but they go away when I remove line 16 in bindings/python/pyproject.toml. After that things seem to work as expected.
I am on Windows 11. When using python 3.10 or 3.11, I can't install astroz via `python -m pip install astroz'
I tried this with python 3.10 and 3.11 - same end result. So I set out to build it manually. I downloaded the 0.7.1 zip file. Initially
zig buildfails because it is not able to find zlib.Manually installing zlib and then explicitly telling zig build where to find it solves that problem
But when trying to install, there is an error related to zig not being able to find python311 dynamic library
I explored two possible issues:
-Dpython-lib=python3.11. The library name is actuallypython311without the period-Dpython-include=, but not for library files-Dpython-lib-pathNote that these issues also were present when 'just' installing astroz using pip.
When I issue a build command that explicitly handles the above, I get a compile error:
So then I just cloned the latest version of the repository, and ran the command again:
This is yet again a different error. At this point I decided to submit an issue for it here.
Note: I tried this on Ubuntu22.04 (python 3.10/3.11) and had the same issues with 'installing using pip. When trying to manually build, I do get initial build errors but they go away when I remove line 16 in
bindings/python/pyproject.toml. After that things seem to work as expected.