-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'app4triqs_remote/cpp_only_notriqs' into…
… unstable
- Loading branch information
Showing
30 changed files
with
448 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# See packaging for various base options | ||
FROM flatironinstitute/triqs:base | ||
ARG APPNAME=itertools | ||
|
||
COPY requirements.txt /src/$APPNAME/requirements.txt | ||
RUN pip3 install -r /src/$APPNAME/requirements.txt | ||
|
||
RUN useradd -u 993 -m build | ||
|
||
ENV SRC=/src \ | ||
BUILD=/home/build \ | ||
INSTALL=/usr/local \ | ||
PYTHONPATH=/usr/local/lib/python$PYTHON_VERSION/site-packages \ | ||
CMAKE_PREFIX_PATH=/usr/lib/cmake/$APPNAME | ||
|
||
COPY --chown=build . $SRC/$APPNAME | ||
WORKDIR $BUILD/$APPNAME | ||
RUN chown build . | ||
USER build | ||
ARG BUILD_DOC=0 | ||
ARG BUILD_ID | ||
RUN cmake $SRC/$APPNAME -DCMAKE_INSTALL_PREFIX=$INSTALL -DBuild_Documentation=$BUILD_DOC -DBuild_Deps=Always -DCLANG_OPT="$CXXFLAGS" -DMATHJAX_PATH="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2" && make -j2 || make -j1 VERBOSE=1 | ||
USER root | ||
RUN make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
Version 2.2.0 | ||
------------- | ||
Version 1.0.0 | ||
============= | ||
|
||
App4triqs Version 2.2.0 provides a project | ||
skeleton for TRIQS applications based on | ||
the TRIQS Library Version 2.2.0. | ||
It is intended for applications with both | ||
Python and C++ components. | ||
Itertools Version 1.0.0 is a single-header | ||
C++ library that allows, with a simple interface, | ||
for the writing of various types of range-based for loops. | ||
|
||
This is the initial release for this project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
sphinxcontirb.autorun | ||
~~~~~~~~~~~~~~~~~~~~~~ | ||
Run the code and insert stdout after the code block. | ||
""" | ||
import os | ||
from subprocess import PIPE, Popen | ||
|
||
from docutils import nodes | ||
from docutils.parsers.rst import Directive, directives | ||
from sphinx.errors import SphinxError | ||
|
||
from sphinx_autorun import version | ||
|
||
__version__ = version.version | ||
|
||
|
||
class RunBlockError(SphinxError): | ||
category = 'runblock error' | ||
|
||
|
||
class AutoRun(object): | ||
here = os.path.abspath(__file__) | ||
pycon = os.path.join(os.path.dirname(here), 'pycon.py') | ||
config = { | ||
'pycon': 'python ' + pycon, | ||
'pycon_prefix_chars': 4, | ||
'pycon_show_source': False, | ||
'console': 'bash', | ||
'console_prefix_chars': 1, | ||
} | ||
|
||
@classmethod | ||
def builder_init(cls, app): | ||
cls.config.update(app.builder.config.autorun_languages) | ||
|
||
|
||
class RunBlock(Directive): | ||
has_content = True | ||
required_arguments = 1 | ||
optional_arguments = 0 | ||
final_argument_whitespace = False | ||
option_spec = { | ||
'linenos': directives.flag, | ||
} | ||
|
||
def run(self): | ||
config = AutoRun.config | ||
language = self.arguments[0] | ||
|
||
if language not in config: | ||
raise RunBlockError('Unknown language %s' % language) | ||
|
||
# Get configuration values for the language | ||
args = config[language].split() | ||
input_encoding = config.get(language+'_input_encoding', 'utf8') | ||
output_encoding = config.get(language+'_output_encoding', 'utf8') | ||
prefix_chars = config.get(language+'_prefix_chars', 0) | ||
show_source = config.get(language+'_show_source', True) | ||
|
||
# Build the code text | ||
proc = Popen(args, bufsize=1, stdin=PIPE, stdout=PIPE, stderr=PIPE) | ||
codelines = (line[prefix_chars:] for line in self.content) | ||
code = u'\n'.join(codelines).encode(input_encoding) | ||
|
||
# Run the code | ||
stdout, stderr = proc.communicate(code) | ||
|
||
# Process output | ||
if stdout: | ||
out = stdout.decode(output_encoding) | ||
if stderr: | ||
out = stderr.decode(output_encoding) | ||
|
||
# Get the original code with prefixes | ||
if show_source: | ||
code = u'\n'.join(self.content) | ||
code_out = u'\n'.join((code, out)) | ||
else: | ||
code_out = out | ||
|
||
literal = nodes.literal_block(code_out, code_out) | ||
literal['language'] = language | ||
literal['linenos'] = 'linenos' in self.options | ||
return [literal] | ||
|
||
|
||
def setup(app): | ||
app.add_directive('runblock', RunBlock) | ||
app.connect('builder-inited', AutoRun.builder_init) | ||
app.add_config_value('autorun_languages', AutoRun.config, 'env') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# coding: utf-8 | ||
# file generated by setuptools_scm | ||
# don't change, don't track in version control | ||
version = '1.1.1' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.