Commit graph

17 commits

Author SHA1 Message Date
erickshepherdNI
ebb06c983a python: Included complex.h to allow pybind to convert that data type 2019-11-01 16:35:33 -07:00
Martin Braun
f83faf28b3 cmake: Remove ENABLE_PYTHON3 flag and simplify Python detection
- Makes use of more modern find_package(Python2/3) if available
- Moves almost all Python-related code to UHDPython.cmake
- ENABLE_PYTHON3 is no longer necessary
2019-05-24 14:17:13 -07:00
Martin Braun
422b55f2bf cmake: python: Remove stray message() 2019-05-21 09:40:05 -07:00
Brent Stapleton
f258d72e25 python: change CMake variable for library ext
Changing the CMake variable used in determining the extension of the 
Python API library for better cross-platform support.

Specifically, `CMAKE_SHARED_MODULE_SUFFIX` corresponds to .so for *nix
and MacOS, which is the extension Python expects.
2019-03-06 16:01:10 -08:00
Trung Tran
1dbc0229b7 python: cmake: Use native format for setup.py
setuptools isn't compatible with Unix style path on Windows 10
machines. We need to convert any path before running setuptools.

Signed-off-by: Trung Tran <trung.tran@ettus.com>
2019-02-25 15:20:47 -08:00
Martin Braun
692ddc71b1 python: Replace Boost.Python with PyBind11
This does not change the Python API itself, but it is still
a significant change. Most importantly, it removes the dependency on
Boost.Python.
2019-02-22 16:56:52 -08:00
Brent Stapleton
32457928dd python: Add sync source to Python API
Exposing getters, setters, and options for multi_usrp sync source.
2018-11-29 09:50:02 -08:00
Brent Stapleton
388bc5229f python: adding device_addr_t to Python API
Add support for device_addr_t to the Python API. Most functions are
exposed normally. The main exception is the constructor from a map of
strings, which is replaced by a factory function called
`make_device_addr`.
2018-11-14 18:01:51 -08:00
Martin Braun
a69ab0c23a cmake: Update coding style to use lowercase commands
Also updates our coding style file.

Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code (with GNU compliant sed):

cmake --help-command-list | grep -v "cmake version" | while read c; do
  echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done > convert.sed \
&& git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' \
'*CMakeLists.txt' | xargs -0 gsed -i -f convert.sed && rm convert.sed

(Make sure the backslashes don't get mangled!)
2018-11-14 14:10:09 -08:00
Marcus Müllr
89eac133ea python: Fixing Boost.Python initializer visibility
With Boost 1.64 to 1.65 (which, of course, Ubuntu LTS ships), the
`PyInit_Libraryname` are invisible when one sets the default visibility
to "hidden" (which is reasonable, and which we do).
2018-08-03 16:26:33 -07:00
Trung Tran
9805775200 uhd: python: CMakeLists.txt change dll to pyd
To support python api installer
2018-08-01 17:35:40 -07:00
Brent Stapleton
508023e0c7 python: Fixup for Python API install directory
The Python API should now be installed to
    `PREFIX/lib/pythonVER/dist-packages/uhd`
where the PREFIX is set by CMake and the Python version is determined
by the Python module `distutils`. This should match user expectations
much more than the previous behavior.

Behavior in Virtualenvs is unchanged.
2018-07-27 11:07:19 -07:00
Trung Tran
04987da515 cmake: add support to make python api installer on windows 2018-07-13 11:45:41 -07:00
Vidush
11074ebcb4 Python: Remove Unnecessary Metadata Assignment 2018-06-20 19:02:32 -05:00
Thibaud Marazano
dc5b37126e python: removing unnecessary configuration
Removed "set_tx_rate" that sets all channels initially, because the
channel loop handles this.

Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
2018-06-20 19:02:32 -05:00
Paul David
e74cf7635b python: Separating exposed Python data structures
- Separating exposed Python data structures into logical sections
- Exposes all of the multi_usrp API
- Adds a layer of Python for documentation and adding helper methods
- Adds improvements and fixes to the MultiUSRP object
- Includes additional exposed data structures (like time_spec_t, etc.)
- Add code to release the Python GIL during long C++ calls
2018-06-20 19:02:32 -05:00
Andrej Rode
22e24497a5 python: Initial commit of Python API
Initial commit of the Python API using Boost.Python. Bind the
MultiUSRP API for use in Python. Bindings intended to provide as
complete coverage as possible.
- Wrap most multi_usrp calls
- Adding multi channel send/recv examples in examples/python
- Adding setuptools support
- Initial attempt at binding the UHD types and filters
2018-06-20 19:02:32 -05:00