Better support of output directories
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 59
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
I think what this function is really trying to achieve is to ensure that object filenames are stored somewhere in the "output_dir", even if the source files are indicated by an absolute path. According to the docs, the files should be stored relative to their originally specified path in the output dir, but that example only considers relative paths. And to make matters worse, the default output dir is "", meaning the current working directory.
I think three things need to happen:
- Remove the deprecation warning.
- Instead of simply replacing an absolute path with a relative one, calculate the best path relative to the output dir (so a temp path doesn't appear twice).
- If an output dir is not specified, the output dir should default to the dir where the source file is found.
Originally posted by @jaraco in https://github.com/pypa/distutils/issues/169#issuecomment-1221587630
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documented function in distutils/ccompiler.py and inspect how absolute source paths and output_dir are handled. The work is done when paths are calculated relative to the output directory without duplicating temporary components, and an unspecified output directory defaults to the source file's directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100