Skip to content

Instantly share code, notes, and snippets.

@mmaslowskicc
Created January 3, 2020 11:30
Show Gist options
  • Save mmaslowskicc/7485e795e3c8fec873515981293fd17c to your computer and use it in GitHub Desktop.
Save mmaslowskicc/7485e795e3c8fec873515981293fd17c to your computer and use it in GitHub Desktop.
Minimal example for building platform-dependent wheels on PyPy using Poetry
# No-op file needed so Poetry builds a platform-dependent wheel.
def build(setup_kwargs):
pass
FROM pypy:3.6-slim
# Install dependencies of C libraries in dependencies and Poetry.
RUN set -e \
&& apt-get update \
&& apt-get install -y build-essential libssl-dev \
&& pip install poetry==1.0.0
# Add sample code.
COPY pyproject.toml poetry.lock build.py /app/
RUN set -e \
&& mkdir -p /app/src \
&& touch /app/src/wheeltagtest.py
WORKDIR /app
# Build.
RUN poetry build
# Install the wheel.
RUN poetry run pip install dist/*.whl
package = []
[metadata]
content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8"
python-versions = "*"
[metadata.files]
[tool.poetry]
name = "wheeltagtest"
version = "0.1.0"
description = ""
authors = ["Anonymous"]
build = "build.py"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment