Skip to content

Commit 5c947eb

Browse files
committed
add pyproject.yaml and build a wheel for posix via CI
1 parent 0e9e4c0 commit 5c947eb

File tree

4 files changed

+66
-3
lines changed

4 files changed

+66
-3
lines changed

.github/workflows/posix.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
INTERFACE64: '1'
3838
MB_ML_LIBC: musllinux
3939
MB_ML_VER: _1_1
40-
platform: [x64]
40+
platform: x64
4141
- os: ubuntu-latest
4242
PLAT: x86_64
4343
INTERFACE64: '0'
@@ -95,7 +95,7 @@ jobs:
9595
run: |
9696
python -m pip install --upgrade pip
9797
pip install virtualenv
98-
- name: Build and Install Wheels
98+
- name: Build OpenBLAS
9999
run: |
100100
set -xeo pipefail
101101
if [[ "$PLAT" == "arm64" ]]; then
@@ -118,11 +118,21 @@ jobs:
118118
build_lib "$PLAT" "$INTERFACE64" "0"
119119
fi
120120
121+
- name: Build wheel
122+
run: |
123+
mkdir -p local/openblas
124+
tar -C local/openblas --strip-components=2 -xf libs/openblas*.tar.gz
125+
python -m pip wheel -w dist -vv .
126+
121127
- uses: actions/upload-artifact@v3
122128
with:
123129
path: libs/openblas*.tar.gz
124130

125-
- name: Upload tarballs
131+
- uses: actions/upload-artifact@v3
132+
with:
133+
path: dist/openblas*.tar.gz
134+
135+
- name: Upload
126136
run: |
127137
set -ex
128138
TOKEN=${{ secrets.ANACONDA_SCIENTIFIC_PYTHON_UPLOAD }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ builds/
44
*.pyc
55
*.swp
66
for_test/
7+
test.exe
8+
local/
9+
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)