mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-29 14:13:11 +00:00
Merge branch 'no-six' into next
Remove python3-six dependency
This commit is contained in:
commit
cda1be81e5
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: sudo apt-get update && sudo apt-get install ninja-build libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev python3-mako python3-six
|
run: sudo apt-get update && sudo apt-get install ninja-build libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev gr-osmosdr libpugixml-dev libpcap-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev libmatio-dev googletest protobuf-compiler libprotobuf-dev python3-mako
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cd build && cmake -GNinja ..
|
run: cd build && cmake -GNinja ..
|
||||||
- name: build
|
- name: build
|
||||||
@ -26,7 +26,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: brew install ninja pkg-config hdf5 libtool automake armadillo lapack gflags glog gnuradio log4cpp pugixml protobuf && pip3 install mako && pip3 install six
|
run: brew install ninja pkg-config hdf5 libtool automake armadillo lapack gflags glog gnuradio log4cpp pugixml protobuf && pip3 install mako
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cd build && cmake -GNinja ..
|
run: cd build && cmake -GNinja ..
|
||||||
- name: build
|
- name: build
|
||||||
@ -54,7 +54,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: brew install llvm pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio log4cpp pugixml protobuf && ln -s /usr/local/opt/llvm/bin/clang-tidy /usr/local/bin && ln -s /usr/local/Cellar/llvm/10.*/bin/clang-apply-replacements /usr/local/bin && cp /usr/local/Cellar/llvm/10.*/share/clang/run-clang-tidy.py /usr/local/bin && pip3 install mako && pip3 install six
|
run: brew install llvm pkg-config hdf5 armadillo lapack gflags glog gnuradio libmatio log4cpp pugixml protobuf && ln -s /usr/local/opt/llvm/bin/clang-tidy /usr/local/bin && ln -s /usr/local/Cellar/llvm/10.*/bin/clang-apply-replacements /usr/local/bin && cp /usr/local/Cellar/llvm/10.*/share/clang/run-clang-tidy.py /usr/local/bin && pip3 install mako
|
||||||
- name: Prepare run
|
- name: Prepare run
|
||||||
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.10.0 core_monitor pvt_libs
|
run: cd build && cmake .. && make volk_gnsssdr_module gtest-1.10.0 core_monitor pvt_libs
|
||||||
- name: run clang-tidy
|
- name: run clang-tidy
|
||||||
@ -103,7 +103,7 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install mako six
|
pip install mako
|
||||||
- name: configure
|
- name: configure
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: cd build; cmake -G "Visual Studio 16 2019" ..\src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr
|
run: cd build; cmake -G "Visual Studio 16 2019" ..\src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr
|
||||||
@ -119,7 +119,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: sudo apt-get install build-essential python3-mako python3-six cmake
|
run: sudo apt-get install build-essential python3-mako cmake
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||||
- name: build
|
- name: build
|
||||||
@ -135,7 +135,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: pip3 install mako && pip3 install six
|
run: pip3 install mako
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
run: cd build && cmake ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||||
- name: build
|
- name: build
|
||||||
@ -149,7 +149,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: install dependencies
|
- name: install dependencies
|
||||||
run: pip3 install mako && pip3 install six
|
run: pip3 install mako
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cd build && cmake -GXcode ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
run: cd build && cmake -GXcode ../src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr
|
||||||
- name: build
|
- name: build
|
||||||
|
@ -803,29 +803,36 @@ if(NOT VOLKGNSSSDR_FOUND)
|
|||||||
if(NOT MAKO_FOUND)
|
if(NOT MAKO_FOUND)
|
||||||
message(STATUS "Mako template library not found. See https://www.makotemplates.org/")
|
message(STATUS "Mako template library not found. See https://www.makotemplates.org/")
|
||||||
message(STATUS " You can try to install it by typing:")
|
message(STATUS " You can try to install it by typing:")
|
||||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
|
||||||
message(STATUS " sudo yum install ${PYTHON_NAME}-mako")
|
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
message(STATUS " sudo yum install ${PYTHON_NAME}-mako")
|
||||||
message(STATUS " sudo zypper install ${PYTHON_NAME}-Mako")
|
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||||
else()
|
message(STATUS " sudo zypper install ${PYTHON_NAME}-Mako")
|
||||||
message(STATUS " sudo apt-get install ${PYTHON_NAME}-mako")
|
else()
|
||||||
|
message(STATUS " sudo apt-get install ${PYTHON_NAME}-mako")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
message(FATAL_ERROR "Mako templates required to build VOLK_GNSSSDR")
|
message(FATAL_ERROR "Mako templates required to build VOLK_GNSSSDR")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Six
|
if(PYTHON_NAME STREQUAL "python")
|
||||||
if(NOT SIX_FOUND)
|
# Six
|
||||||
message(STATUS "python-six not found. See https://pythonhosted.org/six/")
|
if(NOT SIX_FOUND)
|
||||||
message(STATUS " You can try to install it by typing:")
|
message(STATUS "python-six not found. See https://pythonhosted.org/six/")
|
||||||
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|kFreeBSD|GNU")
|
||||||
message(STATUS " sudo yum install ${PYTHON_NAME}-six")
|
message(STATUS " You can try to install it by typing:")
|
||||||
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
if(${LINUX_DISTRIBUTION} MATCHES "Fedora" OR ${LINUX_DISTRIBUTION} MATCHES "Red Hat")
|
||||||
message(STATUS " sudo zypper install ${PYTHON_NAME}-six")
|
message(STATUS " sudo yum install ${PYTHON_NAME}-six")
|
||||||
else()
|
elseif(${LINUX_DISTRIBUTION} MATCHES "openSUSE")
|
||||||
message(STATUS " sudo apt-get install ${PYTHON_NAME}-six")
|
message(STATUS " sudo zypper install ${PYTHON_NAME}-six")
|
||||||
|
else()
|
||||||
|
message(STATUS " sudo apt-get install ${PYTHON_NAME}-six")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR")
|
||||||
endif()
|
endif()
|
||||||
message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_GREATER 3.12)
|
if(CMAKE_VERSION VERSION_GREATER 3.12)
|
||||||
set_package_properties(Python3 PROPERTIES
|
set_package_properties(Python3 PROPERTIES
|
||||||
URL "https://www.python.org/"
|
URL "https://www.python.org/"
|
||||||
|
25
README.md
25
README.md
@ -96,7 +96,7 @@ $ sudo apt-get install build-essential cmake git pkg-config libboost-dev libboos
|
|||||||
libboost-serialization-dev liblog4cpp5-dev libuhd-dev gnuradio-dev gr-osmosdr \
|
libboost-serialization-dev liblog4cpp5-dev libuhd-dev gnuradio-dev gr-osmosdr \
|
||||||
libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
|
libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev \
|
||||||
libgnutls-openssl-dev libpcap-dev libmatio-dev libpugixml-dev libgtest-dev \
|
libgnutls-openssl-dev libpcap-dev libmatio-dev libpugixml-dev libgtest-dev \
|
||||||
libprotobuf-dev protobuf-compiler python3-mako python3-six
|
libprotobuf-dev protobuf-compiler python3-mako
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note that the required files from `libgtest-dev` were moved to
|
Please note that the required files from `libgtest-dev` were moved to
|
||||||
@ -115,11 +115,13 @@ the `libmatio-dev` package and install `libtool`, `automake` and `libhdf5-dev`
|
|||||||
instead. A recent version of the library will be downloaded and built
|
instead. A recent version of the library will be downloaded and built
|
||||||
automatically if CMake does not find it installed.
|
automatically if CMake does not find it installed.
|
||||||
|
|
||||||
In distributions older than Ubuntu 16.04 or Debian 9, `python3-mako` and
|
In distributions older than Ubuntu 16.04 or Debian 9, `python3-mako` must be
|
||||||
`python3-six` must be replaced by `python-mako` and `python-six`.
|
replaced by `python-mako`. For Ubuntu 14.04, you will need to add the package
|
||||||
|
`python-six` to the list of dependencies.
|
||||||
|
|
||||||
**Note for Debian 8 "jessie" users:** please see the note about `libmatio-dev`
|
**Note for Debian 8 "jessie" users:** please see the note about `libmatio-dev`
|
||||||
above. Install `libtool`, `automake` and `libhdf5-dev` instead.
|
above. Install `libtool`, `automake` and `libhdf5-dev` instead. You will also
|
||||||
|
need `python-six`.
|
||||||
|
|
||||||
Once you have installed these packages, you can jump directly to
|
Once you have installed these packages, you can jump directly to
|
||||||
[download the source code and build GNSS-SDR](#download-and-build-linux).
|
[download the source code and build GNSS-SDR](#download-and-build-linux).
|
||||||
@ -130,8 +132,8 @@ If you are using Arch Linux:
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ pacman -S gcc make cmake pkgconf git boost boost-libs log4cpp libvolk gnuradio \
|
$ pacman -S gcc make cmake pkgconf git boost boost-libs log4cpp libvolk gnuradio \
|
||||||
blas lapack gflags google-glog openssl pugixml \
|
blas lapack gflags google-glog openssl pugixml libmatio protobuf \
|
||||||
python-mako python-six libmatio libpcap gtest protobuf
|
python-mako libpcap gtest
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you have installed these packages, you can jump directly to
|
Once you have installed these packages, you can jump directly to
|
||||||
@ -166,8 +168,8 @@ $ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel
|
|||||||
boost-date-time boost-system boost-filesystem boost-thread boost-chrono \
|
boost-date-time boost-system boost-filesystem boost-thread boost-chrono \
|
||||||
boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \
|
boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \
|
||||||
blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \
|
blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \
|
||||||
glog-devel openssl-devel libpcap-devel python3-mako python3-six \
|
glog-devel openssl-devel libpcap-devel pugixml-devel python3-mako \
|
||||||
pugixml-devel protobuf-devel protobuf-compiler
|
protobuf-devel protobuf-compiler
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you have installed these packages, you can jump directly to
|
Once you have installed these packages, you can jump directly to
|
||||||
@ -182,7 +184,7 @@ zypper install cmake git gcc-c++ boost-devel libboost_atomic-devel \
|
|||||||
libboost_system-devel libboost_filesystem-devel libboost_chrono-devel \
|
libboost_system-devel libboost_filesystem-devel libboost_chrono-devel \
|
||||||
libboost_thread-devel libboost_serialization-devel log4cpp-devel \
|
libboost_thread-devel libboost_serialization-devel log4cpp-devel \
|
||||||
gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool \
|
gnuradio-devel pugixml-devel libpcap-devel armadillo-devel libtool \
|
||||||
automake hdf5-devel openssl-devel python3-Mako python3-six protobuf-devel
|
automake hdf5-devel openssl-devel python3-Mako protobuf-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are using openSUSE Tumbleweed:
|
If you are using openSUSE Tumbleweed:
|
||||||
@ -193,7 +195,7 @@ zypper install cmake git gcc-c++ boost-devel libboost_atomic-devel \
|
|||||||
libboost_thread-devel libboost_chrono-devel libboost_serialization-devel \
|
libboost_thread-devel libboost_chrono-devel libboost_serialization-devel \
|
||||||
log4cpp-devel gtest gnuradio-devel pugixml-devel libpcap-devel \
|
log4cpp-devel gtest gnuradio-devel pugixml-devel libpcap-devel \
|
||||||
armadillo-devel libtool automake hdf5-devel libopenssl-devel \
|
armadillo-devel libtool automake hdf5-devel libopenssl-devel \
|
||||||
python3-Mako python3-six protobuf-devel
|
python3-Mako protobuf-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you have installed these packages, you can jump directly to
|
Once you have installed these packages, you can jump directly to
|
||||||
@ -739,7 +741,7 @@ $ sudo port selfupdate
|
|||||||
$ sudo port upgrade outdated
|
$ sudo port upgrade outdated
|
||||||
$ sudo port install armadillo cmake gnuradio gnutls lapack libad9361-iio libiio \
|
$ sudo port install armadillo cmake gnuradio gnutls lapack libad9361-iio libiio \
|
||||||
matio pkgconfig protobuf3-cpp pugixml google-glog +gflags
|
matio pkgconfig protobuf3-cpp pugixml google-glog +gflags
|
||||||
$ sudo port install py37-mako py37-six
|
$ sudo port install py37-mako
|
||||||
$ sudo port install doxygen +docs
|
$ sudo port install doxygen +docs
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -781,7 +783,6 @@ $ brew update && brew upgrade
|
|||||||
$ brew install armadillo cmake hdf5 gflags glog gnuradio lapack libmatio log4cpp \
|
$ brew install armadillo cmake hdf5 gflags glog gnuradio lapack libmatio log4cpp \
|
||||||
openssl pkg-config protobuf pugixml
|
openssl pkg-config protobuf pugixml
|
||||||
$ pip3 install mako
|
$ pip3 install mako
|
||||||
$ pip3 install six
|
|
||||||
$ brew cask install mactex # when completed, restart Terminal
|
$ brew cask install mactex # when completed, restart Terminal
|
||||||
$ brew install graphviz doxygen
|
$ brew install graphviz doxygen
|
||||||
```
|
```
|
||||||
|
@ -60,10 +60,11 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
|||||||
endif()
|
endif()
|
||||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
if(IS_PYTHON3 EQUAL -1)
|
||||||
|
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
|
message(STATUS "PYTHON_EXECUTABLE not set - trying by default python3")
|
||||||
message(STATUS "Use -DPYTHON_EXECUTABLE=/path/to/python to build for python 2.7")
|
|
||||||
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9)
|
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6 3.7 3.8 3.9)
|
||||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN3_VERSION})
|
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN3_VERSION})
|
||||||
if(NOT PYTHONINTERP_FOUND)
|
if(NOT PYTHONINTERP_FOUND)
|
||||||
@ -72,7 +73,9 @@ if(CMAKE_VERSION VERSION_LESS 3.12)
|
|||||||
endif()
|
endif()
|
||||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
if(PYTHON_VERSION_STRING VERSION_LESS "3.0")
|
||||||
|
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
find_package(Python3 COMPONENTS Interpreter)
|
find_package(Python3 COMPONENTS Interpreter)
|
||||||
@ -81,9 +84,8 @@ else()
|
|||||||
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
||||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
|
||||||
endif()
|
endif()
|
||||||
if(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND)
|
if(NOT Python3_FOUND OR NOT MAKO_FOUND)
|
||||||
find_package(Python2 COMPONENTS Interpreter)
|
find_package(Python2 COMPONENTS Interpreter)
|
||||||
if(Python2_FOUND)
|
if(Python2_FOUND)
|
||||||
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE})
|
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE})
|
||||||
@ -97,7 +99,9 @@ else()
|
|||||||
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
find_package(PythonInterp ${GNSSSDR_PYTHON_MIN_VERSION})
|
||||||
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
gnsssdr_python_check_module("python >= ${GNSSSDR_PYTHON_MIN_VERSION}" sys "sys.version.split()[0] >= '${GNSSSDR_PYTHON_MIN_VERSION}'" PYTHON_MIN_VER_FOUND)
|
||||||
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
gnsssdr_python_check_module("mako >= ${GNSSSDR_MAKO_MIN_VERSION}" mako "mako.__version__ >= '${GNSSSDR_MAKO_MIN_VERSION}'" MAKO_FOUND)
|
||||||
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
if(PYTHON_VERSION_STRING VERSION_LESS "3.0")
|
||||||
|
gnsssdr_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -20,6 +20,7 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
|
|||||||
|
|
||||||
- The software can now be built against the GNU Radio 3.9 API that uses C++11
|
- The software can now be built against the GNU Radio 3.9 API that uses C++11
|
||||||
smart pointers instead of Boost smart pointers.
|
smart pointers instead of Boost smart pointers.
|
||||||
|
- Remove python six module as a dependency if using Python 3.x.
|
||||||
|
|
||||||
### Improvements in Portability:
|
### Improvements in Portability:
|
||||||
|
|
||||||
|
@ -228,10 +228,12 @@ endif()
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
include(VolkPython) # sets PYTHON_EXECUTABLE and PYTHON_DASH_B
|
include(VolkPython) # sets PYTHON_EXECUTABLE
|
||||||
volk_python_check_module("python >= 2.7" sys "sys.version.split()[0] >= '2.7'" PYTHON_MIN_VER_FOUND)
|
volk_python_check_module("python >= 2.7" sys "sys.version.split()[0] >= '2.7'" PYTHON_MIN_VER_FOUND)
|
||||||
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||||
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
if(Python2_VERSION OR (PYTHON_VERSION_STRING VERSION_LESS "3.0"))
|
||||||
|
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT PYTHON_MIN_VER_FOUND)
|
if(NOT PYTHON_MIN_VER_FOUND)
|
||||||
message(FATAL_ERROR "Python 2.7 or greater required to build VOLK_GNSSSDR")
|
message(FATAL_ERROR "Python 2.7 or greater required to build VOLK_GNSSSDR")
|
||||||
@ -241,9 +243,12 @@ endif()
|
|||||||
if(NOT MAKO_FOUND)
|
if(NOT MAKO_FOUND)
|
||||||
message(FATAL_ERROR "Mako templates required to build VOLK_GNSSSDR")
|
message(FATAL_ERROR "Mako templates required to build VOLK_GNSSSDR")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Six
|
# Six
|
||||||
if(NOT SIX_FOUND)
|
if(Python2_VERSION OR (PYTHON_VERSION_STRING VERSION_LESS "3.0"))
|
||||||
message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK")
|
if(NOT SIX_FOUND)
|
||||||
|
message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,14 +78,15 @@ else()
|
|||||||
if(Python3_FOUND)
|
if(Python3_FOUND)
|
||||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||||
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
||||||
|
set(PYTHON_VERSION_STRING ${Python3_VERSION})
|
||||||
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||||
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
|
||||||
endif()
|
endif()
|
||||||
if(NOT Python3_FOUND OR NOT MAKO_FOUND OR NOT SIX_FOUND)
|
if(NOT Python3_FOUND OR NOT MAKO_FOUND)
|
||||||
find_package(Python2 COMPONENTS Interpreter)
|
find_package(Python2 COMPONENTS Interpreter)
|
||||||
if(Python2_FOUND)
|
if(Python2_FOUND)
|
||||||
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE})
|
set(PYTHON_EXECUTABLE ${Python2_EXECUTABLE})
|
||||||
set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR})
|
set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR})
|
||||||
|
set(PYTHON_VERSION_STRING ${Python2_VERSION})
|
||||||
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
volk_python_check_module("mako >= 0.4.2" mako "mako.__version__ >= '0.4.2'" MAKO_FOUND)
|
||||||
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
volk_python_check_module("six - python 2 and 3 compatibility library" six "True" SIX_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
@ -10,9 +10,10 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
import sys
|
||||||
import six
|
if sys.version_info[0] < 3:
|
||||||
|
import six
|
||||||
|
|
||||||
archs = list()
|
archs = list()
|
||||||
arch_dict = dict()
|
arch_dict = dict()
|
||||||
|
|
||||||
@ -75,8 +76,9 @@ for arch_xml in archs_xml:
|
|||||||
name = flag_xml.attributes["compiler"].value
|
name = flag_xml.attributes["compiler"].value
|
||||||
if name not in flags: flags[name] = list()
|
if name not in flags: flags[name] = list()
|
||||||
flags[name].append(flag_xml.firstChild.data)
|
flags[name].append(flag_xml.firstChild.data)
|
||||||
#force kwargs keys to be of type str, not unicode for py25
|
if sys.version_info[0] < 3:
|
||||||
kwargs = dict((str(k), v) for k, v in six.iteritems(kwargs))
|
#force kwargs keys to be of type str, not unicode for py25
|
||||||
|
kwargs = dict((str(k), v) for k, v in six.iteritems(kwargs))
|
||||||
register_arch(flags=flags, checks=checks, **kwargs)
|
register_arch(flags=flags, checks=checks, **kwargs)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
#
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import six
|
from __future__ import print_function
|
||||||
|
import sys
|
||||||
|
if sys.version_info[0] < 3:
|
||||||
|
import six
|
||||||
|
|
||||||
from volk_gnsssdr_arch_defs import arch_dict
|
from volk_gnsssdr_arch_defs import arch_dict
|
||||||
|
|
||||||
@ -28,7 +30,7 @@ class machine_class(object):
|
|||||||
self.archs.append(arch)
|
self.archs.append(arch)
|
||||||
self.arch_names.append(arch_name)
|
self.arch_names.append(arch_name)
|
||||||
self.alignment = max([a.alignment for a in self.archs])
|
self.alignment = max([a.alignment for a in self.archs])
|
||||||
|
|
||||||
def __repr__(self): return self.name
|
def __repr__(self): return self.name
|
||||||
|
|
||||||
def register_machine(name, archs):
|
def register_machine(name, archs):
|
||||||
@ -64,7 +66,8 @@ for machine_xml in machines_xml:
|
|||||||
except: pass
|
except: pass
|
||||||
kwargs['archs'] = kwargs['archs'].split()
|
kwargs['archs'] = kwargs['archs'].split()
|
||||||
#force kwargs keys to be of type str, not unicode for py25
|
#force kwargs keys to be of type str, not unicode for py25
|
||||||
kwargs = dict((str(k), v) for k, v in six.iteritems(kwargs))
|
if sys.version_info[0] < 3:
|
||||||
|
kwargs = dict((str(k), v) for k, v in six.iteritems(kwargs))
|
||||||
register_machine(**kwargs)
|
register_machine(**kwargs)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user