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

Add support for musl wheels #400

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Here's a brief check list for releasing a new version:
CI build takes a while. These wheels are not automatically uploaded,
but there's ``./bin/download-windows-wheels`` script that downloads built
wheels. Then upload them with ``twine``.
- Run ``./bin/build-manylinux-wheels`` to build linux wheels and upload them to
- Run ``./bin/build-linux-wheels`` to build linux wheels and upload them to
PyPI (takes ~5 minutes).
- The `docs website`__ also has to be updated.
It's currently a static website deployed on GitHub Pages.
Expand Down
43 changes: 43 additions & 0 deletions bin/build-linux-wheels
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python3
"""Script for building 'manylinux' & 'musllinux' wheels for libsass.
Run me after putting the source distribution on pypi.
See: https://www.python.org/dev/peps/pep-0513/
"""
import os
import pipes
import subprocess
import tempfile


def check_call(*cmd):
print(
'build-linux-wheels>> ' +
' '.join(pipes.quote(part) for part in cmd),
)
subprocess.check_call(cmd)


def main():
os.makedirs('dist', exist_ok=True)
for platform in ('manylinux1', 'musllinux_1_1'):
with tempfile.TemporaryDirectory() as work:
pip = '/opt/python/cp37-cp37m/bin/pip'
check_call(
'docker', 'run', '-ti',
# Use this so the files are not owned by root
'--user', f'{os.getuid()}:{os.getgid()}',
# We'll do building in /work and copy results to /dist
'-v', f'{work}:/work:rw',
'-v', '{}:/dist:rw'.format(os.path.abspath('dist')),
f'quay.io/pypa/{platform}_x86_64:latest',
'bash', '-exc',
'{} wheel --verbose --wheel-dir /work --no-deps libsass && '
'auditwheel repair --wheel-dir /dist /work/*.whl'.format(pip),
)
return 0


if __name__ == '__main__':
raise SystemExit(main())
42 changes: 0 additions & 42 deletions bin/build-manylinux-wheels

This file was deleted.