Skip to content
Snippets Groups Projects
Commit 729beb3d authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

compilation in tox virtualenv works

parent 09839f19
Branches
Tags
No related merge requests found
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
...@@ -35,6 +35,9 @@ include_dirs = ['src', ...@@ -35,6 +35,9 @@ include_dirs = ['src',
######################################################################## ########################################################################
AUTHOR = 'Cristian C Lalescu'
AUTHOR_EMAIL = 'Cristian.Lalescu@ds.mpg.de'
import datetime import datetime
now = datetime.datetime.now() now = datetime.datetime.now()
date_name = '{0:0>4}{1:0>2}{2:0>2}'.format(now.year, now.month, now.day) date_name = '{0:0>4}{1:0>2}{2:0>2}'.format(now.year, now.month, now.day)
...@@ -51,11 +54,11 @@ src_file_list = ['field_descriptor', ...@@ -51,11 +54,11 @@ src_file_list = ['field_descriptor',
'spline_n2', 'spline_n2',
'spline_n3'] 'spline_n3']
header_list = ['src/base.hpp'] + ['src/' + fname + '.hpp' for fname in src_file_list] header_list = ['cpp/base.hpp'] + ['cpp/' + fname + '.hpp' for fname in src_file_list]
# not sure we need the MANIFEST.in file, but I might as well # not sure we need the MANIFEST.in file, but I might as well
with open('MANIFEST.in', 'w') as manifest_in_file: with open('MANIFEST.in', 'w') as manifest_in_file:
for fname in ['src/' + fname + '.cpp' for fname in src_file_list] + header_list: for fname in ['cpp/' + fname + '.cpp' for fname in src_file_list] + header_list:
manifest_in_file.write('include {0}\n'.format(fname)) manifest_in_file.write('include {0}\n'.format(fname))
libraries = ['fftw3_mpi', libraries = ['fftw3_mpi',
...@@ -67,20 +70,23 @@ from setuptools import setup, Extension ...@@ -67,20 +70,23 @@ from setuptools import setup, Extension
libbfps = Extension( libbfps = Extension(
'libbfps', 'libbfps',
sources = ['src/' + fname + '.cpp' for fname in src_file_list], sources = ['bfps/cpp/' + fname + '.cpp' for fname in src_file_list],
include_dirs = include_dirs, include_dirs = include_dirs,
libraries = libraries, libraries = libraries,
library_dirs = [os.path.join(local_install_dir, 'lib')]) library_dirs = [os.path.join(local_install_dir, 'lib'),
os.path.join(local_install_dir, 'lib64')])
setup( setup(
name = 'bfps', name = 'bfps',
packages = ['bfps'], packages = ['bfps'],
install_requires = ['numpy>=1.8', 'matplotlib>=1.3'], install_requires = ['numpy>=1.8', 'matplotlib>=1.3'],
ext_modules = [libbfps], ext_modules = [libbfps],
data_files = header_list, package_data = {'bfps': header_list},
######################################################################## ########################################################################
# useless stuff folows # useless stuff folows
######################################################################## ########################################################################
author = AUTHOR,
author_email = AUTHOR_EMAIL,
version = VERSION, version = VERSION,
license = 'Apache Version 2.0') license = 'Apache Version 2.0')
[tox] [tox]
envlist = py27 envlist = py27
[testenv] [testenv]
whitelist_externals =
echo
cp
passenv = LD_LIBRARY_PATH
setenv =
LD_LIBRARY_PATH = {env:LD_LIBRARY_PATH}:{envtmpdir}/../lib/python2.7/site-packages
sitepackages = True sitepackages = True
changedir = changedir =
{envtmpdir} {envtmpdir}
commands = commands =
echo $LD_LIBRARY_PATH
cp {toxinidir}/test.py {envtmpdir} cp {toxinidir}/test.py {envtmpdir}
python test.py --run --particles python test.py --run --particles
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment