Skip to content

Commit 8e5a971

Browse files
lambyvidelec
authored andcommitted
autogen/generator.py: Make the output reproducible (#48)
Whilst working on the Reproducible Builds effort [0], we noticed that cypari2 could not be built reproducibly as it embeds the absolute build path in the generated .pxd files. [0] https://reproducible-builds.org/ Signed-off-by: Chris Lamb <[email protected]>
1 parent 540c4c8 commit 8e5a971

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

autogen/generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
This class is not meant to be used directly, use the derived class
3131
:class:`Gen` instead.
3232
"""
33-
'''.format(__file__)
33+
'''.format(os.path.relpath(__file__, os.getcwd()))
3434

3535
instance_banner = '''# This file is auto-generated by {}
3636
@@ -41,7 +41,7 @@
4141
You must never use this class directly (in fact, Python may crash
4242
if you do), use the derived class :class:`Pari` instead.
4343
"""
44-
'''.format(__file__)
44+
'''.format(os.path.relpath(__file__, os.getcwd()))
4545

4646
decl_banner='''# This file is auto-generated by {}
4747

0 commit comments

Comments
 (0)