Commit b48d526e authored by Christoph Groth's avatar Christoph Groth
Browse files

finish README file, add license information

parent 62521594
=================
Tinyarray License
=================
Copyright 2012-2013 Tinyarray authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
...@@ -2,5 +2,9 @@ ...@@ -2,5 +2,9 @@
# in addition to the default ones. # in addition to the default ones.
include MANIFEST.in include MANIFEST.in
include LICENSE
include TODO
include README_WINDOWS.txt
include test_tinyarray.py include test_tinyarray.py
include benchmark.py
recursive-include src *.hh recursive-include src *.hh
This is tinyarray version 0.0 =========
============================= Tinyarray
=========
Copyright 2012 Commissariat à l'énergie atomique et aux énergies alternatives. Tinyarray is an numerical array package for Python. It implements a basic
All rights reserved. subset of NumPy's functionality in a way optimized for small arrays, both in
terms memory usage of runtime. For small arrays, speedups of 3 to 35 times are
measured compared to NumPy. Unlike NumPy arrays, tinyarrays are immutable and
thus can be used as dictionary keys.
Written by Christoph Groth <christoph.groth@cea.fr>.
License
-------
License information Tinyarray is licensed under the "simplified BSD License". The license is
------------------- included in the file LICENSE in this directory.
This software (tinyarray) is NOT TO BE DISTRIBUTED, neither as part nor as a
whole except with explicit permission of the author.
Authors
-------
Instructions The principal developer of Tinyarray is Christoph W. Groth (SPSMS-INAC-CEA
Grenoble). His contributions are part of his work at `CEA <http://cea.fr>`_,
the French Commissariat à l'énergie atomique et aux énergies alternatives.
The author can be reached at christoph.groth@cea.fr.
Other people that have contributed to Tinyarray include
* Michael Wimmer (Leiden University)
* Joseph Weston (SPSMS-INAC-CEA Grenoble)
To find out who exactly wrote a certain part of Tinyarray, please use the
"blame" feature of `git <http://git-scm.com/>`_, the version control system.
Installation
------------ ------------
tinyarray implements a subset of NumPy's functionality in a way optimized for Tinyarray requires Python 2.6 or 2.7.
small arrays, both in terms memory usage of runtime. For small arrays,
speedups of 3 to 35 times are measured compared to NumPy. Unlike NumPy arrays,
tinyarrays are immutable and thus can be used as dictionary keys.
To install, run To install, run
......
A note for users of Microsoft Windows
-------------------------------------
To read the text files in this directory (README, LICENSE, etc.), right-click,
choose "Open", and open with "WordPad". ("Notepad" will not display the files
properly.)
#!/usr/bin/env python #!/usr/bin/env python
# Copyright 2012-2013 Tinyarray authors.
#
# This file is part of Tinyarray. It is subject to the license terms in the
# LICENSE file found in the top-level directory of this distribution and at
# http://kwant-project.org/tinyarray/license. A list of Tinyarray authors can
# be found in the README file at the top-level directory of this distribution
# and at http://kwant-project.org/tinyarray.
import subprocess import subprocess
import os import os
from distutils.core import setup, Extension from distutils.core import setup, Extension
README_FILE = 'README'
STATIC_VERSION_FILE = 'src/version.hh' STATIC_VERSION_FILE = 'src/version.hh'
tinyarray_dir = os.path.dirname(os.path.abspath(__file__)) tinyarray_dir = os.path.dirname(os.path.abspath(__file__))
...@@ -61,6 +70,25 @@ def version(): ...@@ -61,6 +70,25 @@ def version():
return version return version
def long_description():
text = []
skip = True
try:
with open(README_FILE) as f:
for line in f:
if line == "\n":
if skip:
skip = False
continue
else:
break
if not skip:
text.append(line.rstrip())
except:
return ''
return '\n'.join(text)
module = Extension('tinyarray', module = Extension('tinyarray',
language='c++', language='c++',
sources=['src/arithmetic.cc', 'src/array.cc', sources=['src/arithmetic.cc', 'src/array.cc',
...@@ -72,11 +100,13 @@ module = Extension('tinyarray', ...@@ -72,11 +100,13 @@ module = Extension('tinyarray',
def main(): def main():
setup(name='tinyarray', setup(name='tinyarray',
version=version(), version=version(),
author='Christoph Groth et al.', author='Christoph W. Groth et al.',
author_email='christoph.groth@cea.fr', author_email='christoph.groth@cea.fr',
description="A subset of NumPy optimized for small immutable arrays.", description="A subset of NumPy optimized for small immutable arrays.",
long_description=long_description(),
url="http://kwant-project.org/tinyarray/", url="http://kwant-project.org/tinyarray/",
license="BSD", license="BSD",
platforms=["Unix", "Linux", "Mac OS-X", "Windows"],
ext_modules=[module]) ext_modules=[module])
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://kwant-project.org/tinyarray/license. A list of Tinyarray authors can
// be found in the README file at the top-level directory of this distribution
// and at http://kwant-project.org/tinyarray.
#include <Python.h> #include <Python.h>
#include <limits> #include <limits>
#include <cmath> #include <cmath>
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://kwant-project.org/tinyarray/license. A list of Tinyarray authors can
// be found in the README file at the top-level directory of this distribution
// and at http://kwant-project.org/tinyarray.
#ifndef ARITHMETIC_HH #ifndef ARITHMETIC_HH
#define ARITHMETIC_HH #define ARITHMETIC_HH
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://kwant-project.org/tinyarray/license. A list of Tinyarray authors can
// be found in the README file at the top-level directory of this distribution
// and at http://kwant-project.org/tinyarray.
#include <Python.h> #include <Python.h>
#include <cstddef> #include <cstddef>
#include <sstream> #include <sstream>
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://kwant-project.org/tinyarray/license. A list of Tinyarray authors can
// be found in the README file at the top-level directory of this distribution
// and at http://kwant-project.org/tinyarray.
#ifndef ARRAY_HH #ifndef ARRAY_HH
#define ARRAY_HH #define ARRAY_HH
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://kwant-project.org/tinyarray/license. A list of Tinyarray authors can
// be found in the README file at the top-level directory of this distribution
// and at http://kwant-project.org/tinyarray.
#ifndef CONVERSION_HH #ifndef CONVERSION_HH
#define CONVERSION_HH #define CONVERSION_HH
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://kwant-project.org/tinyarray/license. A list of Tinyarray authors can
// be found in the README file at the top-level directory of this distribution
// and at http://kwant-project.org/tinyarray.
#include <Python.h> #include <Python.h>
#include "array.hh" #include "array.hh"
#include "arithmetic.hh" #include "arithmetic.hh"
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://kwant-project.org/tinyarray/license. A list of Tinyarray authors can
// be found in the README file at the top-level directory of this distribution
// and at http://kwant-project.org/tinyarray.
#ifndef FUNCTIONS_HH #ifndef FUNCTIONS_HH
#define FUNCTIONS_HH #define FUNCTIONS_HH
......
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