BLD: Build wheels using cibuildwheel
State: closed

- [ ] closes #44027 (Replace xxxx with the Github issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

We can't switch to this instantly since there's still a lot of work to be done, but this is a good start(the wheels build).
This PR can be merged anytime, though, and separate PRs can be put up to address issues.

The upload script probably won't work(it should, though, it is copy pasted from numpy's), but the only way to check is to merge this.

Current issues:
- [ ]  Align flags when building wheels ( the wheel sizes are way off, I need to turn on stripping for sure)
~~- [ ]  Figure out licensing for MSVC redistributables (I don't think we were doing this correctly before)~~
       - I think we should be good on this after reading through https://visualstudio.microsoft.com/license-terms/vs2022-ga-community/.
- [x]  An admin needs to add the anaconda keys.
- [ ]  aarch64 wheel builds
- [ ] adjust the flaker rules


Labels:
name: Build
description: Library building on various platforms
name: CI
description: Continuous Integration
name: Release

Comments:
Looks pretty good to start. Could you show a commit where the workflow ran (and maybe save the wheel as an artifact)?
If you scroll down on https://github.com/pandas-dev/pandas/actions/runs/3029167054, you can find the artifacts. 

Note that the manylinux wheels are much larger, since I haven't passed the flags to strip wheels yet. I'll try to match flags in a follow up PR.
(The macosx wheels are normal size, even though they seem bigger since both the x86_64 and arm64 wheels are included in the artifact)
The last remaining blocker I think is for someone with access to the Anaconda org to add the keys to this repo.
@TomAugspurger Sorry for the ping, but do you know how to get the tokens for the staging and nightly anaconda uploads? 
I think you were the one to add the tokens originally to the pandas-wheels repo.
No worries.

I think anyone in the scipy-wheels-nightly group on anaconda.org (https://anaconda.org/scipy-wheels-nightly) can generate a token for uploading or view the existing tokens. Do you have an account on anaconda.org @lithomas1?
Oh, or I can just set the environment variable in this repo. Let me do that quick.
@lithomas1 there's now a `PANDAS_NIGHTLY_UPLOAD_TOKEN` secret in GitHub that should have permission to upload to that group in anaconda.org.
> @lithomas1 there's now a `PANDAS_NIGHTLY_UPLOAD_TOKEN` secret in GitHub that should have permission to upload to that group in anaconda.org.

Thanks, can you also add the token for multibuild-wheels-staging under `PANDAS_STAGING_UPLOAD_TOKEN`?
Done!
@WillAyd Can you re-review again when you have time?
I think your review is blocking the merge.

(No rush though, this can go in anytime before 1.6/2.0)
@lithomas1 sorry about that. Let's see how this goes - thanks for the ongoing improvements
Going to put this in now given the approvals. Let's see how the nightlies work out this night.