File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 16
16
#
17
17
# Copyright 2014-2017 Jon Lund Steffensen <[email protected] >
18
18
19
+ from __future__ import print_function
20
+
21
+ import sys
19
22
from setuptools import setup , find_packages
23
+ import pkg_resources
20
24
21
25
# Read long description
22
26
with open ('README.rst' ) as f :
23
27
long_description = f .read ()
24
28
29
+ # Test whether psamm-import is currently installed. Since the psamm-import
30
+ # functionality was moved to this package (except Excel importers), only newer
31
+ # versions of psamm-import are compatible with recent versions of PSAMM.
32
+ try :
33
+ pkg_resources .get_distribution ('psamm-import <= 0.15.2' )
34
+ except (pkg_resources .DistributionNotFound ,
35
+ pkg_resources .VersionConflict ):
36
+ pass
37
+ else :
38
+ msg = (
39
+ 'Please upgrade or uninstall psamm-import before upgrading psamm:\n '
40
+ '$ pip install --upgrade psamm-import\n '
41
+ ' OR\n '
42
+ '$ pip uninstall psamm-import'
43
+ '\n \n '
44
+ ' The functionality of the psamm-import package has been moved into'
45
+ ' the psamm package, and the psamm-import package now only contains'
46
+ ' the model-specific Excel importers.' )
47
+ print (msg , file = sys .stderr )
48
+ sys .exit (1 )
49
+
50
+
25
51
setup (
26
52
name = 'psamm' ,
27
53
version = '0.30' ,
You can’t perform that action at this time.
0 commit comments