@@ -1988,8 +1988,8 @@ def post_init(self) -> None:
19881988 elif self .rust_crate_type not in ['rlib' , 'staticlib' ]:
19891989 raise InvalidArguments (f'Crate type "{ self .rust_crate_type } " invalid for static libraries; must be "rlib" or "staticlib"' )
19901990 # See https://github.com/rust-lang/rust/issues/110460
1991- if self .rust_crate_type == 'rlib' and any (c in self .name for c in ['-' , ' ' ]):
1992- raise InvalidArguments ('Rust crate types "dylib" and "proc-macro" do not allow spaces or dashes in the library name '
1991+ if self .rust_crate_type == 'rlib' and any (c in self .name for c in ['-' , ' ' , '.' ]):
1992+ raise InvalidArguments ('Rust crate type "rlib" does not allow spaces, periods or dashes in the library name '
19931993 'due to a limitation of rustc. Replace them with underscores, for example' )
19941994 # By default a static library is named libfoo.a even on Windows because
19951995 # MSVC does not have a consistent convention for what static libraries
@@ -2082,8 +2082,8 @@ def post_init(self) -> None:
20822082 elif self .rust_crate_type not in ['dylib' , 'cdylib' , 'proc-macro' ]:
20832083 raise InvalidArguments (f'Crate type "{ self .rust_crate_type } " invalid for dynamic libraries; must be "dylib", "cdylib", or "proc-macro"' )
20842084 # See https://github.com/rust-lang/rust/issues/110460
2085- if self .rust_crate_type != 'cdylib' and any (c in self .name for c in ['-' , ' ' ]):
2086- raise InvalidArguments ('Rust crate types "dylib" and "proc-macro" do not allow spaces or dashes in the library name '
2085+ if self .rust_crate_type != 'cdylib' and any (c in self .name for c in ['-' , ' ' , '.' ]):
2086+ raise InvalidArguments ('Rust crate types "dylib" and "proc-macro" do not allow spaces, periods or dashes in the library name '
20872087 'due to a limitation of rustc. Replace them with underscores, for example' )
20882088
20892089 if not hasattr (self , 'prefix' ):
0 commit comments