File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
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
- from surfer .__version__ import __version__
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 = __version__
31
+ VERSION = version
24
32
25
33
import setuptools # we are using a setuptools namespace
26
34
from numpy .distutils .core import setup
Original file line number Diff line number Diff line change 2
2
from viz import Brain , TimeViewer
3
3
from utils import verbose , set_log_level , set_log_file
4
4
5
- from __version__ import __version__
5
+ __version__ = "0.5.dev"
6
6
7
7
set_log_level ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments