pytorch / pytorch/vision

Wrong code in setup.py: it assumes that it is Windows if it's not linux or darwin

Open
#8,716 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🐛 Describe the bug

This line assumes that the system is Windows which is wrong.

It should properly compare sys.platform with "windows" and then the "else" clause should issue a proper error message, for example:

else:
    raise f'Unsupported platform: {sys.platform}'

FYI: There are systems other than linux, darwin and windows.

Versions

0.20.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at setup.py line 222 and inspect how sys.platform selects the platform-specific setup behavior. Verify the supported-platform branches and run the setup or packaging checks available in the repository. Done means unsupported platforms receive an explicit error while existing supported-platform behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.