Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "3rdparty/pybind11"]
path = 3rdparty/pybind11
url = https://github.com/pybind/pybind11
1 change: 1 addition & 0 deletions .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if [ "$TEST_PYTHON" = "yes" ]; then
echo '[build_ext]' > setup.cfg
echo 'coverage = yes' >> setup.cfg
# pip's build isolation prevents us getting .gcno files, so build with setuptools
pip install pybind11==2.5.0
CC="$CC -Werror" python ./setup.py install
else
CC="$CC -Werror" pip install -v .
Expand Down
1 change: 0 additions & 1 deletion 3rdparty/pybind11
Submodule pybind11 deleted from 7ec2dd
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "pybind11==2.5.0"]
# If updating pybind11 version, also update .travis/script.sh
19 changes: 7 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

# Copyright 2015, 2017, 2019 SKA South Africa
# Copyright 2015, 2017, 2019-2020 SKA South Africa
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
Expand All @@ -15,14 +15,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from __future__ import print_function
from setuptools import setup, find_packages, Extension
from setuptools.command.build_ext import build_ext
import glob
import os
import os.path
import subprocess

from setuptools import setup, find_packages, Extension
from setuptools.command.build_ext import build_ext

import pybind11


def find_version():
# Cannot simply import it, since that tries to import spead2 as well, which
Expand Down Expand Up @@ -121,13 +123,6 @@ def build_extension(self, ext):
raise SystemExit("configure not found. Either download a release " +
"from https://pypi.python.org/pypi/spead2 or run " +
"./bootstrap.sh if not using a release.")
if not os.path.exists(os.path.join(
os.path.dirname(__file__),
'3rdparty', 'pybind11', 'include', 'pybind11', 'pybind11.h')):
raise SystemExit("pybind11 not found. Either download a release " +
"from https://pypi.python.org/pypi/spead2 or run " +
"git submodule update --init --recursive if not " +
"using a release.")

libraries = ['boost_system']

Expand All @@ -140,7 +135,7 @@ def build_extension(self, ext):
glob.glob('src/py_*.cpp')),
depends=glob.glob('include/spead2/*.h'),
language='c++',
include_dirs=['include', '3rdparty/pybind11/include'],
include_dirs=['include', pybind11.get_include()],
extra_compile_args=['-std=c++11', '-g0', '-fvisibility=hidden'],
libraries=libraries)
]
Expand Down