-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from mikedh/main
Build 3.12 Wheels And Update Pyproject
- Loading branch information
Showing
7 changed files
with
77 additions
and
49 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
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 |
---|---|---|
|
@@ -13,18 +13,15 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
# We don't support Python 2.7 | ||
CIBW_SKIP: cp27-* | ||
uses: pypa/[email protected] | ||
with: | ||
output-dir: wheelhouse | ||
|
||
|
@@ -36,11 +33,11 @@ jobs: | |
name: Build SDist | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v4 | ||
|
||
- name: Install deps | ||
run: python -m pip install twine build | ||
|
@@ -62,7 +59,7 @@ jobs: | |
if: github.event_name == 'release' && github.event.action == 'published' | ||
|
||
steps: | ||
- uses: actions/setup-python@v2 | ||
- uses: actions/setup-python@v4 | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
|
Submodule xatlas
updated
5 files
+3 −1 | .appveyor.yml | |
+1 −1 | README.md | |
+1 −0 | bin/premake.bat | |
+ − | bin/premake5.exe | |
+0 −5 | source/xatlas/xatlas.cpp |
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 |
---|---|---|
|
@@ -5,4 +5,32 @@ requires = [ | |
"ninja; sys_platform != 'win32'", | ||
"cmake>=3.12", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "xatlas" | ||
requires-python = ">=3.7" | ||
version = "0.0.9" | ||
authors = [{name = "Markus Worchel", email = "[email protected]"}] | ||
license = {file = "LICENSE"} | ||
description = "Python bindings for xatlas" | ||
urls = {Homepage = "https://github.com/mworchel/xatlas-python"} | ||
dependencies = ["numpy"] | ||
|
||
[project.readme] | ||
file = "README.md" | ||
content-type = "text/markdown" | ||
|
||
[project.optional-dependencies] | ||
test = ["trimesh", | ||
"pytest"] | ||
|
||
[tool.cibuildwheel] | ||
# Run the package tests on every wheel using `pytest` | ||
test-command = "pytest {package}/tests" | ||
|
||
# will install pytest and other packages in the `test` extra | ||
test-extras = ["test"] | ||
|
||
# Skip PyPy on Windows as it doesn't appear to have numpy wheels | ||
skip = ["pp*-win*", "*musllinux_i686"] |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
# -*- coding: utf-8 -*- | ||
import os | ||
from pathlib import Path | ||
import sys | ||
import subprocess | ||
|
||
|
@@ -62,7 +61,6 @@ def build_extension(self, ext): | |
cmake_args += ["-GNinja"] | ||
|
||
else: | ||
|
||
# Single config generators are handled "normally" | ||
single_config = any(x in cmake_generator for x in {"NMake", "Ninja"}) | ||
|
||
|
@@ -100,22 +98,11 @@ def build_extension(self, ext): | |
subprocess.check_call( | ||
["cmake", "--build", "."] + build_args, cwd=self.build_temp | ||
) | ||
|
||
long_description = (Path(__file__).parent / "README.md").read_text() | ||
|
||
# The information here can also be placed in setup.cfg - better separation of | ||
|
||
# The information here can also be placed in pyproject.toml - better separation of | ||
# logic and declaration, and simpler if you include description/version in a file. | ||
setup( | ||
name="xatlas", | ||
version="0.0.8", | ||
description="Python bindings for xatlas", | ||
author="Markus Worchel", | ||
author_email="[email protected]", | ||
license='MIT', | ||
url='https://github.com/mworchel/xatlas-python', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
ext_modules=[CMakeExtension("xatlas")], | ||
cmdclass={"build_ext": CMakeBuild}, | ||
zip_safe=False, | ||
) |
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,11 +1,17 @@ | ||
import pytest | ||
import os | ||
import trimesh | ||
import xatlas | ||
|
||
# current working directory | ||
cwd = os.path.abspath(os.path.expanduser(os.path.dirname(__file__))) | ||
|
||
|
||
def test_parametrize(): | ||
mesh = trimesh.load_mesh("tests/data/00190663.obj") | ||
mesh = trimesh.load_mesh(os.path.join(cwd, "data", "00190663.obj")) | ||
|
||
vmapping, indices, uvs = xatlas.parametrize(mesh.vertices, mesh.faces, mesh.vertex_normals) | ||
vmapping, indices, uvs = xatlas.parametrize( | ||
mesh.vertices, mesh.faces, mesh.vertex_normals | ||
) | ||
assert vmapping.shape == (18996,) | ||
assert indices.shape == (32668, 3) | ||
assert uvs.shape == (18996, 2) | ||
assert uvs.shape == (18996, 2) |