Skip to content

Commit d71a56a

Browse files
committed
add pyproject.yaml and build a wheel for posix via CI
1 parent b61c6c2 commit d71a56a

File tree

4 files changed

+73
-17
lines changed

4 files changed

+73
-17
lines changed

.github/workflows/posix.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,39 +17,33 @@ jobs:
1717
matrix:
1818
os: [ubuntu-latest, macos-latest]
1919
platform: [x64]
20-
PLAT: [i686, x86_64]
20+
PLAT: [x86_64]
2121
INTERFACE64: ['', '1']
22-
MB_ML_VER: ['', 2010, 2014]
22+
MB_ML_VER: ['2014']
2323
include:
2424
- os: macos-latest
2525
PLAT: arm64
2626
INTERFACE64: '1'
27-
platform: [x64]
27+
platform: x64
2828
- os: macos-latest
2929
PLAT: arm64
3030
INTERFACE64: ''
31-
platform: [x64]
31+
platform: x64
32+
- os: ubuntu-latest
33+
PLAT: i686
34+
INTERFACE64: ''
3235
- os: ubuntu-latest
3336
PLAT: x86_64
3437
INTERFACE64: '1'
3538
MB_ML_LIBC: musllinux
3639
MB_ML_VER: _1_1
37-
platform: [x64]
40+
platform: x64
3841
- os: ubuntu-latest
3942
PLAT: x86_64
4043
INTERFACE64: ''
4144
MB_ML_LIBC: musllinux
4245
MB_ML_VER: _1_1
43-
platform: [x64]
44-
exclude:
45-
- os: macos-latest
46-
PLAT: i686
47-
- os: macos-latest
48-
MB_ML_VER: 2010
49-
- os: macos-latest
50-
MB_ML_VER: 2014
51-
- PLAT: i686
52-
INTERFACE64: '1'
46+
platform: x64
5347
env:
5448
REPO_DIR: OpenBLAS
5549
OPENBLAS_COMMIT: "bfd9c1b58cd3"
@@ -87,7 +81,7 @@ jobs:
8781
run: |
8882
python -m pip install --upgrade pip
8983
pip install virtualenv
90-
- name: Build and Install Wheels
84+
- name: Build OpenBLAS
9185
run: |
9286
if [[ "$PLAT" == "arm64" ]]; then
9387
sudo xcode-select -switch /Applications/Xcode_12.5.1.app
@@ -101,11 +95,21 @@ jobs:
10195
echo "------ BUILD LIB --------"
10296
build_lib "$PLAT" "$INTERFACE64"
10397
98+
- name: Build wheel
99+
run: |
100+
mkdir -p local/openblas
101+
tar -C local/openblas --strip-components=2 -xf libs/openblas*.tar.gz
102+
python -m pip wheel -w dist -vv .
103+
104104
- uses: actions/upload-artifact@v3
105105
with:
106106
path: libs/openblas*.tar.gz
107107

108-
- name: Upload tarballs
108+
- uses: actions/upload-artifact@v3
109+
with:
110+
path: dist/openblas*.tar.gz
111+
112+
- name: Upload
109113
run: |
110114
set -ex
111115
TOKEN=${{ secrets.MULTIBUILD_WHEELS_STAGING_ACCESS }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ builds/
44
*.pyc
55
*.swp
66
test.exe
7+
local/
8+
dist/

pyproject.toml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[build-system]
2+
# Minimum requirements for the build system to execute.
3+
requires = [
4+
"setuptools",
5+
"wheel",
6+
]
7+
build-backend = "setuptools.build_meta"
8+
9+
[project]
10+
name = "openblas"
11+
version = "0.3.20"
12+
description = "Provides OpenBLAS for python packaging"
13+
readme = "README.md"
14+
classifiers = [
15+
"Development Status :: 5 - Production/Stable",
16+
"Programming Language :: C++",
17+
"License :: OSI Approved :: BSD License",
18+
]
19+
# authors = [
20+
# ]
21+
# maintainers = [
22+
# ]
23+
24+
[project.urls]
25+
homepage = "https://github.com/MacPython/openblas-libs"
26+
upstream = "https://github.com/xianyi/OpenBLAS"
27+
28+
[tool.setuptools.packages.find]
29+
# scanning for namespace packages is true by default in pyproject.toml, so
30+
# # you do NOT need to include the following line.
31+
namespaces = true
32+
where = ["local"]
33+
34+
[tool.setuptools.package-data]
35+
openblas = ["lib/*", "include/*", "lib/pkgconfig/*", "lib/cmake/openblas/*"]
36+
37+
38+
#[tool.setuptools.data_files]
39+
# Deprecated in setuptools, but may be revived as a new standard, see
40+
# https://discuss.python.org/t/pep-proposal-external-data-for-python-packages
41+
#"/local" = [
42+
# "local/include/*.h",
43+
# "local/lib/*",
44+
# "local/lib/pkgconfig/*",
45+
# "local/lib/cmake/OpenBLAS/*",
46+
#]

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(
4+
)

0 commit comments

Comments
 (0)