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
4b0f010f
Commit
4b0f010f
authored
9 years ago
by
Christoph Groth
Browse files
Options
Downloads
Patches
Plain Diff
update the previous commit for python 3
parent
4ef33db4
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
INSTALL.rst
+19
-13
19 additions, 13 deletions
INSTALL.rst
setup.py
+4
-4
4 additions, 4 deletions
setup.py
with
23 additions
and
17 deletions
INSTALL.rst
+
19
−
13
View file @
4b0f010f
...
...
@@ -19,8 +19,8 @@ Prerequisites
=============
Building Kwant requires
* `Python <http://python.org>`_
2.6
or
2.7 (Python 3 is supported by
Kwant 1.2 and above
),
* `Python <http://python.org>`_
3.4
or
above (Kwant 1.1 is the last version to
support Python 2
),
* `SciPy <http://scipy.org>`_ 0.9 or newer,
* `LAPACK <http://netlib.org/lapack/>`_ and `BLAS <http://netlib.org/blas/>`_,
(For best performance we recommend the free `OpenBLAS
...
...
@@ -55,15 +55,15 @@ Kwant can be built and installed following the `usual Python conventions
<http://docs.python.org/install/index.html>`_ by running the following commands
in the root directory of the Kwant distribution. ::
python setup.py build
python setup.py install
python
3
setup.py build
python
3
setup.py install
Depending on your system, you might have to run the second command with
administrator privileges (e.g. prefixing it with ``sudo``).
After installation, tests can be run with::
python -c 'import kwant; kwant.test()'
python
3
-c 'import kwant; kwant.test()'
The tutorial examples can be found in the directory ``tutorial`` inside the root
directory of the Kwant source distribution.
...
...
@@ -88,7 +88,7 @@ configuration file consists of sections, one for each dependency, led by a
[dependency-name] header and followed by name = value entries. Possible names
are keyword arguments for ``distutils.core.Extension`` (For a complete list,
see its `documentation
<http://docs.python.org/
2
/distutils/apiref.html#distutils.core.Extension>`_).
<http://docs.python.org/
3
/distutils/apiref.html#distutils.core.Extension>`_).
The corresponding values are whitespace-separated lists of strings.
The two currently possible sections are [lapack] and [mumps]. The former
...
...
@@ -124,7 +124,7 @@ from the `libRSVG <http://live.gnome.org/LibRsvg>`_ (Debian/Ubuntu package
``librsvg2-bin``) are needed to convert SVG drawings into the PDF format.
As a prerequisite for building the documentation, Kwant must have been built
successfully using ``python setup.py build`` as described above (or Kwant must
successfully using ``python
3
setup.py build`` as described above (or Kwant must
be already installed in Python's search path). HTML documentation is built by
entering the ``doc`` subdirectory of the Kwant package and executing ``make
html``. PDF documentation is generated by executing ``make latex`` followed
...
...
@@ -156,21 +156,24 @@ root.
2. Unpack Tinyarray, enter its directory. To build and install, run ::
python setup.py build
sudo python setup.py install
python
3
setup.py build
sudo python
3
setup.py install
3. Inside the Kwant source distribution's root directory run ::
python setup.py build
sudo python setup.py install
python
3
setup.py build
sudo python
3
setup.py install
By default the package will be installed under ``/usr/local``. Run ``python
By default the package will be installed under ``/usr/local``. Run ``python
3
setup.py --help install`` for installation options.
Mac OS X: MacPorts
==================
The following instructions are valid for Kwant 1.1 with Python 2.7. They need
to be updated for Kwant 1.2. (Help is welcome.)
The required dependencies of Kwant are best installed with one of the packaging
systems. Here we only consider the case of `MacPorts
<http://www.macports.org>`_ in detail. Some remarks for homebrew are given
...
...
@@ -193,7 +196,7 @@ below.
python setup.py build
sudo python setup.py install
5. Unpack Kwant, go to the Kwant directory, and edit ``build.conf`` to read::
p
5. Unpack Kwant, go to the Kwant directory, and edit ``build.conf`` to read::
[lapack]
extra_link_args = -Wl,-framework -Wl,Accelerate
...
...
@@ -218,6 +221,9 @@ with the environment variables ``CC`` and ``LDSHARED`` as shown above.
Mac OS X: homebrew
==================
The following instructions are valid for Kwant 1.1 with Python 2.7. They need
to be updated for Kwant 1.2. (Help is welcome.)
It is also possible to build Kwant using homebrew. The dependencies can be
installed as ::
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
4
−
4
View file @
4b0f010f
...
...
@@ -13,10 +13,10 @@ from __future__ import print_function
import
sys
v
=
sys
.
version_info
if
v
[:
2
]
not
in
[(
2
,
7
),
(
2
,
6
)]
:
error
=
"
This version of Kwant requires Python
2.6
or
2.7
.
\n
"
if
v
[
0
]
>
=
2
:
error
+=
"
Please use Kwant 1.2 or above
.
"
if
v
[:
2
]
<
(
3
,
4
)
:
error
=
"
This version of Kwant requires Python
3.4
or
above
.
\n
"
if
v
[
0
]
=
=
2
:
error
+=
"
Kwant 1.1 is the last version to support Python 2
.
"
print
(
error
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
...
...
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