Skip to content

Commit

Permalink
Fix wheel generation on macOS Big Sur, switch to macos-bigsur image…
Browse files Browse the repository at this point in the history
… on AppVeyor (#3174)

- add a workaround to generate proper wheel names on macOS Big Sur. We should still properly deprecate the `distutils` module at some point;
- switch to the most recent macOS image on AppVeyor.

Closes #3175
  • Loading branch information
oleksiyskononenko authored Oct 5, 2021
1 parent 442aea3 commit 6b74f7a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image:
- Visual Studio 2019
- Ubuntu
- macOS
- macos-bigsur

init:
# Uncomment the line below to enable RDP access
Expand Down
9 changes: 7 additions & 2 deletions ci/xbuild/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,13 @@ def get_tag(self):
if self._tag is None:
impl_tag = self._get_python_tag()
abi_tag = self._get_abi_tag()
plat_tag = distutils.util.get_platform() \
.replace('.', '_').replace('-', '_')
# TODO: remove `distutils` dependency as it has been deprecated
platform = distutils.util.get_platform()
# Meanwhile, a workaround for macOS Big Sur, see #3175
if platform.startswith("macosx-11"):
plat_tag = re.sub("-11(.*)-", "_11_0_", platform)
else:
plat_tag = platform.replace('.', '_').replace('-', '_')
self._tag = "%s-%s-%s" % (impl_tag, abi_tag, plat_tag)
return self._tag

Expand Down
2 changes: 1 addition & 1 deletion src/core/column/categorical.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ size_t Categorical_ColumnImpl<T>::n_children() const noexcept {

template <typename T>
const Column& Categorical_ColumnImpl<T>::child(size_t i) const {
xassert(i == 0);
xassert(i == 0); (void) i;
return categories_;
}

Expand Down

0 comments on commit 6b74f7a

Please sign in to comment.