diff --git a/.travis/install.sh b/.travis/install.sh index 67e4f21..5187ad5 100755 --- a/.travis/install.sh +++ b/.travis/install.sh @@ -24,6 +24,11 @@ sudo apt-get install -qq -y \ ruby \ rustc +# dlang +wget -O /tmp/dmd_2.078.2-0_amd64.deb http://downloads.dlang.org/releases/2.x/2.078.2/dmd_2.078.2-0_amd64.deb +sudo dpkg -i /tmp/dmd_2.078.2-0_amd64.deb +dmd --version | head -1 + # update-alternatives nonsense to force gcc-6 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 100 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 100 diff --git a/camisole/languages/__init__.py b/camisole/languages/__init__.py index a175145..a660a02 100644 --- a/camisole/languages/__init__.py +++ b/camisole/languages/__init__.py @@ -39,6 +39,7 @@ def load_from_environ(): __all__ = [ 'ada', 'c', + 'd', 'csharp', 'cxx', 'haskell', diff --git a/camisole/languages/d.py b/camisole/languages/d.py new file mode 100644 index 0000000..b2ce421 --- /dev/null +++ b/camisole/languages/d.py @@ -0,0 +1,18 @@ +from camisole.models import Lang, Program + + +class D(Lang): + source_ext = '.d' + compiler = Program('dmd') + allowed_dirs = ['/etc'] + reference_source = r''' +void main() +{ + import std.stdio: writeln; + writeln("42"); +} +''' + + def compile_opt_out(self, output): + # '-of' and its value as two distinct arguments is illegal (go figure) + return ['-of' + output] diff --git a/doc/changelog.rst b/doc/changelog.rst index a40465e..6536aa9 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,8 +1,16 @@ Changelog ========= -1.0.0 -***** +1.1 +*** + +New features +------------ + +* Add support for the D language. + +1.0 +*** Breaking changes ---------------- diff --git a/setup.py b/setup.py index 6ae59d5..2879b59 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='camisole', - version='1.0', + version='1.1', packages=find_packages(), url='https://github.com/prologin/camisole', license='GPL',