Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / opensfm / fix-scripts.patch
blob634820a3275580f5debc41459b98f54c0d3e6e27
1 diff --git a/bin/opensfm b/bin/opensfm
2 index b5ee4b15..f05c0d1c 100755
3 --- a/bin/opensfm
4 +++ b/bin/opensfm
5 @@ -1,12 +1,6 @@
6 -#!/bin/bash
7 +#!/usr/bin/env bash
8 set -e
10 DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
12 -if [ -x "$(command -v python3)" ]; then
13 - PYTHON=python3
14 -else
15 - PYTHON=python
16 -fi
18 -"$PYTHON" "$DIR"/opensfm_main.py "$@"
19 +exec "$DIR"/opensfm_main.py "$@"
20 diff --git a/bin/opensfm_main.py b/bin/opensfm_main.py
21 index 31249e12..cc71560c 100755
22 --- a/bin/opensfm_main.py
23 +++ b/bin/opensfm_main.py
24 @@ -1,3 +1,5 @@
25 +#!/usr/bin/env python
27 import sys
28 from os.path import abspath, join, dirname
30 diff --git a/setup.py b/setup.py
31 index 1120717f..438a16db 100644
32 --- a/setup.py
33 +++ b/setup.py
34 @@ -71,6 +71,7 @@ setuptools.setup(
35 scripts=[
36 "bin/opensfm_run_all",
37 "bin/opensfm",
38 + "bin/opensfm_main.py",
40 package_data={
41 "opensfm": [