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

Optionally use existing installations of tools #104

Closed
altendky opened this issue Sep 23, 2018 · 7 comments · Fixed by #974
Closed

Optionally use existing installations of tools #104

altendky opened this issue Sep 23, 2018 · 7 comments · Fixed by #974

Comments

@altendky
Copy link
Contributor

https://github.com/joerick/cibuildwheel/blob/9372e37b1886be448ca6b67a14dc6708657ac4a8/README.md#L35

It will try to install packages globally; this is no good.

I haven't looked and this isn't any priority for me but... couldn't this installation be optional? I might tend towards having it disabled by default but I get there will be arguments both ways.

@joerick
Copy link
Contributor

joerick commented Sep 23, 2018

Well, on Mac, cibuildwheel installs MacPython, and upgrades setuptools, wheel, delocate globally (not in a virtualenv). On Windows it assumes the existence of the interpreters, but still installs things like pip, setuptools globally.

What would the use-case be for disabling these installs? doing a build/test run on your mac/windows dev machine?

@altendky
Copy link
Contributor Author

altendky commented Sep 23, 2018

I didn't dig into the details, just read the docs, but yes. As I said this is of no urgency to me but I think software is generally better when it doesn't need warnings like this. Is there some need to install these globally rather than in an env?

@joerick
Copy link
Contributor

joerick commented Oct 24, 2018

Is there some need to install these globally rather than in an env?

MacPython can only be installed globally. But other than that, the python bits could install into a venv. I guess that running cibuildwheel locally could be helpful for debugging. In which case, maybe we could have something like cibuildwheel --local, which would look for existing installs of MacPython (or Windows local installs) and use a virtualenv for the python dependencies.

@altendky
Copy link
Contributor Author

I would tend to default to not trying to fuss with the system. Requiring that people type --install-deps or whatever once in a tox.ini doesn't seem particularly onerous. or even a separate subcommand (are there any? i forget...).

@HDembinski
Copy link

I am trying to use cibuildwheels for a non-trivial project, and - of course - it does not work, because I need to install certain dependencies that are missing in some docker images or not found by the CMake scripts in my project. Debugging these issues by adding small commits on a branch until the CI works is an incredibly painful process.

Long story short: it would be great if one could run cibuildwheels locally for testing/debugging of the build.

@YannickJadoul
Copy link
Member

Long story short: it would be great if one could run cibuildwheels locally for testing/debugging of the build.

It can be, right? If you're happy to have docker images downloaded and run, or Python versions installed on macOS/Windows, you can perfectly run cibuildwheel locally. Just skip the platform checks/detection by adding the correct --platform flag.
It's just really not meant to run locally, so we're not enabling that by default.

@hoffmang9
Copy link

I am trying to use cibuildwheels for a non-trivial project, and - of course - it does not work, because I need to install certain dependencies that are missing in some docker images or not found by the CMake scripts in my project. Debugging these issues by adding small commits on a branch until the CI works is an incredibly painful process.

We had the same issues - the best way to debug the os/cmake problems is to run the pypa docker and get it building by hand there.

Example CIBW_BEFORE_BUILD_LINUX here: https://github.com/Chia-Network/bls-signatures/blob/master/.github/workflows/build.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants