Skip to content

Commit 3a9254d

Browse files
author
Release Manager
committed
gh-36630: Allow to specify output directory for generated interpreters <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> Add the possibility to specify the output directory where the generated interpreters files will be created. This is preparation for the compilation with meson. <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [ ] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36630 Reported by: Tobias Diez Reviewer(s): Matthias Köppe, Michael Orlitzky, Tobias Diez
2 parents 69d03d3 + a191861 commit 3a9254d

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/sage_setup/autogen/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
2+
23
from . import interpreters
3-
from sage.env import SAGE_SRC
4+
45

56
def autogen_all():
67
"""
@@ -9,6 +10,7 @@ def autogen_all():
910
Return a list of sub-packages that should be appended to the list
1011
of packages built/installed by setup.py.
1112
"""
13+
from sage.env import SAGE_SRC
1214
interpreters.rebuild(os.path.join(SAGE_SRC, "sage", "ext", "interpreters"))
1315

1416
return ['sage.ext.interpreters']
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
from __future__ import print_function, absolute_import
1+
# Usage: python -m sage_setup.autogen.interpreters <output_dir>
22

3-
import os
4-
from sage.env import SAGE_SRC
3+
import argparse
54

65
from . import rebuild
76

7+
parser = argparse.ArgumentParser()
8+
parser.add_argument("output_dir", help="Output directory")
9+
args = parser.parse_args()
810

9-
rebuild(os.path.join(SAGE_SRC, "sage", "ext", "interpreters"))
11+
rebuild(args.output_dir)

0 commit comments

Comments
 (0)