Skip to content

Commit

Permalink
Merge pull request #325 from jaltmayerpizzorno/f202201-release-1.4
Browse files Browse the repository at this point in the history
Re-enables Windows wheel building for 1.4.0 release
  • Loading branch information
jaltmayerpizzorno committed Jan 12, 2022
2 parents de49af1 + bbcb634 commit a4d6c36
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release-pypi-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
strategy:
matrix:
python_version: ['3.7', '3.8', '3.9', '3.10']
os: ['ubuntu-latest', 'macos-latest']
# os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
include:
- os: ubuntu-latest
container: quay.io/pypa/manylinux_2_24_x86_64 # https://github.com/pypa/manylinux
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-smoketests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
run: sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*

- name: Install dependencies
run: python -m pip install --upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build scalene
run: pip install -e .
Expand Down
10 changes: 10 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ def run(self):
self.spawn([make_command(), 'vendor-deps'])
super().run()

# Force building platform-specific wheel to avoid the Windows wheel
# (which doesn't include libscalene, and thus would be considered "pure")
# being used for other platforms.
from wheel.bdist_wheel import bdist_wheel as orig_bdist_wheel
class BdistWheelCommand(orig_bdist_wheel):
def finalize_options(self):
orig_bdist_wheel.finalize_options(self)
self.root_is_pure = False

import setuptools.command.build_ext
class BuildExtCommand(setuptools.command.build_ext.build_ext):
"""Custom command that runs 'make' to generate libscalene."""
Expand Down Expand Up @@ -145,6 +154,7 @@ def build_libscalene(self):
],
packages=find_packages(),
cmdclass={
'bdist_wheel': BdistWheelCommand,
'egg_info': EggInfoCommand,
'build_ext': BuildExtCommand,
},
Expand Down

0 comments on commit a4d6c36

Please sign in to comment.