Skip to content

Commit cf7248e

Browse files
committed
Update rst_to_pxd scripts after directory move
1 parent 627bb8c commit cf7248e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

bin/all_rst_to_pxd.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,7 @@ modules=(
8484

8585
for module in ${modules[@]}; do
8686
echo "Processing $module"
87-
bin/rst_to_pxd.py flint/$module --flint-doc-dir=$FLINT_DOC_DIR > src/flint/flintlib/$module.pxd
87+
bin/rst_to_pxd.py flint/$module \
88+
--flint-doc-dir=$FLINT_DOC_DIR \
89+
> src/flint/flintlib/functions/$module.pxd
8890
done

bin/rst_to_pxd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ def fill_import_dict(pyflintlibdir):
7878
"""
7979
Get a map from cython structs to the pxd that defines them
8080
"""
81-
with os.scandir(pyflintlibdir) as entry:
81+
with os.scandir(pyflintlibdir + '/types') as entry:
8282
for f in entry:
8383
if fnmatch.fnmatch(f.name, "*.pxd"):
8484
with open(f.path) as pxd:
8585
for t in get_cython_struct_types(pxd):
86-
import_dict[t] = f.name.split('.')[0]
86+
import_dict[t] = 'types.' + f.name.split('.')[0]
8787

88-
with os.scandir(pyflintlibdir + '/types') as entry:
88+
with os.scandir(pyflintlibdir + '/functions') as entry:
8989
for f in entry:
9090
if fnmatch.fnmatch(f.name, "*.pxd"):
9191
with open(f.path) as pxd:
9292
for t in get_cython_struct_types(pxd):
93-
import_dict[t] = 'types.' + f.name.split('.')[0]
93+
import_dict[t] = 'functions.' + f.name.split('.')[0]
9494

9595
def undecorate(str):
9696
"""

0 commit comments

Comments
 (0)