-
Notifications
You must be signed in to change notification settings - Fork 26
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
Provide more CMake flags to customize behaviour #16
Conversation
a89da5a
to
7d31418
Compare
7d31418
to
37c0b78
Compare
Supercede #13 |
79ccee6
to
6de9c39
Compare
6de9c39
to
b79e368
Compare
use_system_packages=True, | ||
python=find_executable('python3') if args.python3 else find_executable('python2'), | ||
use_system_packages=args.use_system_packages, | ||
python=find_executable('python' + args.python_version), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading the docs right, find_executable
will return None
if you ask for a non-existent version of python (say, someone types it wrong or messes up dependencies for a future development version). While the default value for the python
kwarg here is None, it doesn't look like Deployment handles that case at all -- it'll blindly attempt to call subprocess on [None, "-m", "venv"]
, which I doubt will return a clean error. It's probably worth checking whether this returns None
and warning the user appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, good call
@@ -17,14 +17,27 @@ | |||
# You should have received a copy of the GNU General Public License | |||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
function(catkin_generate_virtualenv) | |||
cmake_parse_arguments(ARG "PYTHON3" "" "" ${ARGN}) | |||
set(oneValueArgs PYTHON_VERSION_MAJOR USE_SYSTEM_PACKAGES ISOLATE_REQUIREMENTS) | |||
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"${multiValueArgs}"
is just being explicit/future-proofing, or are you missing some args?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just being explicit that that's what cmake_parse_argument expects. Undefined args get subbed as "".
Add support for: