@@ -120,13 +120,23 @@ def _build_and_validate_wheel() -> None:
120120 "from pathlib import Path" ,
121121 "import os" ,
122122 "import cyphersyntax" ,
123- "from cyphersyntax.handshake import HandshakeConfirmation, HandshakeOffer, HandshakeResponse" ,
124- "from cyphersyntax.identity import Identity" ,
125- "from cyphersyntax.session import AeadSuite, SessionFactory" ,
123+ "from cyphersyntax import (" ,
124+ " AeadSuite," ,
125+ " HandshakeConfirmation," ,
126+ " HandshakeOffer," ,
127+ " HandshakeResponse," ,
128+ " Identity," ,
129+ " SessionFactory," ,
130+ ")" ,
126131 "install_root = Path(os.environ['CYPHERSYNTAX_INSTALL_ROOT']).resolve()" ,
127132 "module_path = Path(cyphersyntax.__file__).resolve()" ,
128133 "if install_root not in module_path.parents:" ,
129134 " raise RuntimeError(f'package imported outside isolated target: {module_path}')" ,
135+ "marker_path = module_path.with_name('py.typed')" ,
136+ "if not marker_path.is_file():" ,
137+ " raise RuntimeError('installed wheel is missing the PEP 561 marker')" ,
138+ "if cyphersyntax.__version__ != '0.1.0':" ,
139+ " raise RuntimeError('installed wheel reports an unexpected version')" ,
130140 "alice = Identity.generate('alice')" ,
131141 "bob = Identity.generate('bob')" ,
132142 "pending_alice = SessionFactory.initiator(" ,
0 commit comments