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
When enabling Python API during the source build, the post-build event trigger fails to properly build/copy the Python API files & libraries.
2>Including packages in pyuhd: []
2>E:\Python\Python311\envs\main\Lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
2>!!
2>
2> ********************************************************************************
2> Please avoid running ``setup.py`` directly.
2> Instead, use pypa/build, pypa/installer or other
2> standards-based tools.
2>
2> See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
2> ********************************************************************************
2>
2>!!
2> self.initialize_options()
2>E:\Python\Python311\envs\main\Lib\site-packages\setuptools\_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
2>!!
2>
2> ********************************************************************************
2> Please avoid running ``setup.py`` and ``easy_install``.
2> Instead, use pypa/build, pypa/installer or other
2> standards-based tools.
2>
2> See https://github.com/pypa/setuptools/issues/917 for details.
2> ********************************************************************************
2>
2>!!
2> self.initialize_options()
2>EXEC : warning : install_lib: 'build\lib' does not exist -- no Python modules to install
2>Done building project "INSTALL.vcxproj".
========== Build: 2 succeeded, 0 failed, 139 up-to-date, 0 skipped ==========
========== Build started at 5:51 pm and took 01.433 seconds ==========
Note that the build is considered to have succeeded, but no UHD related .py files / libraries will actually be installed.
Setup Details
Source for 4.5.0.0 downloaded directly from 'Releases' page.
CMake 3.27.7
Python 3.11 (Virtual environment)
Visual Studio 2022
Windows 10
Expected Behavior
UHD python libraries are installed properly into the virtual environment (or somewhere at least).
Actual Behaviour
Error manifests as only a warning as above. See Additional Information for my hotfix.
Steps to reproduce the problem
Source for 4.5.0.0 downloaded directly from 'Releases' page.
Build with Python API enabled.
Additional Information
The fix in this case was to simply run the post-build event myself. As seen in host\build\python\cmake_install.cmake, which is run as part of the post-build event, it tries to do
The outermost INSTALL.vcxproj attempts to do this from the outermost host\build folder. I stepped into the host\build\python folder (where there is a build\lib folder containing the .py files & libs), and then ran the above command again. This worked and successfully wrote a uhd folder into my E:\Python\Python311\envs\main\Lib\site-packages\uhd-4.5.0-py3.11.egg folder.
I suspect the outermost INSTALL.vcxproj is not correctly stepping down into the subfolder before running the command.
However, this doesn't fix everything. Attempts to import uhd are met with
The fix for this was to manually copy host\build\python\uhd\libpyuhd.pyd into my E:\Python\Python311\envs\main\Lib\site-packages\uhd-4.5.0-py3.11.egg folder. I am not sure what went wrong along the builds for this to not have been copied into the host\build\python\build\lib\uhd folder like the rest of the .py files.
Need a fix to properly run the setup.py file in the python subfolder so that it actually installs to site-packages.
I suggest also reworking the build to no longer use setup.py install as it is already deprecated.
The text was updated successfully, but these errors were encountered:
My workaround is to change line 32 from 'uhd': ['*.so'], to 'uhd': ['*.so', '../path/to/Release/libpyuhd.pyd'], so that libpyuhd.pyd is installed into site-packages.
Issue Description
When enabling Python API during the source build, the post-build event trigger fails to properly build/copy the Python API files & libraries.
Note that the build is considered to have succeeded, but no UHD related .py files / libraries will actually be installed.
Setup Details
Source for 4.5.0.0 downloaded directly from 'Releases' page.
CMake 3.27.7
Python 3.11 (Virtual environment)
Visual Studio 2022
Windows 10
Expected Behavior
UHD python libraries are installed properly into the virtual environment (or somewhere at least).
Actual Behaviour
Error manifests as only a warning as above. See Additional Information for my hotfix.
Steps to reproduce the problem
Source for 4.5.0.0 downloaded directly from 'Releases' page.
Build with Python API enabled.
Additional Information
The fix in this case was to simply run the post-build event myself. As seen in
host\build\python\cmake_install.cmake
, which is run as part of the post-build event, it tries to doThe outermost
INSTALL.vcxproj
attempts to do this from the outermosthost\build
folder. I stepped into thehost\build\python
folder (where there is abuild\lib
folder containing the .py files & libs), and then ran the above command again. This worked and successfully wrote auhd
folder into myE:\Python\Python311\envs\main\Lib\site-packages\uhd-4.5.0-py3.11.egg
folder.I suspect the outermost
INSTALL.vcxproj
is not correctly stepping down into the subfolder before running the command.However, this doesn't fix everything. Attempts to
import uhd
are met withThe fix for this was to manually copy
host\build\python\uhd\libpyuhd.pyd
into myE:\Python\Python311\envs\main\Lib\site-packages\uhd-4.5.0-py3.11.egg
folder. I am not sure what went wrong along the builds for this to not have been copied into thehost\build\python\build\lib\uhd
folder like the rest of the.py
files.Then the consequent error from
import uhd
becamewhich is solved on Windows by doing the standard
where my
uhd.dll
file is.I suggest also reworking the build to no longer use
setup.py install
as it is already deprecated.The text was updated successfully, but these errors were encountered: