-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
all: pre install | ||
|
||
pre: | ||
git submodule init | ||
git submodule update | ||
|
||
install: | ||
python setup.py install --user | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule pybind11
deleted from
617cb6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,19 @@ | |
import platform | ||
import subprocess | ||
|
||
from glob import glob | ||
from distutils.version import LooseVersion | ||
from setuptools import setup, Extension | ||
from setuptools.command.build_ext import build_ext | ||
import setuptools | ||
|
||
this_dir = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
class CMakeExtension(Extension): | ||
def __init__(self, name, sourcedir=''): | ||
Extension.__init__(self, name, sources=[]) | ||
def __init__(self, name, sourcedir=this_dir): | ||
Extension.__init__(self, name, | ||
include_dirs=[os.path.join(this_dir, 'include'), os.path.join(this_dir, 'pybind11')], | ||
sources=sorted(glob("src/*.cpp"))) | ||
self.sourcedir = os.path.abspath(sourcedir) | ||
|
||
class CMakeBuild(build_ext): | ||
|
@@ -60,14 +64,17 @@ def build_extension(self, ext): | |
self.distribution.get_version()) | ||
if not os.path.exists(self.build_temp): | ||
os.makedirs(self.build_temp) | ||
subprocess.check_call(['git', 'init']) | ||
subprocess.check_call(['git', 'submodule', 'add', 'https://github.com/pybind/pybind11.git']) | ||
subprocess.check_call(['git', 'submodule', 'update', '--init', '--recursive']) | ||
subprocess.check_call(['cmake', "{}".format(ext.sourcedir)] + cmake_args, | ||
cwd=self.build_temp, env=env) | ||
subprocess.check_call(['cmake', '--build', '.'] + build_args, | ||
cwd=self.build_temp) | ||
|
||
setup( | ||
name='Fred-Frechet', | ||
version='1.6', | ||
version='1.7.2', | ||
author='Dennis Rohde', | ||
author_email='[email protected]', | ||
description='Frechet Distance and Clustering Library', | ||
|
@@ -78,5 +85,6 @@ def build_extension(self, ext): | |
ext_modules=[CMakeExtension('backend')], | ||
install_requires=['cvxopt', 'matplotlib'], | ||
cmdclass=dict(build_ext=CMakeBuild), | ||
data_files=[('pybind11', ['.gitmodules'])], | ||
zip_safe=False, | ||
) |