Skip to content

Commit

Permalink
added build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
glichtner committed Mar 27, 2019
1 parent daef792 commit a0a7cd5
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 4 deletions.
3 changes: 3 additions & 0 deletions build_debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rm -rf build
rm pystackreg/*.so
python setup_debug.py build_ext --force --inplace --debug
4 changes: 4 additions & 0 deletions build_production.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rm -rf dist
rm -rf build
python setup.py build
python setup.py sdist
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@
import numpy.distutils.misc_util
import os


def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
return open(os.path.join(os.path.dirname(__file__), fname)).read()


exec(open('pystackreg/version.py').read())


setup(
name="pystackreg",
description='Python implementation of the ImageJ/FIJI Plugin TurboReg/StackReg',
long_description=read('README.rst'),
version=__version__,
author='Gregor Lichtner (python/C++ port); TurboReg Author: Philippe Thévenaz, Biomedical Imaging Group, Swiss Federal Institute of Technology Lausanne',
url='https://bitbucket.org/glichtner/pystackreg',
#package_dir={'pystackreg':'pysrc'},
packages=['pystackreg'],
ext_modules=[
Extension("pystackreg.turboreg", [
"src/pymain.cpp",
#"src/PyStackReg.cpp",
"src/TurboReg.cpp",
"src/TurboRegMask.cpp",
"src/TurboRegImage.cpp",
Expand All @@ -31,6 +32,6 @@ def read(fname):
extra_compile_args=['-std=c++11']
)],
include_dirs=['inc/'] + numpy.distutils.misc_util.get_numpy_include_dirs(),
install_requires = ['numpy', 'tqdm']
install_requires=['numpy', 'tqdm']
)

37 changes: 37 additions & 0 deletions setup_debug.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-

import setuptools
from distutils.core import setup, Extension
import numpy.distutils.misc_util
import os


def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()


exec(open('pystackreg/version.py').read())


setup(
name="pystackreg",
description='Python implementation of the ImageJ/FIJI Plugin TurboReg/StackReg',
long_description=read('README.rst'),
version=__version__,
author='Gregor Lichtner (python/C++ port); TurboReg Author: Philippe Thévenaz, Biomedical Imaging Group, Swiss Federal Institute of Technology Lausanne',
url='https://bitbucket.org/glichtner/pystackreg',
packages=['pystackreg'],
ext_modules=[
Extension("pystackreg.turboreg", [
"src/pymain.cpp",
"src/TurboReg.cpp",
"src/TurboRegMask.cpp",
"src/TurboRegImage.cpp",
"src/TurboRegTransform.cpp",
"src/TurboRegPointHandler.cpp"],
extra_compile_args = ["-O0"]
)],
include_dirs=['inc/'] + numpy.distutils.misc_util.get_numpy_include_dirs(),
install_requires = ['numpy', 'tqdm']
)

19 changes: 19 additions & 0 deletions winbuild.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CALL c:\ProgramData\Anaconda2\scripts\activate py27
rd /s/q build
python setup.py build
python setup.py bdist_wheel

CALL c:\ProgramData\Anaconda2\scripts\activate py36
rd /s/q build
python setup.py build
python setup.py bdist_wheel

CALL c:\ProgramData\Anaconda2\scripts\activate py27_32bit
rd /s/q build
python setup.py build
python setup.py bdist_wheel

CALL c:\ProgramData\Anaconda2\scripts\activate py36_32bit
rd /s/q build
python setup.py build
python setup.py bdist_wheel

0 comments on commit a0a7cd5

Please sign in to comment.