Change in libosmocore[master]: Don't enforce Python 2 for utilities

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Mon Jul 2 13:38:41 UTC 2018


Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/9818


Change subject: Don't enforce Python 2 for utilities
......................................................................

Don't enforce Python 2 for utilities

The conv_gen.py utility was tested against both Python 2 and 3,
so there is no need to enforce Python 2. Also, having:

  #!/usr/local/bin/python{2|3}

is a bad idea, because Python may be installed in a different location.

Change-Id: I6007d481047b584db13d6eda70fb99f11f9ddaa1
---
M include/Makefile.am
M src/gsm/Makefile.am
M tests/Makefile.am
M utils/conv_codes_gsm.py
M utils/conv_gen.py
5 files changed, 6 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/9818/1

diff --git a/include/Makefile.am b/include/Makefile.am
index 27a4090..38ba14c 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -162,7 +162,7 @@
 	$(AM_V_GEN)sed -e's/XX/$*/g' $< > $@
 
 osmocom/gsm/gsm0503.h: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py
-	$(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py gen_header gsm \
+	$(AM_V_GEN)python $(top_srcdir)/utils/conv_gen.py gen_header gsm \
 		--target-path $(builddir)/osmocom/gsm
 
 CLEANFILES = osmocom/gsm/gsm0503.h
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index 0439ce6..5387e3a 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -47,6 +47,6 @@
 
 # Convolutional codes generation
 gsm0503_conv.c: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py
-	$(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py gen_codes gsm
+	$(AM_V_GEN)python $(top_srcdir)/utils/conv_gen.py gen_codes gsm
 
 CLEANFILES = gsm0503_conv.c
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 70b5cb8..db4e520 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -280,5 +280,5 @@
 	mv $@.tmp $@
 
 conv/gsm0503_test_vectors.c: $(top_srcdir)/utils/conv_gen.py $(top_srcdir)/utils/conv_codes_gsm.py
-	$(AM_V_GEN)python2 $(top_srcdir)/utils/conv_gen.py gen_vectors gsm \
+	$(AM_V_GEN)python $(top_srcdir)/utils/conv_gen.py gen_vectors gsm \
 		--target-path $(builddir)/conv
diff --git a/utils/conv_codes_gsm.py b/utils/conv_codes_gsm.py
index eeed4fd..ec77660 100644
--- a/utils/conv_codes_gsm.py
+++ b/utils/conv_codes_gsm.py
@@ -1,5 +1,6 @@
-#!/usr/bin/python2
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
+
 from conv_gen import ConvolutionalCode
 from conv_gen import poly
 
diff --git a/utils/conv_gen.py b/utils/conv_gen.py
index 6b6b267..06283d8 100644
--- a/utils/conv_gen.py
+++ b/utils/conv_gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2
+#!/usr/bin/env python
 
 mod_license = """
 /*

-- 
To view, visit https://gerrit.osmocom.org/9818
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6007d481047b584db13d6eda70fb99f11f9ddaa1
Gerrit-Change-Number: 9818
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180702/b7d74e98/attachment.htm>


More information about the gerrit-log mailing list