@@ -37,18 +37,18 @@ RUN apt-get update \
|
||||
ENV CC=/usr/bin/gcc-12
|
||||
ENV CXX=/usr/bin/g++-12
|
||||
|
||||
RUN python3 -m venv /opt/modulus-python
|
||||
RUN python3 -m venv /opt/modulus_python
|
||||
|
||||
ENV PATH=/opt/modulus-python/bin:${PATH}
|
||||
ENV PATH=/opt/modulus_python/bin:${PATH}
|
||||
|
||||
RUN python -m pip install --no-cache-dir \
|
||||
conan==2.26.2
|
||||
|
||||
# The path is shared by source builds and exported consumer tooling.
|
||||
ARG MODULUS_TOOLS=tools
|
||||
COPY ${MODULUS_TOOLS}/docker/format-requirements.txt /tmp/modulus-format-requirements.txt
|
||||
RUN python -m pip install --no-cache-dir -r /tmp/modulus-format-requirements.txt
|
||||
COPY ${MODULUS_TOOLS}/docker/format_requirements.txt /tmp/modulus_format_requirements.txt
|
||||
RUN python -m pip install --no-cache-dir -r /tmp/modulus_format_requirements.txt
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
RUN mkdir -p /opt && touch /opt/modulus-build-image
|
||||
RUN mkdir -p /opt && touch /opt/modulus_build_image
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
import modulus_tool
|
||||
|
||||
modulus_tool.run('publish')
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
import modulus_tool
|
||||
|
||||
modulus_tool.run('python')
|
||||
@@ -0,0 +1,23 @@
|
||||
"""Run build Python with the exported Modulus package ahead of the bootstrap."""
|
||||
|
||||
import pathlib
|
||||
import runpy
|
||||
import sys
|
||||
|
||||
def main():
|
||||
root, *arguments = sys.argv[1:]
|
||||
sys.path[:0] = [str(pathlib.Path(root).resolve()), str(pathlib.Path.cwd())]
|
||||
if not arguments:
|
||||
raise SystemExit('expected -m MODULE, -c CODE, or a Python script')
|
||||
if arguments[0] == '-m' and len(arguments) >= 2:
|
||||
sys.argv = arguments[1:]
|
||||
runpy.run_module(arguments[1], run_name='__main__', alter_sys=True)
|
||||
elif arguments[0] == '-c' and len(arguments) >= 2:
|
||||
sys.argv = ['-c', *arguments[2:]]
|
||||
exec(compile(arguments[1], '<string>', 'exec'), {'__name__': '__main__'})
|
||||
else:
|
||||
sys.argv = arguments
|
||||
runpy.run_path(arguments[0], run_name='__main__')
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user