-
Notifications
You must be signed in to change notification settings - Fork 99
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
Write a temporary setup.cfg to override any system distutils configuration #18
Conversation
…ation Previously, shiv could not install packages that did not provide wheels using Homebrew's Pythons, because `--target` is incompatible with Homebrew's `distutils.cfg`. We can work around that by creating a `setup.cfg` in the same directory we run `pip install` containing: ```ini [install] prefix= ``` Fixes #16.
Pull Request Test Coverage Report for Build 30
💛 - Coveralls |
src/shiv/cli.py
Outdated
# breaks `pip install --target` with any non-wheel packages. We can | ||
# work around that by creating a setup.cfg specifying an empty prefix | ||
# in the directory we run `pip install` from. | ||
with Path(working_path, "setup.cfg").open('w') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a better place for this would be in clean_pip_env()
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that’s exactly what i was going to suggest! makes perfect sense there
Done! Once it was in |
thanks so much @rouge8 ! |
@rouge8 heads up, I added a commit after this PR merged because I noticed that I was unable to create a shiv from a project dir (e.g. The commit is a2ad1bc and while it works, it is a little scary to be stomping on existing |
ooof. I wonder if there's a straightforward way to determine if an argument is a path, and if so convert it to an absolute path 😕 |
yo! that's a great idea... PR incoming |
Previously, shiv could not install packages that did not provide wheels using Homebrew's Pythons, because
--target
is incompatible with Homebrew'sdistutils.cfg
. We can work around that by creating asetup.cfg
in the same directory we runpip install
containing:Fixes #16.