File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 10
10
# deal with MPL sandbox violations during easy_install
11
11
os .environ ['MPLCONFIGDIR' ] = '.'
12
12
13
- import surfer
13
+ # get the version, don't import surfer here so setup works on headless systems
14
+ version = None
15
+ with open (os .path .join ('surfer' , '__init__.py' ), 'r' ) as fid :
16
+ for line in (line .strip () for line in fid ):
17
+ if line .startswith ('__version__' ):
18
+ version = line .split ('=' )[1 ].strip ().strip ('"' )
19
+ break
20
+ if version is None :
21
+ raise RuntimeError ('Could not determine version' )
14
22
15
23
DISTNAME = 'pysurfer'
16
24
DESCRIPTION = descr
20
28
URL = 'http://pysurfer.github.com'
21
29
LICENSE = 'BSD (3-clause)'
22
30
DOWNLOAD_URL = 'https://github.com/nipy/PySurfer'
23
- VERSION = surfer . __version__
31
+ VERSION = version
24
32
25
33
import setuptools # we are using a setuptools namespace
26
34
from numpy .distutils .core import setup
You can’t perform that action at this time.
0 commit comments