Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

Commit 34ba362

Browse files
committed
windows auto-mingw
linguist
1 parent b7d8f82 commit 34ba362

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.appveyor.yml

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ init:
1818

1919
install:
2020
- pip install -e .[tests]
21-
- cmd: del *.pyd
22-
- cmd: python setup.py build_ext --inplace --compiler=mingw32
2321

2422
test_script: pytest -rsv
2523

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
src/* linguist-vendored
2+
reference/* linguist-vendored
3+
14
.gitattributes text eol=lf
25
.gitignore text eol=lf
36
Makefile text eol=lf

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
[![Coverage Status](https://coveralls.io/repos/github/scivision/iri90/badge.svg?branch=master)](https://coveralls.io/github/scivision/iri90?branch=master)
33
[![Build status](https://ci.appveyor.com/api/projects/status/4h8pm345hscdpyf7?svg=true)](https://ci.appveyor.com/project/scivision/iri90)
44
[![PyPi version](https://img.shields.io/pypi/pyversions/iri90.svg)](https://pypi.python.org/pypi/iri90)
5-
[![PyPi formats](https://img.shields.io/pypi/format/iri90.svg)](https://pypi.python.org/pypi/iri90)
65
[![PyPi Download stats](http://pepy.tech/badge/iri90)](http://pepy.tech/project/iri90)
76

87

@@ -37,7 +36,7 @@ python -m pip install -e .
3736
```
3837

3938
### Windows
40-
If you get ImportError on Windows for the Fortran module, try from the `lowtran` directory:
39+
If you get ImportError on Windows for the Fortran module, try:
4140
```posh
4241
del *.pyd
4342
python setup.py build_ext --inplace --compiler=mingw32

setup.py

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
from numpy.distutils.core import setup, Extension
44
from glob import glob
55
from os.path import join
6+
from pathlib import Path
7+
import os
8+
9+
10+
if os.name == 'nt':
11+
sfn = Path(__file__).parent / 'setup.cfg'
12+
stxt = sfn.read_text()
13+
if '[build_ext]' not in stxt:
14+
with sfn.open('a') as f:
15+
f.write("[build_ext]\ncompiler = mingw32")
616

717
# %% fortran data files
818
iridata = glob(join('data', '*.asc'))

0 commit comments

Comments
 (0)