-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* less chatty download progress * fix version to 0.1.0 * add missing includes * disable constexpr mutex constructor * switch to slang linux build for glibc 2.17 * fix setup.py * require python 3.9 * remove toolset spec * update wheels workflow * rename pypi package to nv-sgl
- Loading branch information
1 parent
dc056db
commit 7d03836
Showing
12 changed files
with
81 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,18 @@ on: | |
required: true | ||
default: '0' | ||
|
||
env: | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_SKIP: "*-musllinux* pp*" | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
CIBW_ARCHS_WINDOWS: auto64 | ||
CIBW_ARCHS_LINUX: auto64 | ||
CIBW_TEST_COMMAND: "python -c \"import sgl\"" | ||
# zip required for vcpkg, rest for glfw | ||
CIBW_BEFORE_ALL_LINUX: yum install -y zip wayland-devel libxkbcommon-devel libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel | ||
|
||
jobs: | ||
build_wheels: | ||
wheels: | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
matrix: | ||
|
@@ -26,9 +36,55 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
lfs: true | ||
|
||
# Used to host cibuildwheel | ||
# Used to host cibuildwheel. | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
# Install cibuildwheel. | ||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.20.0 | ||
|
||
# Setup MSVC. | ||
- name: Setup MSVC | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: x64 | ||
|
||
# Build wheels. | ||
- name: Build wheels | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }}-* | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
# Copy wheels to artifact. | ||
- name: Copy wheels to artifact | ||
# Version v4 fails to copy files from same folder for multiple builds. | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels | ||
path: ./wheelhouse/*.whl | ||
|
||
|
||
upload_pypi: | ||
name: Upload wheels to PyPI | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.inputs.upload == '1'}} | ||
needs: [wheels] | ||
environment: pypi | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,8 @@ def build_extension(self, ext: CMakeExtension) -> None: | |
"-B", | ||
build_dir, | ||
"-DCMAKE_DEFAULT_BUILD_TYPE=Release", | ||
f"-DPython_ROOT_DIR:PATH={sys.prefix}", | ||
f"-DPython_FIND_REGISTRY:STRING=NEVER", | ||
f"-DCMAKE_INSTALL_PREFIX={extdir}", | ||
f"-DCMAKE_INSTALL_LIBDIR=sgl", | ||
f"-DCMAKE_INSTALL_BINDIR=sgl", | ||
|
@@ -106,20 +108,20 @@ def build_extension(self, ext: CMakeExtension) -> None: | |
version = "{MAJOR}.{MINOR}.{PATCH}".format(**matches) | ||
print(f"version={version}") | ||
|
||
long_description = """sgl.""" | ||
long_description = """TBD""" | ||
|
||
setup( | ||
name="sgl", | ||
name="nv-sgl", | ||
version=version, | ||
author="Simon Kallweit", | ||
author_email="[email protected]", | ||
description="A research rendering framework", | ||
description="Slang Graphics Library", | ||
url="https://github.com/shader-slang/sgl", | ||
license="Apache-2.0", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
ext_modules=[CMakeExtension("sgl")], | ||
cmdclass={"build_ext": CMakeBuild}, | ||
zip_safe=False, | ||
python_requires=">=3.8", | ||
python_requires=">=3.9", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "sgl", | ||
"version-string": "0.0.1", | ||
"version-string": "0.1.0", | ||
"dependencies": [ | ||
"doctest", | ||
"fmt", | ||
|