diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-17 04:02:31 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-17 04:06:33 +0200 |
commit | 4e8d6eec5cef0fdba861ba6d29ee59b09631c296 (patch) | |
tree | 235a646266bbb99e46f37c867370b6ba0cd99c25 | |
parent | 726b58dcfbbdfc95ae0872e20a2f6066ce37fed2 (diff) |
setup.py: don't install py3 scripts with python2
If one calls 'python2 setup.py install', python replaces the script shebangs
with python2 ones, regardless of the code being mint python3, and vice versa.
In setup.py, name only the scripts that match the current python version.
Change-Id: I84a5c8ec108a99f527b0d2fb5bf4e312df5f7403
-rwxr-xr-x | setup.py | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -17,15 +17,20 @@ from distutils.core import setup from osmopy import __version__ +import sys + +if sys.version_info.major == 2: + scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", + "osmopy/osmotestvty.py"] +elif sys.version_info.major == 3: + scripts = ["osmopy/osmo_verify_transcript_vty.py", + "osmopy/osmo_verify_transcript_ctrl.py"] setup( name = 'osmopython', version = __version__, packages = ["osmopy"], - scripts = ["osmopy/osmodumpdoc.py", "osmopy/osmotestconfig.py", - "osmopy/osmotestvty.py", - "osmopy/osmo_verify_transcript_vty.py", - "osmopy/osmo_verify_transcript_ctrl.py"], + scripts = scripts, license = "AGPLv3", description = "Osmopython: osmocom testing scripts", author = "Katerina Barone-Adesi", |