Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwantspectrum
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kwant
kwantspectrum
Commits
6e40930d
Commit
6e40930d
authored
Mar 24, 2020
by
Kloss
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename kwant-spectrum to kwantspectrum
parent
069a5c5b
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
206 additions
and
197 deletions
+206
-197
.coveragerc
.coveragerc
+2
-2
.gitignore
.gitignore
+1
-0
AUTHORS.rst
AUTHORS.rst
+0
-12
INSTALL.rst
INSTALL.rst
+0
-93
LICENSE.rst
LICENSE.rst
+3
-3
MANIFEST.in
MANIFEST.in
+16
-3
README.rst
README.rst
+40
-31
doc/Makefile
doc/Makefile
+1
-1
doc/source/conf.py
doc/source/conf.py
+12
-10
doc/source/index.rst
doc/source/index.rst
+2
-2
doc/source/reference.rst
doc/source/reference.rst
+3
-3
doc/source/tutorial.rst
doc/source/tutorial.rst
+3
-9
kwantspectrum/__init__.py
kwantspectrum/__init__.py
+6
-9
kwantspectrum/_kwant_spectrum_version.py
kwantspectrum/_kwant_spectrum_version.py
+0
-0
kwantspectrum/kwant_spectrum.py
kwantspectrum/kwant_spectrum.py
+2
-2
kwantspectrum/tests/__init__.py
kwantspectrum/tests/__init__.py
+0
-0
kwantspectrum/tests/test_kwant_spectrum.py
kwantspectrum/tests/test_kwant_spectrum.py
+2
-2
kwantspectrum/version.py
kwantspectrum/version.py
+2
-2
pytest.ini
pytest.ini
+4
-4
setup.py
setup.py
+107
-9
No files found.
.coveragerc
View file @
6e40930d
...
...
@@ -2,8 +2,8 @@
omit =
*tests*
*__init__*
kwant
_
spectrum/_kwant_spectrum_version.py
kwant
_
spectrum/version.py
kwantspectrum/_kwant_spectrum_version.py
kwantspectrum/version.py
branch = True
[report]
exclude_lines =
...
...
.gitignore
View file @
6e40930d
...
...
@@ -4,4 +4,5 @@ __pycache__/
/doc/build/
*~
.coverage
*.egg-info/
AUTHORS.rst
deleted
100644 → 0
View file @
069a5c5b
The Kwant-Spectrum authors can be reached at tkwant-authors@kwant-project.org.
Kwant-Spectrum has been developed by
* Thomas Kloss (CEA Grenoble)
Contributors
* Christoph Groth (CEA Grenoble)
* Xavier Waintal (CEA Grenoble)
(CEA = Commissariat à l'énergie atomique et aux énergies alternatives)
INSTALL.rst
deleted
100644 → 0
View file @
069a5c5b
Installation
============
This section covers the installation of Kwant_Spectrum on a GNU/Linux
system as Debian and Ubuntu via the command line.
Requirements
^^^^^^^^^^^^
Kwant_Spectrum has following non-Python dependency:
- `Kwant <https://kwant-project.org/>`_
The non-Python dependencies of Kwant_Spectrum can be installed with the following command::
sudo apt-add-repository -s ppa:kwant-project/ppa
sudo apt-get update
sudo apt-get install python3-kwant
Kwant_Spectrum requires at least Python 3.5. The following packages must
be installed to build Kwant_Spectrum:
- `NumPy <https://numpy.org/>`_
- `SciPy <https://www.scipy.org/>`_
Most packages can be installed from the command line
by the standard Python package manager `pip <https://pip.pypa.io/en/stable/>`_ via::
sudo pip3 install numpy scipy
The *pip* command can be also used within the Anaconda Python distribution,
see the instructions for `Conda <#conda>`__.
For version requirements we refer to the *requirements* section in
:download:`setup.py <../../../setup.py>`.
Testing requirements
--------------------
The Kwant_Spectrum test suite requires the following Python packages:
- `pytest <https://docs.pytest.org/en/latest/>`_
- `pytest-cov <https://pytest-cov.readthedocs.io/en/latest/>`_
- `pytest-flake8 <https://pypi.org/project/pytest-flake8/>`_
The packages can be installed by the standard *pip* command::
sudo pip3 install pytest pytest-cov pytest-flake8
Documentation requirements
--------------------------
The Kwant_Spectrum test suite requires the following Python packages:
- `sphinx <https://www.sphinx-doc.org/en/master/>`_
- `jupyter-sphinx <https://jupyter-sphinx.readthedocs.io/en/latest/>`_
The packages can be installed by the standard *pip* command::
sudo pip3 install sphinx jupyter-sphinx
Installating Kwant_Spectrum
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Kwant_Spectrum can be installed with pip via::
sudo pip3 install kwant_spectrum
Building Kwant_Spectrum for development
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For development, Kwant_Spectrum should first be cloned from the official repository::
git clone https://gitlab.kwant-project.org/kwant/spectrum.git
Then, after *cd* into the local repository,
one can locally build kwant_spectrum with the command::
python3 setup.py build_ext -i
Conda
^^^^^
.. _conda:
Kwant_Spectrum provides no dedicated Anaconda support. It is however possible to
install packages via *pip* and *git* similarly with conda.
First, *pip* and *git* must be installed for conda with::
conda install git pip
Kwant-Spectrum can then be installed with the commands given above.
LICENSE.rst
View file @
6e40930d
=====================
=
Kwant-
Spectrum license
=====================
=
=====================
kwant
Spectrum license
=====================
Copyright 2018-2019 T. Kloss (CEA), C. W. Groth (CEA), X. Waintal (CEA),
and others.
...
...
MANIFEST.in
View file @
6e40930d
include *.rst
include test_*.py
include .coveragerc
include LICENSE.rst
include MANIFEST.in
include README.rst
include doc/Makefile
include doc/source/about.rst
include doc/source/conf.py
include doc/source/
*
.rst
include doc/source/
index
.rst
include doc/source/kwantdoctheme/static/kwantdoctheme.css
include doc/source/kwantdoctheme/theme.conf
include doc/source/reference.rst
include doc/source/tutorial.rst
include kwantspectrum/__init__.py
include kwantspectrum/_kwant_spectrum_version.py
include kwantspectrum/kwant_spectrum.py
include kwantspectrum/tests/__init__.py
include kwantspectrum/tests/test_kwant_spectrum.py
include kwantspectrum/version.py
include pytest.ini
include setup.py
README.rst
View file @
6e40930d
About
Kwant-
Spectrum
===================
=
About
kwant
Spectrum
===================
Kwant-
Spectrum is an extension to `Kwant <http://kwant-project.org/>`__ that
kwant
Spectrum is an extension to `Kwant <http://kwant-project.org/>`__ that
adaptively analyzes band structures of infinite quasi-1d systems. The
bandstructure is approximated to an arbitrary precision by piecewise cubic
polynomials. Functionality to deal with special points, intervals, and the
periodic nature of the spectrum is provided.
Kwant_Spectrum is distributed under the `2-clause BSD license <https://gitlab.kwant-project.org/kwant/
spectrum/-/blob/master/LICENSE.rst>`_
kwantSpectrum is distributed under the `2-clause BSD license <https://gitlab.kwant-project.org/kwant/kwant
spectrum/-/blob/master/LICENSE.rst>`_
Website: https://kwant-project.org/extensions/spectrum
Website: https://kwant-project.org/extensions/
kwant
spectrum
Source code: https://gitlab.kwant-project.org/kwant/spectrum
Source code: https://gitlab.kwant-project.org/kwant/
kwant
spectrum
Installation
############
This section covers the installation of
Kwant_
Spectrum on a GNU/Linux
This section covers the installation of
kwant
Spectrum on a GNU/Linux
system as Debian and Ubuntu via the command line.
Requirements
^^^^^^^^^^^^
Kwant_
Spectrum has following non-Python dependency:
kwant
Spectrum has following non-Python dependency:
- `Kwant <https://kwant-project.org/>`__
The non-Python dependencies of Kwant_Spectrum
can be installed with the following command::
Kwant
can be installed with the following command::
sudo apt-add-repository -s ppa:kwant-project/ppa
sudo apt-get update
sudo apt-get install python3-kwant
Kwant_
Spectrum requires at least Python 3.5. The following packages must
be installed to build
Kwant_
Spectrum:
kwant
Spectrum requires at least Python 3.5. The following packages must
be installed to build
kwant
Spectrum:
- `NumPy <https://numpy.org/>`_
- `SciPy <https://www.scipy.org/>`_
...
...
@@ -48,7 +48,7 @@ by the standard Python package manager `pip <https://pip.pypa.io/en/stable/>`_ v
Testing requirements
--------------------
The
Kwant_
Spectrum test suite requires the following Python packages:
The
kwant
Spectrum test suite requires the following Python packages:
- `pytest <https://docs.pytest.org/en/latest/>`_
- `pytest-cov <https://pytest-cov.readthedocs.io/en/latest/>`_
...
...
@@ -61,35 +61,31 @@ The packages can be installed by the standard *pip* command::
Documentation requirements
--------------------------
The Kwant_Spectrum test suite
requires the following Python packages:
Building the documentation
requires the following Python packages:
- `matplotlib <https://matplotlib.org/>`_
- `sphinx <https://www.sphinx-doc.org/en/master/>`_
- `jupyter-sphinx <https://jupyter-sphinx.readthedocs.io/en/latest/>`_
The packages can be installed by the standard *pip* command::
sudo pip3 install sphinx jupyter-sphinx
sudo pip3 install
matplotlib
sphinx jupyter-sphinx
Building
Kwant_
Spectrum
^^^^^^^^^^^^^^^^^^^^^^
^
Building
kwant
Spectrum
^^^^^^^^^^^^^^^^^^^^^^
Kwant-
Spectrum can be installed from PyPI with::
kwant
Spectrum can be installed from PyPI with::
sudo pip3 install kwant
_
spectrum
sudo pip3 install kwantspectrum
Alternatively, it can be installed directly from the source code repository::
sudo pip3 install git+https://gitlab.kwant-project.org/kwant/spectrum.git
sudo pip3 install git+https://gitlab.kwant-project.org/kwant/
kwant
spectrum.git
For development,
Kwant_Spectrum should first be cloned from the official repository
::
For development,
kwantSpectrum can be cloned from the official repository with
::
git clone https://gitlab.kwant-project.org/kwant/spectrum.git
Then, after *cd* into the local repository,
one can locally build kwant_spectrum with the command::
python3 setup.py build
git clone https://gitlab.kwant-project.org/kwant/kwantspectrum.git
Test suite
----------
...
...
@@ -116,7 +112,20 @@ Documentation
Full documentation including a tutorial:
- https://kwant-project.org/extensions/spectrum
- https://kwant-project.org/extensions/kwantspectrum
Communication
#############
The kwant-discuss mailing list is the main communication channel for
questions and discussions around kwantSpectrum. Searching and using the mailing list
is explained in section
`mailing list <https://kwant-project.org/community#mailing-list>`_.
- Mailing list: kwant-discuss@kwant-project.org
In addition, the authors can be reached by email, see below.
Contributing
...
...
@@ -132,16 +141,16 @@ a new merge request.
License
#######
Kwant_Spectrum distributed under BSD license, see ``LICENSE.rst`` in the
project repository.
kwantSpectrum is distributed under BSD license, see the file ``LICENSE.rst``
in the
project repository.
Authors
#######
The principle developer of
Kwant-
Spectrum is:
The principle developer of
kwant
Spectrum is:
* Thomas Kloss (CEA Grenoble)
* Thomas Kloss (CEA Grenoble)
, kloss@itp.uni-frankfurt.de
Contributors to the project are:
...
...
doc/Makefile
View file @
6e40930d
...
...
@@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS
=
SPHINXBUILD
=
sphinx-build
SPHINXPROJ
=
kwant
-
spectrum
SPHINXPROJ
=
kwantspectrum
SOURCEDIR
=
source
BUILDDIR
=
build
...
...
doc/source/conf.py
View file @
6e40930d
...
...
@@ -13,14 +13,16 @@
# -- Project information -----------------------------------------------------
project
=
'kwant
-
spectrum'
project
=
'kwantspectrum'
copyright
=
'2018-2019, T. Kloss, C. W. Groth, X. Waintal, et al.'
author
=
'T. Kloss, C. W. Groth, X. Waintal, et al.'
# The short X.Y version
version
=
''
# The full version, including alpha/beta/rc tags
release
=
'0.0'
# The full version, including alpha/beta/rc tags.
import
kwantspectrum
release
=
kwantspectrum
.
__version__
# The short X.Y version.
version
=
release
[:
len
(
release
)
-
len
(
release
.
lstrip
(
'012345679.'
))].
rstrip
(
'.'
)
# -- General configuration ---------------------------------------------------
...
...
@@ -100,7 +102,7 @@ html_static_path = []
# -- Options for HTMLHelp output ---------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename
=
'kwant
-
spectrumdoc'
htmlhelp_basename
=
'kwantspectrumdoc'
# -- Options for LaTeX output ------------------------------------------------
...
...
@@ -127,7 +129,7 @@ latex_elements = {
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents
=
[
(
master_doc
,
'kwant
-spectrum.tex'
,
'kwant-
spectrum Documentation'
,
(
master_doc
,
'kwant
spectrum.tex'
,
'kwant
spectrum Documentation'
,
'T. Kloss, C. W. Groth, X. Waintal, et al.'
,
'manual'
),
]
...
...
@@ -137,7 +139,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages
=
[
(
master_doc
,
'kwant
-spectrum'
,
'kwant-
spectrum Documentation'
,
(
master_doc
,
'kwant
spectrum'
,
'kwant
spectrum Documentation'
,
[
author
],
1
)
]
...
...
@@ -148,8 +150,8 @@ man_pages = [
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents
=
[
(
master_doc
,
'kwant
-spectrum'
,
'kwant-
spectrum Documentation'
,
author
,
'kwant
-
spectrum'
,
'One line description of project.'
,
(
master_doc
,
'kwant
spectrum'
,
'kwant
spectrum Documentation'
,
author
,
'kwantspectrum'
,
'One line description of project.'
,
'Miscellaneous'
),
]
...
...
doc/source/index.rst
View file @
6e40930d
Kwant-
Spectrum |release| documentation
=====================================
=
kwant
Spectrum |release| documentation
=====================================
.. toctree::
:maxdepth: 2
...
...
doc/source/reference.rst
View file @
6e40930d
:mod:`kwant
_
spectrum` -- Reference documentation
===============================================
=
:mod:`kwantspectrum` -- Reference documentation
===============================================
.. automodule:: kwant
_
spectrum
.. automodule:: kwantspectrum
:members:
doc/source/tutorial.rst
View file @
6e40930d
Kwant
-
Spectrum
tutorial
======================
=
kwant
Spectrum
tutorial
======================
For
many
situations
we
need
to
calculate
and
analyze
the
band
structure
of
a
semi
-
infinite
lead
.
In
the
following
we
will
look
at
a
simple
toy
...
...
@@ -83,7 +83,7 @@ A much more convenient method for examining the spectrum is the
..
jupyter
-
execute
::
import
kwant
_
spectrum
as
ks
import
kwantspectrum
as
ks
spec
=
ks
.
spectrum
(
lead
)
...
...
@@ -505,12 +505,6 @@ the number evaluation points used internally.
print
(
'tolerance= {}, number of points= {}'
.
format
(
tol
,
len
(
spec
.
x
)))
..
parsed
-
literal
::
tolerance
=
0.0001
,
number
of
points
=
57
tolerance
=
1e-08
,
number
of
points
=
533
Note
that
``
tol
``
affects
both
the
matching
and
the
interpolation
step
.
First
,
if
the
tolerance
becomes
too
large
,
the
internally
used
matching
algorithm
(
see
``
_match_functions
``
below
)
may
no
longer
be
able
to
...
...
kwant
_
spectrum/__init__.py
→
kwantspectrum/__init__.py
View file @
6e40930d
# Copyright 2018-2020
Kwant-S
pectrum authors.
# Copyright 2018-2020
kwants
pectrum authors.
#
# This file is part of
Kwant-S
pectrum. It is subject to the license terms in
# This file is part of
kwants
pectrum. It is subject to the license terms in
# the file LICENSE.rst found in the top-level directory of this distribution.
from
.
import
version
__all__
=
[]
from
.
import
version
,
kwant_spectrum
version
.
ensure_python
()
__version__
=
version
.
version
__all__
=
[]
for
module
in
(
'kwant_spectrum'
,
):
exec
(
'from . import {0}'
.
format
(
module
))
__all__
.
append
(
module
)
available
=
[
(
'kwant_spectrum'
,
kwant_spectrum
.
__all__
)
]
...
...
@@ -21,3 +17,4 @@ available = [
for
module
,
names
in
available
:
exec
(
'from .{0} import {1}'
.
format
(
module
,
', '
.
join
(
names
)))
__all__
.
extend
(
names
)
kwant
_
spectrum/_kwant_spectrum_version.py
→
kwantspectrum/_kwant_spectrum_version.py
View file @
6e40930d
File moved
kwant
_
spectrum/kwant_spectrum.py
→
kwantspectrum/kwant_spectrum.py
View file @
6e40930d
# Copyright 2018-2020
Kwant-S
pectrum authors.
# Copyright 2018-2020
kwants
pectrum authors.
#
# This file is part of
Kwant-S
pectrum. It is subject to the license terms in
# This file is part of
kwants
pectrum. It is subject to the license terms in
# the file LICENSE.rst found in the top-level directory of this distribution.
from
functools
import
partial
,
wraps
...
...
kwant
_
spectrum/tests/__init__.py
→
kwantspectrum/tests/__init__.py
View file @
6e40930d
File moved
kwant
_
spectrum/tests/test_kwant_spectrum.py
→
kwantspectrum/tests/test_kwant_spectrum.py
View file @
6e40930d
# Copyright 2018-2020
Kwant-S
pectrum authors.
# Copyright 2018-2020
kwants
pectrum authors.
#
# This file is part of
Kwant-S
pectrum. It is subject to the license terms in
# This file is part of
kwants
pectrum. It is subject to the license terms in
# the file LICENSE.rst found in the top-level directory of this distribution.
from
functools
import
partial
...
...
kwant
_
spectrum/version.py
→
kwantspectrum/version.py
View file @
6e40930d
# Copyright 2018-2020
Kwant-S
pectrum authors.
# Copyright 2018-2020
kwants
pectrum authors.
#
# This file is part of
Kwant-S
pectrum. It is subject to the license terms in
# This file is part of
kwants
pectrum. It is subject to the license terms in
# the file LICENSE.rst found in the top-level directory of this distribution.
import
sys
...
...
pytest.ini
View file @
6e40930d
[pytest]
# add coverage report, source analyzer, and pep8 compliance checks
addopts
=
--cov=kwant
_
spectrum --cov-config=.coveragerc --flake8
testpaths
=
kwant
_
spectrum
addopts
=
--cov=kwantspectrum --cov-config=.coveragerc --flake8
testpaths
=
kwantspectrum
flake8-ignore
=
E501
# lines too long
W503
# line break before binary operator
kwant
_
spectrum/kwant_spectrum.py
E722
# do not use bare 'except'
kwant
_
spectrum/__init__.py
ALL
# __version__ import confuse flakes
kwantspectrum/kwant_spectrum.py
E722
# do not use bare 'except'
kwantspectrum/__init__.py
ALL
# __version__ import confuse flakes
setup.py
View file @
6e40930d
#!/usr/bin/env python3
from
setuptools
import
setup
,
find_package
s
import
o
s
import
importlib
import
subprocess
from
setuptools
import
setup
,
find_packages
from
distutils.command.build
import
build
as
build_orig
from
setuptools.command.sdist
import
sdist
as
sdist_orig
STATIC_VERSION_PATH
=
(
'kwantspectrum'
,
'_kwant_spectrum_version.py'
)
distr_root
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
# Get the long description from the README file.
with
open
(
'README.rst'
,
encoding
=
'utf-8'
)
as
f
:
long_description
=
f
.
read
()
def
check_versions
():
global
version
,
version_is_from_git
# Let kwant
-
spectrum itself determine its own version.
# We cannot simply import kwant
-
spectrum, as it is not built yet.
spec
=
importlib
.
util
.
spec_from_file_location
(
'version'
,
'kwant
_
spectrum/version.py'
)
# Let kwantspectrum itself determine its own version.
# We cannot simply import kwantspectrum, as it is not built yet.
spec
=
importlib
.
util
.
spec_from_file_location
(
'version'
,
'kwantspectrum/version.py'
)
version_module
=
importlib
.
util
.
module_from_spec
(
spec
)
spec
.
loader
.
exec_module
(
version_module
)
version_module
.
ensure_python
()
return
version_module
.
version
version
=
version_module
.
version
version_is_from_git
=
version_module
.
version_is_from_git
def
write_version
(
fname
):
# This could be a hard link, so try to delete it first. Is there any way
# to do this atomically together with opening?
try
:
os
.
remove
(
fname
)
except
OSError
:
pass
with
open
(
fname
,
'w'
)
as
f
:
f
.
write
(
"# This file has been created by setup.py.
\n
"
)
f
.
write
(
"version = '{}'
\n
"
.
format
(
version
))
class
build
(
build_orig
):
def
run
(
self
):
super
().
run
()
write_version
(
os
.
path
.
join
(
self
.
build_lib
,
*
STATIC_VERSION_PATH
))
def
git_lsfiles
():
if
not
version_is_from_git
:
return
try
:
p
=
subprocess
.
Popen
([
'git'
,
'ls-files'
],
cwd
=
distr_root
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
except
OSError
:
return
if
p
.
wait
()
!=
0
:
return
return
p
.
communicate
()[
0
].
decode
().
split
(
'
\n
'
)[:
-
1
]
# Make the command "sdist" depend on "build". This verifies that the
# distribution in the current state actually builds. It also makes sure that
# the Cython-made C files will be up-to-date and included in the source.
class
sdist
(
sdist_orig
):
sub_commands
=
[(
'build'
,
None
)]
+
sdist_orig
.
sub_commands
def
run
(
self
):
"""Create MANIFEST.in from git if possible, otherwise check that
MANIFEST.in is present.
Right now (2015) generating MANIFEST.in seems to be the only way to
include files in the source distribution that setuptools does not think
should be there. Setting include_package_data to True makes setuptools
include *.pyx and other source files in the binary distribution.
"""
manifest_in_file
=
'MANIFEST.in'
manifest
=
os
.
path
.
join
(
distr_root
,
manifest_in_file
)
names
=
git_lsfiles
()
if
names
is
None
:
if
not
(
os
.
path
.
isfile
(
manifest
)
and
os
.
access
(
manifest
,
os
.
R_OK
)):
print
(
"Error:"
,
manifest_in_file
,
"file is missing and Git is not available"
" to regenerate it."
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
else
:
with
open
(
manifest
,
'w'
)
as
f
:
for
name
in
names
:
a
,
sep
,
b
=
name
.
rpartition
(
'/'
)
if
b
==
'.gitignore'
:
continue
stem
,
dot
,
extension
=
b
.
rpartition
(
'.'
)
f
.
write
(
'include {}'
.
format
(
name
))
if
extension
==
'pyx'
:
f
.
write
(
''
.
join
([
' '
,
a
,
sep
,
stem
,
dot
,
'c'
]))
f
.
write
(
'
\n
'
)
super
().
run
()
if
names
is
None
:
msg
=
(
"Git was not available to generate the list of files to be "
"included in the
\n
source distribution. The old {} was used."
)
msg
=
msg
.
format
(
manifest_in_file
)
print
(
banner
(
' Caution '
),
msg
,
banner
(),
sep
=
'
\n
'
,
file
=
sys
.
stderr
)
def
make_release_tree
(
self
,
base_dir
,
files
):
super
().
make_release_tree
(
base_dir
,
files
)
write_version
(
os
.
path
.
join
(
base_dir
,
*
STATIC_VERSION_PATH
))
def
main
():
version
=
check_versions
()
check_versions
()
setup
(
name
=
'kwant
-
spectrum'
,
name
=
'kwantspectrum'
,
version
=
version
,
description
=
'Adaptive band structure analyzer for Kwant leads'
,
long_description
=
long_description
,
url
=
'https://gitlab.kwant-project.org/kwant/spectrum'
,
url
=
'https://gitlab.kwant-project.org/kwant/
kwant
spectrum'
,
author
=
'T. Kloss, C. W. Groth, X. Waintal, et al.'
,
author_email
=
'kloss@itp.uni-frankfurt.de'
,
classifiers
=
[
...
...
@@ -41,9 +137,11 @@ def main():
],
keywords
=
'physics kwant bandstructure'
,
packages
=
find_packages
(
'.'
),
cmdclass
=
{
'build'
:
build
,
'sdist'
:
sdist
},
python_requires
=
'>=3.5'
,
install_requires
=
[
'kwant >= 1.4'
,
'numpy'
,
'scipy'
],
extras_require
=
{
'test'
:
[
'pytest'
],
},
extras_require
=
{
'test'
:
[
'pytest'
,
'pytest-cov'
,
'pytest-flake8'
],
},
)
if
__name__
==
'__main__'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment