Ticket #257 (closed defect: fixed)
sdist doesn't include all files when using conditional and "buildable: False"
|Reported by:||guest||Owned by:|
This is my cabal file:
Name: test Version: 0.1 Cabal-Version: >=1.2 Executable exe1 Hs-Source-Dirs: src Main-Is: Exe1.hs Build-Depends: base Executable exe2 Hs-Source-Dirs: src Main-Is: Exe2.hs if !os(linux) Buildable: False
Building, on linux, results in
% ./Setup.hs configure; ./Setup.hs build Configuring test-0.1... Warning: No license-file field. Preprocessing executables for test-0.1... Building test-0.1... [1 of 1] Compiling Main ( src/Exe1.hs, dist/build/exe1/exe1-tmp/Main.o ) Linking dist/build/exe1/exe1 ... [1 of 1] Compiling Main ( src/Exe2.hs, dist/build/exe2/exe2-tmp/Main.o ) Linking dist/build/exe2/exe2 ...
As is expected exe2 is built. However, sdist does not include the source file for exe2 in the tar-ball:
% ./Setup.hs sdist Building source dist for test-0.1... Preprocessing executables for test-0.1... Source tarball created: dist/test-0.1.tar.gz % tar -t -z -f dist/test-0.1.tar.gz test-0.1/ test-0.1/Setup.hs test-0.1/test.cabal test-0.1/src/ test-0.1/src/Exe1.hs