Skip to content

Commit 6f7b695

Browse files
author
The ml_dtypes Authors
committed
Merge pull request #130 from jakevdp:nanobind
PiperOrigin-RevId: 592344892
2 parents c9b4c64 + b364a5f commit 6f7b695

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ requires = [
5252
"numpy~=1.21.2; python_version<'3.11'",
5353
"numpy~=1.23.3; python_version>='3.11' and python_version<'3.12'",
5454
"numpy~=1.26.0; python_version>='3.12'",
55-
"pybind11~=2.11.1",
5655
"setuptools~=68.1.0",
5756
]
5857
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,22 @@
1717
import fnmatch
1818
import platform
1919
import numpy as np
20-
from pybind11.setup_helpers import Pybind11Extension
20+
from setuptools import Extension
2121
from setuptools import setup
2222
from setuptools.command.build_py import build_py as build_py_orig
2323

2424
if platform.system() == "Windows":
2525
COMPILE_ARGS = [
2626
"/std:c++17",
2727
"/DEIGEN_MPL2_ONLY",
28+
"/EHsc",
29+
"/bigobj",
2830
]
2931
else:
3032
COMPILE_ARGS = [
3133
"-std=c++17",
3234
"-DEIGEN_MPL2_ONLY",
35+
"-fvisibility=hidden",
3336
# -ftrapping-math is necessary because NumPy looks at floating point
3437
# exception state to determine whether to emit, e.g., invalid value
3538
# warnings. Without this setting, on Mac ARM we see spurious "invalid
@@ -56,7 +59,7 @@ def find_package_modules(self, package, package_dir):
5659

5760
setup(
5861
ext_modules=[
59-
Pybind11Extension(
62+
Extension(
6063
"ml_dtypes._ml_dtypes_ext",
6164
[
6265
"ml_dtypes/_src/dtypes.cc",

0 commit comments

Comments
 (0)