-
Notifications
You must be signed in to change notification settings - Fork 187
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
How to build & install SoapySDR on Windows? #446
Comments
BUMP How do install the python package after compilation? Seem #442 could be of interest as well. |
Ok, managed to build the optional Sort of works...but need more testing. (How?) Does anyone, know how I can test this? |
rx_sdr from https://github.com/rxseger/rx_tools should work as test tool for any SoapySDR module. |
They don't have any binary releases and the compile fails. 💩 |
BTW. Where exactly is the code that does the Python package installation? |
SoapySDR/swig/python/CMakeLists.txt Lines 137 to 145 in 6e99da1
|
@zuckschwerdt How and where do I do |
I don't think that SoapySDR is on pypi, so no |
That's not how it works AFAIK. So how would you import into your python code? If it's not available by the package manager, you can't import (as you suggest in all the example code), with If it's not in pypi, you would (typically) just go to the project directory and do |
I didn't write any (Python) example code, sorry. I never used the Python bindings. To my understanding you can either install a package from a registry (pypi) or local source (setup.py) -- or just dump the files somewhere into Python's search path. |
I can't find this in pypi (as you said). |
To put the python packages into the search path? There is also a registry way to add to the path, example: |
Hi Josh! @guruofquality Thank you. I see that you are using HKLM to query paths, but I don't have any Python in that branch, my Python branch is located in HKCU. (And TBH IDK why that is. I surely installed to be available for the entire machine.) There is also a registry entry called get_filename_component(PYTHON3_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${PYTHON3_VERSION}\\InstallPath]" ABSOLUTE)
...
set(PYTHON3_INCLUDE_DIR ${PYTHON3_ROOT}/include)
set(PYTHON3_LIBRARY ${PYTHON3_ROOT}/libs/python${PYTHON3_VERSION_NO_DOT}.lib)
set(PYTHON3_INSTALL_DIR lib/python${PYTHON3_VERSION}/site-packages) So a few things here, right away.
So this means that I should have: PYTHON_ROOT='C:\lang\Python312'
PYTHON_INCLUDE_DIR='C:\lang\Python312\include' # These are private Python distro includes.
PYTHON_LIBRARY='C:\lang\Python312\libs\python312.lib' # Not the "python3.lib" or "_tkinter.lib"
PYTHON_INSTALL_DIR='C:\lang\Python312\site-packages' # Where pip packages go... However, the middle 2 should not be relevant at all, as nothing should ever be put there, unless they are used for the compilation process, which is not clear at all from any of your CMake files. Then we have:
For simplicity let's call the files: So AFAIK, in order to be able to use a statement like
class SoapySDR:
def __init__(self, config_file=None):
config_file = Path(config_file) if config_file is not None else None
self.config = Configuration(config_file)
...
from packagename import SoapySDR
...
if __name__ == "__main__":
print("The Main code starts here...") It doesn't seem we have any such Class, or function... |
Looking at the page:
https://github.com/pothosware/SoapySDR/wiki/BuildGuide
Say that:
But:
cmake --build my_build_dir --config Release --target install
actually installs into the x86 directory:
C:\Program Files (x86)\SoapySDR
How to build SoapySDR on Windows?
What is the optional
swig
dependency used for?(How should that be installed?)
I also suggest to fix these to prevent deprecation warnings:
# grep "cmake_minimum_required" CMakeLists.txt ExampleDriver/CMakeLists.txt:5:cmake_minimum_required(VERSION 2.6) luajit/CMakeLists.txt:4:cmake_minimum_required(VERSION 3.1.0) swig/csharp/apps/CMakeLists.txt:1:cmake_minimum_required(VERSION 3.3.0) swig/python/CMakeLists.txt:4:cmake_minimum_required(VERSION 3.3) CMakeLists.txt:4:cmake_minimum_required(VERSION 3.3.0)
The text was updated successfully, but these errors were encountered: