Skip to content

Commit ea911e0

Browse files
committed
Remove unneeded setup hacks
1 parent 4b2137c commit ea911e0

File tree

2 files changed

+9
-33
lines changed

2 files changed

+9
-33
lines changed

pymatbridge/__init__.py

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
1-
# We first need to detect if we're being called as part of the setup.py
2-
# procedure itself in a reliable manner.
3-
try:
4-
__PYMATBRIDGE_SETUP__
5-
except NameError:
6-
__PYMATBRIDGE_SETUP__ = False
7-
1+
from .pymatbridge import *
2+
from .version import __version__
83

9-
if __PYMATBRIDGE_SETUP__:
4+
try:
5+
from .publish import *
6+
except ImportError:
107
pass
11-
else:
12-
from .pymatbridge import *
13-
from .version import __version__
148

15-
try:
16-
from .publish import *
17-
except ImportError:
18-
pass
19-
20-
try:
21-
from .matlab_magic import *
22-
except ImportError:
23-
pass
9+
try:
10+
from .matlab_magic import *
11+
except ImportError:
12+
pass

setup.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,7 @@
22
"""Setup file for python-matlab-bridge"""
33

44
import os
5-
import sys
65

7-
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
8-
# update it when the contents of directories change.
9-
if os.path.exists('MANIFEST'):
10-
os.remove('MANIFEST')
11-
12-
# we need some code from inside the package to build it. use the same hack as
13-
# numpy to selectively import even if we don't have dependencies installed
14-
if sys.version_info[0] >= 3:
15-
import builtins
16-
else:
17-
import __builtin__ as builtins
18-
builtins.__PYMATBRIDGE_SETUP__ = True
196
try:
207
from setuptools import setup
218
except ImportError:

0 commit comments

Comments
 (0)