-
Cristian Lalescu authoredCristian Lalescu authored
setup.py 4.63 KiB
################################################################################
# #
# Copyright 2015-2019 Max Planck Institute for Dynamics and Self-Organization #
# #
# This file is part of TurTLE. #
# #
# TurTLE is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published #
# by the Free Software Foundation, either version 3 of the License, #
# or (at your option) any later version. #
# #
# TurTLE is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with TurTLE. If not, see <http://www.gnu.org/licenses/> #
# #
# Contact: Cristian.Lalescu@ds.mpg.de #
# #
################################################################################
AUTHOR = 'Cristian C Lalescu'
AUTHOR_EMAIL = 'Cristian.Lalescu@ds.mpg.de'
import os
import shutil
import datetime
import sys
import subprocess
import pickle
### package versioning
import get_version
VERSION = get_version.main()
print('This is TurTLE version ' + VERSION)
import distutils.cmd
class CompileLibCommand(distutils.cmd.Command):
description = 'Compile TurTLE library.'
user_options = [
('timing-output=', None, 'Toggle timing output.'),
('fftw-estimate=', None, 'Use FFTW ESTIMATE.'),
('split-fftw-many=', None, 'Turn on SPLIT_FFTW_MANY.'),
('disable-fftw-omp=', None, 'Turn Off FFTW OpenMP.'),
]
def initialize_options(self):
self.timing_output = 0
self.fftw_estimate = 0
self.disable_fftw_omp = 0
self.split_fftw_many = 0
return None
def finalize_options(self):
self.timing_output = (int(self.timing_output) == 1)
self.split_fftw_many = (int(self.split_fftw_many) == 1)
self.fftw_estimate = (int(self.fftw_estimate) == 1)
self.disable_fftw_omp = (int(self.disable_fftw_omp) == 1)
return None
def run(self):
### save compiling information
pickle.dump(
{'install_date' : now,
'VERSION' : VERSION,
'git_revision' : git_revision},
open('turtle/install_info.pickle', 'wb'),
protocol = 2)
return None
from setuptools import setup
setup(
name = 'TurTLE',
packages = ['TurTLE', 'TurTLE/test'],
install_requires = ['numpy>=1.8', 'h5py>=2.2.1'],
package_data = {'TurTLE': ['test/B32p1e4_checkpoint_0.h5',
'test/particle_set/NSVEparticle_set.hpp',
'test/particle_set/NSVEparticle_set.cpp',
]},
entry_points = {
'console_scripts': [
'turtle = TurTLE.__main__:main',
'turtle.test_NSVEparticles = TurTLE.test.test_turtle_NSVEparticles:main',
'turtle.test_particles = TurTLE.test.test_particles:main',
'turtle.test_Parseval = TurTLE.test.test_Parseval:main',
'turtle.test_fftw = TurTLE.test.test_fftw:main',
'turtle.test_Heun_p2p = TurTLE.test.test_Heun_p2p:main'],
},
version = VERSION,
########################################################################
# useless stuff folows
# if anyone knows how to open the README when calling this script from
# cmake, please let me know.
########################################################################
description = 'Turbulence Tools: Lagrangian and Eulerian',
#long_description = open('${PROJECT_SOURCE_DIR}/README.rst', 'r').read(),
author = AUTHOR,
author_email = AUTHOR_EMAIL,
license = 'GPL version 3.0')