Skip to content

Commit 959302b

Browse files
committed
fix: add import from C extension back
1 parent f790680 commit 959302b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/diffpy/pdffit2/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@
1616
##############################################################################
1717
"""PDFfit2 - real space structure refinement program."""
1818

19+
# WARNING: Do NOT remove the isort: off/on comments in this file.
20+
# These tags are used to prevent isort from reordering imports in this file.
21+
# __version__ must be initialized before importing C++ extensions.
22+
23+
# isort: off
24+
# Import the package version before C++ extensions are loaded.
25+
from diffpy.pdffit2.output import redirect_stdout # noqa
26+
27+
# Import C++ related modules since the __version__ attribute is used.
28+
from diffpy.pdffit2.pdffit import PdfFit # noqa
29+
30+
31+
# isort: on
32+
1933
# package version
2034
from diffpy.pdffit2.version import __version__ # noqa
2135

0 commit comments

Comments
 (0)