Skip to content

Commit b2f8509

Browse files
committed
Fix eigen unpacking directory
1 parent e28cd90 commit b2f8509

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,15 @@ def run(self):
250250
# tfile.extractall('eigen')
251251
log.info("Fetching Eigen...")
252252
urlretrieve(EIGEN3_DOWNLOAD_URL, "eigen.zip")
253+
except Exception as e:
254+
raise DistutilsSetupError("Could not download Eigen from %r: %s" % (EIGEN3_DOWNLOAD_URL, e))
255+
try:
253256
log.info("Unpacking Eigen...")
254-
EIGEN3_INCLUDE_DIR = os.path.join(BUILD_DIR, "eigen")
255257
os.mkdir(EIGEN3_INCLUDE_DIR)
256258
with zipfile.ZipFile("eigen.zip") as zfile:
257259
zfile.extractall(EIGEN3_INCLUDE_DIR)
258-
except:
259-
raise DistutilsSetupError("Could not download Eigen from %r" % EIGEN3_DOWNLOAD_URL)
260+
except Exception as e:
261+
raise DistutilsSetupError("Could not extract Eigen to %r: %s" % (EIGEN3_INCLUDE_DIR, e))
260262

261263
os.environ["CXX"] = CXX_PATH
262264
os.environ["CC"] = CC_PATH
@@ -347,7 +349,7 @@ def run(self):
347349

348350
try:
349351
import pypandoc
350-
long_description = pypandoc.convert("README.md", "rst")
352+
long_description = pypandoc.convert_file("README.md", "rst")
351353
long_description = "\n".join(line for line in long_description.splitlines() if "<#" not in line)
352354
except:
353355
long_description = ""

0 commit comments

Comments
 (0)