Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
8 changes: 7 additions & 1 deletion conda-recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
"%PYTHON%" setup.py install
:: Uncoment following two lines for local test build
cd %RECIPE_DIR%
cd ..

"%PYTHON%" setup.py build --compiler=mingw32
"%PYTHON%" setup.py install --skip-build

if errorlevel 1 exit 1

:: Add more build steps here, if they are necessary.
Expand Down
7 changes: 2 additions & 5 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ package:
build:
number: 1

script:
- cd $RECIPE_DIR/..
- LDFLAGS="-shared" FFLAGS=-fPIC $PYTHON setup.py install # [not win]

requirements:
build:
- python
- numpy
- numpy >=1.13.3
- lapack
- m2w64-gcc-fortran # [win]

run:
- python
Expand Down
19 changes: 18 additions & 1 deletion slycot/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,35 @@ def configuration(parent_package='', top_path=None):
pyver = sysconfig.get_config_var('VERSION')

if sys.platform == 'win32':
liblist = ['liblapack', 'libblas']
liblist = [
'lapack', 'lapacke', 'blas', 'gfortran'
]
extra_objects = [
]
ppath = os.sep.join(sys.executable.split(os.sep)[:-1])
library_dirs = [r'\Library\lib', ]
library_dirs = [ppath + l for l in library_dirs]
extra_link_args = [ ]
extra_compile_args = [ ]
else:
# this is needed on Py 3.x, and fails on Py 2.7
try:
abiflags = sys.abiflags
except AttributeError:
abiflags = ''
liblist = ['lapack', 'blas', 'python'+pyver+abiflags]
extra_objects = []
library_dirs = []
extra_link_args = []
extra_compile_args = []

config.add_extension(
name='_wrapper',
libraries=liblist,
extra_objects=extra_objects,
extra_link_args=extra_link_args,
library_dirs=library_dirs,
extra_compile_args=extra_compile_args,
sources=fortran_sources + f2py_sources)

config.make_config_py() # installs __config__.py
Expand Down