Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joseph Weston
kwant
Commits
3d73b19c
Commit
3d73b19c
authored
9 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
update setup script and copied function in _common.py
parent
cf351598
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
kwant/_common.py
+1
-2
1 addition, 2 deletions
kwant/_common.py
setup.py
+4
-4
4 additions, 4 deletions
setup.py
with
5 additions
and
6 deletions
kwant/_common.py
+
1
−
2
View file @
3d73b19c
...
...
@@ -22,8 +22,7 @@ def get_version_from_git():
return
if
p
.
wait
()
!=
0
:
return
# 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.
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
4
−
4
View file @
3d73b19c
...
...
@@ -16,7 +16,7 @@ import os
import
glob
import
imp
import
subprocess
import
C
onfig
P
arser
import
c
onfig
p
arser
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
:
pass
else
:
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():
'
kwant/graph/c_slicer/slicer.h
'
]})]
#### Add components of Kwant with external compile-time dependencies.
config
=
C
onfig
P
arser
.
ConfigParser
()
config
=
c
onfig
p
arser
.
ConfigParser
()
try
:
with
open
(
CONFIG_FILE
)
as
f
:
config
.
readfp
(
f
)
...
...
@@ -334,7 +334,7 @@ def extensions():
if
kwrds
:
build_summary
.
append
(
'
Auto-configured MUMPS
'
)
if
kwrds
:
for
name
,
value
in
lapack
.
iter
items
():
for
name
,
value
in
lapack
.
items
():
kwrds
.
setdefault
(
name
,
[]).
extend
(
value
)
kwrds
.
setdefault
(
'
depends
'
,
[]).
extend
(
[
CONFIG_FILE
,
'
kwant/linalg/cmumps.pxd
'
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment