Skip to content

Commit b095aa9

Browse files
committed
Use more compatible hashbangs
This adds a #! line to the top of setup.py, because it is a script with the executable bit set. Although neither recent nor current documentation in the project recommends to run "./setup.py", this should probably have the intuitive effect of attempting to run the script with a Python interpreter rather than a Unix-style shell. It also uses the "env trick" in init-tests-after-clone.sh so that script runs with whatever bash interpreter is found in a normal PATH search. While "sh" is expected to be found in /bin on all Unix-like systems, that is not always the case for "bash". This change slightly improves compatibility by supporting systems that don't ship with bash but on which it has been installed.
1 parent 72e48aa commit b095aa9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

init-tests-after-clone.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash
2+
3+
set -e
24

35
if [[ -z "$TRAVIS" ]]; then
4-
read -p "This operation will destroy locally modified files. Continue ? [N/y]: " answer
6+
read -rp "This operation will destroy locally modified files. Continue ? [N/y]: " answer
57
if [[ ! $answer =~ [yY] ]]; then
68
exit 2
79
fi
@@ -13,4 +15,4 @@ git reset --hard HEAD~1
1315
git reset --hard HEAD~1
1416
git reset --hard HEAD~1
1517
git reset --hard __testing_point__
16-
git submodule update --init --recursive
18+
git submodule update --init --recursive

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env python
2+
13
from typing import Sequence
24
from setuptools import setup, find_packages
35
from setuptools.command.build_py import build_py as _build_py

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy