[pynfft] 01/09: Imported Upstream version 1.3.1

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Fri Jun 13 09:32:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository pynfft.

commit 951c20f28d1363e10bd79c889ac737cccae49f91
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Fri Jun 13 08:45:06 2014 +0100

    Imported Upstream version 1.3.1
---
 CHANGELOG.txt                |   6 ++
 PKG-INFO                     |   2 +-
 doc/source/conf.py           |   2 +-
 doc/source/tutorial.rst~     | 192 -------------------------------------------
 pyNFFT.egg-info/PKG-INFO     |   2 +-
 pyNFFT.egg-info/SOURCES.txt  |   7 +-
 pyNFFT.egg-info/requires.txt |   2 +-
 pynfft/nfft.c                |   2 +-
 pynfft/solver.c              |   2 +-
 setup.py                     |  51 ++++--------
 10 files changed, 33 insertions(+), 235 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index f4bceec..5605cf9 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,6 +1,12 @@
 Changelog
 =========
 
+Changes in version 1.3.1
+------------------------
+
+    * setup: fix build from cythonized sources
+    * setup: remove obsolete custom clean command
+
 Changes in version 1.3
 ----------------------
 
diff --git a/PKG-INFO b/PKG-INFO
index 4648e52..59b7825 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyNFFT
-Version: 1.3.0
+Version: 1.3.1
 Summary: A pythonic wrapper around NFFT
 Home-page: https://github.com/ghisvail/pyNFFT.git
 Author: Ghislain Vaillant
diff --git a/doc/source/conf.py b/doc/source/conf.py
index f61862e..f3cc355 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -50,7 +50,7 @@ copyright = u'2013, Ghislain Vaillant'
 # The short X.Y version.
 version = '1.3'
 # The full version, including alpha/beta/rc tags.
-release = '1.3.0'
+release = '1.3.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/doc/source/tutorial.rst~ b/doc/source/tutorial.rst~
deleted file mode 100644
index aa355d2..0000000
--- a/doc/source/tutorial.rst~
+++ /dev/null
@@ -1,192 +0,0 @@
-Using the NFFT
-==============
-
-In this tutorial, we assume that you are already familiar with the `non-uniform
-discrete Fourier transform
-<http://en.wikipedia.org/wiki/Non-uniform_discrete_Fourier_transform>`_ and the
-`NFFT library <http://www-user.tu-chemnitz.de/~potts/nfft/>`_ used for fast
-computation of NDFTs. 
-
-Like the `FFTW library <http://www.fftw.org/>`_, the NFFT library relies on a
-specific data structure, called a plan, which stores all the data required for
-efficient computation and re-use of the NDFT. Each plan is tailored for a
-specific transform, depending on the geometry, level of precomputation and
-design parameters. The `NFFT manual
-<http://www-user.tu-chemnitz.de/~potts/nfft/guide3/html/index.html>`_ contains
-comprehensive explanation on the NFFT implementation.
-
-The pyNFFT package provides a set of Pythonic wrappers around the main data
-structures of the NFFT library. Use of Python wrappers allows to simplify the
-manipulation of the library, whilst benefiting from the significant speedup
-provided by its C-implementation. Although the NFFT library supports many more
-applications, only the NFFT and iterative solver components have been wrapped
-so far. 
-
-This tutorial is split into three main sections. In the first one, the general
-workflow for using the core of the :class:`pynfft.NFFT` class will be
-explained. Then, the :class:`pynfft.NFFT` class API will be detailed and
-illustrated with examples for the univariate and multivariate cases. Finally,
-the :class:`pynfft.Solver` iterative solver class will be briefly presented. 
-
-.. _workflow:
- 
-Workflow
---------
-
-For users already familiar with the NFFT C-library, the workflow is basically
-the same. It consists in the following three steps:
-
-    #. instantiation
-
-    #. precomputation
-
-    #. execution
-
-In step 1, information such as the geometry of the transform or the desired
-level of precomputation is provided to the constructor, which takes care of
-allocating the internal arrays of the plan.
-
-Precomputation (step 2) can be started once the location of the non-uniform
-nodes have been set to the plan. Depending on the size of the transform and
-level of precomputation, this step may take some time.
-
-Finally (step 3), the forward or adjoint NFFT is computed by first setting the
-input data in either `f_hat` (forward) or `f` (adjoint), calling the
-corresponding function, and reading the output in `f` (forward) or `f_hat`
-(adjoint).
-
-.. _using_nfft:
-
-Using the NFFT
---------------
-
-The core of this library is encapsulated in the :class:`pyfftw.NFFT class`.
-
-**instantiation**
-
-The bare minimum to instantiate a new :class:`pynfft.NFFT` plan is to specify
-the geometry to the transform, i.e. the shape of the matrix containing the
-uniform data `N` and the number of non-uniform nodes `M`.
-
-    >>> from pynfft.nfft import NFFT
-    >>> plan = NFFT([16, 16], 92)
-    >>> print plan.M
-    96
-    >>> print plan.N
-    (16, 16)
-
-More control over the precision, storage and speed of the NFFT can be gained by
-overriding the default design parameters `m`, `n` and `flags`. For more
-information, please consult the `NFFT manual
-<http://www-user.tu-chemnitz.de/~potts/nfft/guide3/html/index.html>`_.
-
-**precomputation**
-
-Precomputation *must* be performed before calling any of the transforms. The
-user can manually set the nodes of the NFFT object using the
-:attr:`pynfft.nfft.NFFT.x` attribute before calling the
-:meth:`pynfft.nfft.NFFT.precompute` method.
-
-    >>> plan.x = x
-    >>> plan.precompute()  
-
-**execution**
-
-The actual forward and adjoint NFFT are performed by calling the
-:meth:`pynfft.nfft.NFFT.trafo` and :meth:`pynfft.nfft.NFFT.adjoint` methods.
-
-    >>> # forward transform
-    >>> plan.f_hat = f_hat
-    >>> f = plan.trafo()
-    >>> # adjoint transform
-    >>> plan.f = f
-    >>> f_hat = plan.adjoint()
-
-.. _using_solver:
-
-Using the iterative solver
---------------------------
-
-**instantiation**
-
-The instantiation of a :class:`pynfft.solver.Solver` object requires an
-instance of :class:`pynfft.nfft.NFFT`. The following code shows you a simple
-example:
-
-    >>> from pynfft import NFFT, Solver
-    >>> plan = NFFT(N, M)
-    >>> infft = Solver(plan)
-
-It is strongly recommended to use an already *precomputed*
-:class:`pynfft.nfft.NFFT` object to instantiate a :class:`pynfft.solver.Solver`
-object, or at the very least, make sure to call its precompute method before
-using solver.
-
-Since the solver will typically run several iterations before converging to a
-stable solution, it is also strongly encourage to use the maximum level of
-precomputation to speed-up each call to the NFFT.  Please check the paragraph
-regarding the choice of precomputation flags for the :class:`pynfft.nfft.NFFT`. 
-
-By default, the :class:`pynfft.solver.Solver` class uses the Conjugate Gradient
-of the first kind method (CGNR flag). This may be overriden in the constructor:
-
-    >>> infft = Solver(plan, flags='CGNE')
-
-Convergence to a stable solution can be significantly speed-up using the right
-pre-conditioning weights. These can accessed by the 
-:attr:`pynfft.solver.Solver.w` and :attr:`pynfft.solver.Solver.w_hat`
-attributes. By default, these weights are set to 1.
-
-    >>> infft = Solver(plan)
-    >>> infft.w = w
-
-**using the solver**
-
-Before iterating, the solver has to be intialized. As a reminder, make sure the
-:class:`pynfft.nfft.NFFT` object used to instantiate the solver has been
-*precomputed*. Otherwise, the solver will be in an undefined state and will not
-behave properly.
-
-Initialization of the solver is performed by first setting the non-uniform
-samples :attr:`pynfft.solver.Solver.y`, an initial guess of the solution
-:attr:`pynfft.solver.Solver.f_hat_iter` and then calling the
-:meth:`pynfft.solver.Solver.before_loop` method.
-
-    >>> infft.y = y
-    >>> infft.f_hat_iter = f_hat_iter
-    >>> infft.before_loop()
-
-By default, the initial guess of the solution is set to 0.
-
-After initialization of the solver, a single iteration can be performed by
-calling the :meth:`pynfft.solver.Solver.loop_one_step` method. With each
-iteration, the current solution is written in the
-:attr:`pynfft.solver.Solver.f_hat_iter` attribute.
-
-    >>> infft.loop_one_step()
-    >>> print infft.f_hat_iter
-    >>> infft.loop_one_step()
-    >>> print infft.f_hat_iter
-
-The :class:`pynfft.Solver` class only supports one iteration at a time.  It is
-at the discretion to implement the desired stopping condition, based for
-instance on a maximum iteration count or a threshold value on the residuals.
-The residuals can be read in the :attr:`pynfft.solver.Solver.r_iter` attribute.
-Below are two simple examples:
-
-    - with a maximum number of iterations:
-
-    >>> niter = 10  # set number of iterations to 10
-    >>> for iiter in range(niter):
-    >>>	    infft.loop_one_step()
-
-    - with a threshold value:
-
-    >>> threshold = 1e-3
-    >>> try:
-    >>>	    while True:
-    >>>		infft.loop_one_step()
-    >>>		if(np.all(infft.r_iter < threshold)):
-    >>>		    raise StopCondition
-    >>> except StopCondition:
-    >>>	    # rest of the algorithm
diff --git a/pyNFFT.egg-info/PKG-INFO b/pyNFFT.egg-info/PKG-INFO
index 4648e52..59b7825 100644
--- a/pyNFFT.egg-info/PKG-INFO
+++ b/pyNFFT.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyNFFT
-Version: 1.3.0
+Version: 1.3.1
 Summary: A pythonic wrapper around NFFT
 Home-page: https://github.com/ghisvail/pyNFFT.git
 Author: Ghislain Vaillant
diff --git a/pyNFFT.egg-info/SOURCES.txt b/pyNFFT.egg-info/SOURCES.txt
index 82f4c3c..f3f19a6 100644
--- a/pyNFFT.egg-info/SOURCES.txt
+++ b/pyNFFT.egg-info/SOURCES.txt
@@ -5,15 +5,14 @@ README.rst
 requirements.txt
 setup.cfg
 setup.py
-/home/ghislain-debian/workspace/pyNFFT/pynfft/nfft.pyx
-/home/ghislain-debian/workspace/pyNFFT/pynfft/solver.pyx
-/home/ghislain-debian/workspace/pyNFFT/pynfft/util.pyx
+/home/shared/workspace/pyNFFT/pynfft/nfft.c
+/home/shared/workspace/pyNFFT/pynfft/solver.c
+/home/shared/workspace/pyNFFT/pynfft/util.c
 doc/Makefile
 doc/source/api.rst
 doc/source/conf.py
 doc/source/index.rst
 doc/source/tutorial.rst
-doc/source/tutorial.rst~
 doc/source/api/nfft.rst
 doc/source/api/solver.rst
 doc/source/api/util.rst
diff --git a/pyNFFT.egg-info/requires.txt b/pyNFFT.egg-info/requires.txt
index 296d654..24ce15a 100644
--- a/pyNFFT.egg-info/requires.txt
+++ b/pyNFFT.egg-info/requires.txt
@@ -1 +1 @@
-numpy
\ No newline at end of file
+numpy
diff --git a/pynfft/nfft.c b/pynfft/nfft.c
index 083556c..2191a29 100644
--- a/pynfft/nfft.c
+++ b/pynfft/nfft.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.20.1post0 (Debian 0.20.1+git90-g0e6e38e-1) on Sun Jun  1 20:15:03 2014 */
+/* Generated by Cython 0.20.1post0 (Debian 0.20.1+git90-g0e6e38e-1+b1) on Thu Jun 12 20:27:41 2014 */
 
 #define PY_SSIZE_T_CLEAN
 #ifndef CYTHON_USE_PYLONG_INTERNALS
