1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
from distutils.core import setup
from distutils import sysconfig
import sys, os, glob
from os.path import join, split
import platform
scripts = [join("src", "bin", "viper")]
if platform.system() == "Windows" or "bdist_wininst" in sys.argv:
# In the Windows command prompt we can't execute Python scripts
# without a .py extension. A solution is to create batch files
# that runs the different scripts.
batch_files = []
for script in scripts:
batch_file = script + ".bat"
f = open(batch_file, "w")
f.write('python "%%~dp0\%s" %%*\n' % split(script)[1])
f.close()
batch_files.append(batch_file)
scripts.extend(batch_files)
setup(name='viper',
version='0.4.6',
description='Simple vtk based visualization software',
author='Ola Skavhaug et al',
author_email='skavhaug@simula.no',
url='http://www.fenics.org/wiki/Viper',
packages=['viper'],
package_dir={'viper': join("src", "viper")},
scripts=scripts,
package_data={'viper': [join("data", "*.lut")]},
data_files=[(join("share", "man", "man1"),
[join("doc", "man", "man1", "viper.1.gz")])]
)
|