File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -725,7 +725,6 @@ def mypycify(
725725 rt_file = os .path .join (build_dir , name )
726726 with open (os .path .join (include_dir (), name ), encoding = "utf-8" ) as f :
727727 write_file (rt_file , f .read ())
728- # Only add .c files to shared_cfilenames
729728 if name .endswith (".c" ):
730729 shared_cfilenames .append (rt_file )
731730
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ class Capsule:
55 """Defines a C extension capsule that a primitive may require."""
66
77 def __init__ (self , name : str ) -> None :
8+ # Module fullname, e.g. 'librt.base64'
89 self .name : Final = name
910
1011 def __repr__ (self ) -> str :
@@ -18,9 +19,14 @@ def __hash__(self) -> int:
1819
1920
2021class SourceDep :
21- """Defines a C source file that a primitive may require."""
22+ """Defines a C source file that a primitive may require.
23+
24+ Each source file must also have a corresponding .h file (replace .c with .h)
25+ that gets implicitly #included if the source is used.
26+ """
2227
2328 def __init__ (self , path : str ) -> None :
29+ # Relative path from mypyc/lib-rt, e.g. 'bytes_extra_ops.c'
2430 self .path : Final = path
2531
2632 def __repr__ (self ) -> str :
You can’t perform that action at this time.
0 commit comments