File: init

package info (click to toggle)
python-mceliece 0~20241009.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 204 kB
  • sloc: python: 491; makefile: 2
file content (18 lines) | stat: -rwxr-xr-x 495 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python3

project='mceliece'
primitives = []
for size in '6960119', '6688128', '8192128', '460896', '348864':
        for suffix in '', 'f', 'pc', 'pcf':
                primitives.append(f'mceliece{size}{suffix}')

helpstr = "'''\n"
with open('README.md') as f:
    helpstr += f.read()
helpstr += "'''\n"

with open(f'src/{project}/__init__.py', 'w') as f:
    f.write(helpstr)
    f.write('\n')
    for primitive in primitives:
        f.write(f'from .kem import {primitive}\n')