Skip to content
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

Add hash-bangs to Python executables in src/etc #12129

Closed
wants to merge 1 commit into from
Closed

Add hash-bangs to Python executables in src/etc #12129

wants to merge 1 commit into from

Conversation

eliovir
Copy link
Contributor

@eliovir eliovir commented Feb 9, 2014

No description provided.

@@ -1,3 +1,5 @@
#!/usr/bin/env python
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script is called via Makefile at: mk/tests.mk:264

@adrientetar
Copy link
Contributor

Is it needed to add shebang-lines to files that are called by Makefiles?

@eliovir
Copy link
Contributor Author

eliovir commented Feb 9, 2014

I did this change because on Gentoo one of these files is called directly and all of them are executable.
For me, executable files are called directly, without using python executable as it is it done in the Makefiles you quoted. I was not aware of their use in Makefiles as script called by python binary.

So, I think : if my changes are not useful (because it can be a change only for Gentoo overlay), executable property must be remove.

@omasanori
Copy link
Contributor

hi, I did call get-snapshot.py directly in a Gentoo overlay. Latest ebuilds works without shebang, so layman -s rust will fix the problem (if you use layman to introduce gentoo-rust).

BTW, +1 to removing executable bits from those scripts. The x bit leads to confusion if the script can't call directly.

@eliovir
Copy link
Contributor Author

eliovir commented Feb 9, 2014

Nice, overlay is already updated! Thanks @omasanori to make me aware of this.

@alexcrichton
Copy link
Member

I think we should remove all the executable bits and make sure that the makefiles are always using CFG_PYTHON when calling these scripts.

@brson
Copy link
Contributor

brson commented Feb 10, 2014

Do these additional suggestions for how we should deal with python scripts mean we should not add the shebangs?

@alexcrichton
Copy link
Member

Closing due to a lack of activity, but feel free to reopen with a rebase!

flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 25, 2024
Fix suggestion for `map_clone` lint on types implementing `Copy`

Follow-up of rust-lang/rust-clippy#12104.

It was missing this check to suggest the correct method.

r? `@llogiq`

changelog: Fix suggestion for `map_clone` lint on types implementing `Copy`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants