Skip to content

chore: remove the shebang from setup.py - #180

Open
ARYAMANN7279 wants to merge 1 commit into
scikit-hep:masterfrom
ARYAMANN7279:fix/setup-py-shebang
Open

ARYAMANN7279 wants to merge 1 commit into
scikit-hep:masterfrom
ARYAMANN7279:fix/setup-py-shebang

Conversation

@ARYAMANN7279

Copy link
Copy Markdown

The pre-commit.ci autoupdate in #175 fails in the ruff hook with:

EXE001 Shebang is present but file is not executable
 --> setup.py:1:1
1 | #!/usr/bin/env python

setup.py is not an executable file and is not run directly, so the shebang line is not needed. This removes it, and the check no longer applies to it. It is the only change.

I could not reproduce the error locally: ruff skips this rule when it runs under WSL, which is what I use. The failing log is the one from the Format job of #175 (ruff-pre-commit v0.17.1). With the older pinned ruff (0.15.16) the file passes before and after.

setup.py is not an executable file, and newer versions of ruff report
the shebang as EXE001 (Shebang is present but file is not executable),
which makes the pre-commit autoupdate fail.
@henryiii

Copy link
Copy Markdown
Member

Seems fine, but why are we using setuptools here, maybe we could followup and move to something else?

@ARYAMANN7279

Copy link
Copy Markdown
Author

Thanks. I don't see a reason to keep it, it is just the old layout (setup.cfg + setup.py + setuptools_scm). I can follow up with a separate PR that moves it to pyproject.toml with hatchling and hatch-vcs like the other Scikit-HEP packages, if you want that. Happy to leave this one as it is so the pre-commit.ci PR can go through.

This branch has not been deployed

No deployments
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.

2 participants