diff --git a/pynfft/solver.c b/pynfft/solver.c
index 3f66f90..83cf269 100644
--- a/pynfft/solver.c
+++ b/pynfft/solver.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.20.1post0 (Debian 0.20.1+git90-g0e6e38e-1) on Sun Jun  1 12:58:26 2014 */
+/* Generated by Cython 0.20.1post0 (Debian 0.20.1+git90-g0e6e38e-1+b1) on Thu Jun 12 20:28:32 2014 */
 
 #define PY_SSIZE_T_CLEAN
 #ifndef CYTHON_USE_PYLONG_INTERNALS
diff --git a/setup.py b/setup.py
index 875637e..6b96e2d 100644
--- a/setup.py
+++ b/setup.py
@@ -17,9 +17,16 @@
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 try:
-    from setuptools import setup, Command, Extension
+    from setuptools import setup, Extension
 except ImportError:
-    from distutils.core import setup, Command, Extension
+    from distutils.core import setup, Extension
+
+try:
+    from Cython.Distutils import build_ext
+except ImportError:
+    use_cython = False
+else:
+    use_cython = True
 
 import os
 import os.path
@@ -35,10 +42,11 @@ library_dirs = []
 package_data = {}
 libraries = ['nfft3_threads', 'nfft3', 'fftw3_threads', 'fftw3', 'm']
 
+cmdclass = {}
+ext_modules = []
 
-try:
-    from Cython.Distutils import build_ext as build_ext
-    ext_modules = [
+if use_cython:
+    ext_modules += [
         Extension(
             name=package_name+'.nfft',
             sources=[os.path.join(package_dir, 'nfft.pyx')],
@@ -67,9 +75,9 @@ try:
             '-fstrict-aliasing -ffast-math'.split(),
         ),
     ]
-
-except ImportError as e:
-    ext_modules = [
+    cmdclass.update({'build_ext': build_ext})
+else:
+    ext_modules += [
         Extension(
             name=package_name+'.nfft',
             sources=[os.path.join(package_dir, 'nfft.c')],
@@ -100,29 +108,7 @@ except ImportError as e:
     ]
 
 
-class CleanCommand(Command):
-
-    description = "Force clean of build files and directories."
-    user_options = []
-
-    def initialize_options(self):
-        self.all = None
-
-    def finalize_options(self):
-        pass
-
-    def run(self):
-        for _dir in [os.path.join(setup_dir, d)
-                for d in ('build', 'dist', 'doc/build', 'pyNFFT.egg-info')]:
-            if os.path.exists(_dir):
-                shutil.rmtree(_dir)
-        for root, _, files in os.walk(package_dir):
-            for _file in files:
-                if not _file.endswith(('.py', '.pyx', '.pxd', '.pxi')):
-                    os.remove(os.path.join(package_dir, _file))
-
-
-version = '1.3.0'
+version = '1.3.1'
 release = True
 if not release:
     version += '-dev'
@@ -169,8 +155,7 @@ setup_args = {
     'ext_modules': ext_modules,
     'include_dirs': include_dirs,
     'package_data': package_data,
-    'cmdclass': {'build_ext': build_ext,
-                 'clean': CleanCommand,},
+    'cmdclass': cmdclass,
     'install_requires': ['numpy'],
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pynfft.git



More information about the debian-science-commits mailing list