Commit 3d73b19c authored by Joseph Weston's avatar Joseph Weston Committed by Joseph Weston
Browse files

update setup script and copied function in

parent cf351598
......@@ -22,8 +22,7 @@ def get_version_from_git():
if p.wait() != 0:
# TODO: use os.path.samefile once we depend on Python >= 3.3.
if os.path.normpath(p.communicate()[0].rstrip('\n')) != distr_root:
if not os.path.samefile(p.communicate()[0].decode().rstrip('\n'), distr_root):
# The top-level directory of the current Git repository is not the same
# as the root directory of the Kwant distribution: do not extract the
# version from Git.
......@@ -16,7 +16,7 @@ import os
import glob
import imp
import subprocess
import ConfigParser
import configparser
from setuptools import setup, find_packages, Extension, Command
from sysconfig import get_platform
from distutils.errors import DistutilsError, DistutilsModuleError, \
......@@ -263,7 +263,7 @@ def search_mumps():
except OSError:
p.communicate(input='int main() {}\n')
p.communicate(input=b'int main() {}\n')
if p.wait() == 0:
return {'libraries': libs}
return {}
......@@ -297,7 +297,7 @@ def extensions():
#### Add components of Kwant with external compile-time dependencies.
config = ConfigParser.ConfigParser()
config = configparser.ConfigParser()
with open(CONFIG_FILE) as f:
......@@ -334,7 +334,7 @@ def extensions():
if kwrds:
build_summary.append('Auto-configured MUMPS')
if kwrds:
for name, value in lapack.iteritems():
for name, value in lapack.items():
kwrds.setdefault(name, []).extend(value)
kwrds.setdefault('depends', []).extend(
[CONFIG_FILE, 'kwant/linalg/cmumps.pxd'])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment