build 897 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. distdir="/var/tmp/dist/[% project %]"
  4. [% IF c("var/windows") -%]
  5. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  6. [% ELSE -%]
  7. [% c("var/set_PTDIR_DOCSDIR") -%]
  8. mkdir -p $PTDIR
  9. [% END -%]
  10. mkdir -p /var/tmp/build
  11. tar -C /var/tmp/build -xf $rootdir/[% project %]-[% c('version') %].tar.gz
  12. cd /var/tmp/build/[% project %]-[% c('version') %]
  13. [% IF c("var/windows") -%]
  14. pydir="$distdir/python"
  15. mkdir -p $pydir/Lib/site-packages
  16. export PYTHONPATH="$(wine winepath -w $pydir)\\Lib\\site-packages"
  17. $PYTHON setup.py install --prefix=$(wine winepath -w $pydir)
  18. [% ELSE -%]
  19. python2 setup.py build --build-lib build
  20. cp -a build/argparse.py $PTDIR/
  21. [% END -%]
  22. cd $distdir
  23. [% c('tar', {
  24. tar_src => [ '.' ],
  25. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  26. }) %]