Skip to content

Commit

Permalink
more build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Dec 7, 2023
1 parent 32300ad commit 44ce5de
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 10 deletions.
8 changes: 7 additions & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
version: '3'
services:
manylinux:
# See for a better description of these images: https://github.com/pypa/manylinux
manylinux28:
image: quay.io/pypa/manylinux_2_28_x86_64 # quay.io/pypa/manylinux_2_28_x86_64
volumes:
- ..:/workspace # Mount the parent folder to workspace
command: sleep infinity
manylinux14:
image: quay.io/pypa/manylinux2014_x86_64 # quay.io/pypa/manylinux_2_28_x86_64
volumes:
- ..:/workspace # Mount the parent folder to workspace
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "manylinux_x86_64",
"dockerComposeFile": ["../docker-compose.yml"],
"service": "manylinux",
"service": "manylinux14",
"shutdownAction": "none",
"workspaceFolder": "/workspace/",
"mounts": ["type=bind,source=../../primate,target=/primate"],
Expand Down
24 changes: 24 additions & 0 deletions .devcontainer/manylinux_2_28_x86_64/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "manylinux_2_28_x86_64",
"dockerComposeFile": ["../docker-compose.yml"],
"service": "manylinux28",
"shutdownAction": "none",
"workspaceFolder": "/workspace/",
"mounts": ["type=bind,source=../../primate,target=/primate"]
}
// {
// "name": "manylinux_x86_64",
// "build": {
// "dockerfile": "Dockerfile"
// },
// // https://containers.dev/features.
// "features": {
// "ghcr.io/devcontainers/features/python:1": {},
// "ghcr.io/devcontainers-contrib/features/meson-asdf:2": {},
// "ghcr.io/rocker-org/devcontainer-features/miniforge:1": {},
// "ghcr.io/devcontainers-community/features/llvm:3":{}
// },

// // Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "gcc -v"
// }
17 changes: 12 additions & 5 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,21 @@ jobs:
coverage report -m
- name: Build a wheel
run: |
python -m build
$env:wheel_name=Get-ChildItem -Path dist/* -Include *.whl
python -m build --wheel
# $env:wheel_name=Get-ChildItem -Path dist/* -Include *.whl
# delvewheel repair -w dist $env:wheel_name
- name: Install the wheel
- name: Uninstall the package
run: |
python -m pip uninstall primate -y
# python -m pip install $(find "$output_dir" -type f | grep *primate*.whl)
python -m pip install $env:wheel_name
- name: Install the wheel
# python -m pip install $(find "$output_dir" -type f | grep *primate*.whl)
# python -m pip install $env:wheel_name
run: |
set PROJ_WHEEL=true
FOR %%F IN (dist\*.whl) DO (set PYPROJ_WHEEL=%%F)
delvewheel repair %PYPROJ_WHEEL%
FOR %%F IN (wheelhouse\*.whl) DO (set PYPROJ_WHEEL=%%F)
python -m pip install %PYPROJ_WHEEL%
- name: Wheel dry-run
run: |
python -c "import primate; print(primate.__version__)"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ test-requires = ["pytest", "pytest-cov", "pytest-benchmark"] # coverage-badge
test-command = "python -m pytest {package}/tests/ --cov={package} --benchmark-skip"
build-verbosity = 1
skip = "cp36-* pp* cp37-* *_ppc64le *_i686 *_s390x *-musllinux*" # todo: revisit musllinux
manylinux-x86_64-image = "manylinux_2_28" # prefer the newer one

[tool.cibuildwheel.linux]
before-build = "bash {project}/tools/cibw_linux.sh {project}"
Expand Down
5 changes: 2 additions & 3 deletions tools/cibw_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

if [ -n "$(command -v yum)" ]; then
cat /etc/*-release
yum remove -y epel-release
# yum remove -y epel-release
yum update -y
ulimit -n 4096
yum install -y clang
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y openblas
yum install -y epel-release
alias python=/opt/python/cp39-cp39/bin/python
# yum install -y python3.9
# yum install -y python39-devel
# alias python=python3.9
Expand Down

0 comments on commit 44ce5de

Please sign in to comment.