Skip to content

Commit faa6411

Browse files
committed
fix docs generation
1 parent 8856c4d commit faa6411

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

PyPartMC/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# https://github.com/diegoferigo/cmake-build-extension/blob/master/src/cmake_build_extension/__init__.py
77
@contextmanager
8-
def build_extension_env():
8+
def __build_extension_env():
99
cookies = []
1010
# https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew
1111
if hasattr(os, "add_dll_directory"):
@@ -18,6 +18,7 @@ def build_extension_env():
1818
for cookie in cookies:
1919
cookie.close()
2020

21-
with build_extension_env():
21+
with __build_extension_env():
2222
from _PyPartMC import *
23-
from _PyPartMC import __version__
23+
from _PyPartMC import __all__
24+
import _PyPartMC

src/pypartmc.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,19 @@ PYBIND11_MODULE(_PyPartMC, m) {
193193
si.attr("um") = py::float_(1e-6);
194194

195195
m.attr("__version__") = MACRO_STRINGIFY(VERSION_INFO);
196+
197+
m.attr("__all__") = py::make_tuple(
198+
"__version__",
199+
"si",
200+
"AeroData",
201+
"AeroState",
202+
"EnvState",
203+
"GasData",
204+
"GasState",
205+
"RunPartOpt",
206+
"Scenario",
207+
"condense_equilib_particles",
208+
"run_part",
209+
"pow2_above"
210+
);
196211
}

0 commit comments

Comments
 (0)