summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* DOC: put a copy of the text in LICENSE.txt into tools/swig/numpy.iRalf Gommers2015-03-181-0/+34
| | | | | | | | | Reason: numpy.i is supposed to be copied, not used from within an installed Numpy version. Closes gh-5690 [ci skip]
* Correct exit code if number of errors % 256 == 0Chris Lamb2015-02-157-7/+7
| | | | | | | For example, we had 256 errors (etc.) our process will exit with a successful error code which is incorrect and/or misleading. Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
* Use correct #ifdef __cplusplus guard to include std_complex.iMichele Vallisneri2015-02-131-2/+2
|
* ENH: added std::complex support to numpy.iGlen Mabey2014-11-077-12/+333
| | | | | | numpy.i now includes ready-made typemaps for std::complex<float> and std::complex<double> . Tests were added to testArray using a newly defined ArrayZ class.
* ENH: support parallel compilation of extensionsJulian Taylor2014-10-281-0/+3
| | | | | | | | | | | | | | Allow extensions using numpy.distutils to compile in parallel. By passing `--jobs=n` or `-j n` to `setup.py build` the compilation of extensions is now performed in `n` parallel processes. Additionally the environment variable NPY_NUM_BUILD_JOBS is used as the default value, if its unset the default is serial compilation. The parallelization is limited to within the files of an extension, so only numpy multiarraymodule really profits but its still a nice improvement when you have 2-4 cores. Unfortunately Cython will not profit at all as it tends to build one module per file.
* Merge pull request #5149 from charris/fix-ma-docs-for-OO-optionJulian Taylor2014-10-041-0/+5
|\ | | | | | | BUG: Make numpy import when run with Python flag '-OO
| * TST: Add test with python flag -OO.Charles Harris2014-10-041-0/+5
| |
* | MAINT: Update waf to 1.7.16Charles Harris2014-09-041-3/+3
| |
* | Merge pull request #4671 from charris/prepare-1.10-develCharles Harris2014-07-061-1/+1
|\ \ | | | | | | MAINT: start 1.10-devel.
| * | MAINT: Make NPY_RELAXED_STRIDE_CHECKING true by default.Charles Harris2014-05-061-1/+1
| | |
* | | BUG: disable garbage collector during memory allocation hookJulian Taylor2014-07-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a cython object contains numpy arrays the pure python allocation hook can trigger during cythons __dealloc__ method and trigger a second deletion of the object currently being deleted. To minimize the probabily that that happens disable the garbage collector during the hook. As this involves python calls it is still possible that a double delete occurs but chances are lowered, a proper solution would be C only hook like python 3.4 tracemalloc module. Closes gh-4834
* | | Fix typemap for Fortran ordered array inputAdam Reeve2014-06-161-3/+3
| |/ |/| | | | | | | | | The typemaps with size parameters after the array pointer were correct, but the typemaps with size parameters before the array pointer created arrays with C ordering.
* | BLD: add a simple python file to build cpucaps.dllJulian Taylor2014-06-042-0/+17
| | | | | | | | | | | | using scons seems to fail with wine 1.6, but one only needs to run three commands so its simpler to just put these into a script instead of trying to debug scons.
* | BUG: Fix missing fragment in ARGOUTVIEWM typemaps.David Froger2014-05-261-18/+18
| | | | | | | | | | | | | | | | | | | | The argout typemaps of all the ARGOUTVIEWM typemap suites make use of the free_cap function, defined in the NumPy_Utilities fragment, which was not listed in the fragment argument of the typemaps. As a result, the free_cap function is not included in the source generated code by SWIG, and the code do not compile (unless another typemap including the missing fragment has been used).
* | Merge pull request #4662 from matthew-brett/cythonize-for-wheelsRalf Gommers2014-05-111-1/+7
|\ \ | | | | | | BUG: cythonize sources for wheel build
| * | TST: add travis test for wheel build and installMatthew Brett2014-05-041-1/+7
| | | | | | | | | | | | | | | Add travis build that builds and installs wheel, runs tests from installed wheel.
* | | TST: update package list for chroot buildJulian Taylor2014-05-091-1/+2
| |/ |/| | | | | travis boxes are again badly out of date
* | MAINT: annotate reference stealing and burrowed refs in multiarrayJulian Taylor2014-04-241-1/+1
|/ | | | allows for better static analysis report with e.g. cpychecker
* BLD: remove cython c source from gitJulian Taylor2014-04-052-1/+200
| | | | | | | Instead generate at build time. The generated sources are still part of the sdist. tools/cythonize.py is copied from SciPy with small changes to the configuration.
* STY: Whitespace patrol on numpy.i.Charles Harris2014-03-121-6/+6
|
* MAINT: Move doc/swig to tools/swig.Charles Harris2014-03-1236-0/+7361
| | | | | | | Also update MANIFEST.in and documentation to reflect the move. The discussion of this change is at #2384. Closes #2384. Closes #4374.
* TST: work around outdated travis boxesJulian Taylor2014-03-061-0/+1
| | | | run manual apt-get update to pick up the latest py3 security update
* TST: switch i386 build to python3.4 defaulting ubuntu 14.04Julian Taylor2014-02-251-3/+3
| | | | to do that fix a missing $DIST variable usage in the test script
* TST: bootstrap chroot in tmpfsJulian Taylor2014-02-131-0/+3
| | | | | | during bootstrap eatmydata is not available in the chroot so it takes a significant time. Avoid this by placing the whole chroot in a tmpfs ramdisk.
* TST: fail on declaration-after-statement in travis testJulian Taylor2014-01-241-1/+3
| | | | required for windows compilers
* TST: add travis test using python-dbgJulian Taylor2014-01-161-0/+13
| | | | | python-dbg adds couple extra asserts on reference counts, memory allocation and also enables a few numpy internal asserts.
* TST: run 32 bit test with python3Julian Taylor2014-01-111-6/+11
|
* MAINT: enable verbose bento buildJulian Taylor2014-01-031-1/+1
|
* TST: add 32 bit travis testsJulian Taylor2014-01-031-0/+104
| | | | | | | | Implemented by setting up a chroot in the travis VM and moving all the test logic, including bento build, to a single script. This is still reasonable fast, about twice as slow as the normal tests. When Travis updates to a newer OS it can be replaced by standard cross compiling.
* MAINT: update release scripts for building OS X binaries.Ralf Gommers2013-09-161-1/+1
| | | | Works with Python 3.x now that bdist_mpkg is ported (thanks @matthew-brett).
* STY: Giant comma spacing fixup.Charles Harris2013-08-182-3/+3
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* STY: Giant whitespace cleanup.Charles Harris2013-08-183-8/+4
| | | | Now is as good a time as any with open PR's at a low.
* MAINT: Remove tools/osxbuildNathaniel J. Smith2013-05-224-214/+0
| | | | | | | | These scripts have been broken for years (build.py errors out immediately if not running from an *svn* checkout), so I'm sure no-one's using them, and they only attract pointless maintenance fixes (py3 changes, keeping the pointless extra copy of the top-level README.txt up to date as in #3288). Let's just remove them.
* Merge pull request #3289 from rkern/fix-numpy.org-linksCharles Harris2013-05-041-1/+4
|\ | | | | BUG: Fix some README links to point to www.numpy.org
| * BUG: Fix some README links to point to www.numpy.orgRobert Kern2013-04-291-1/+4
| | | | | | | | Fixes #3288
* | MAINT: Apply 2to3 idioms fixer.Charles Harris2013-05-021-2/+1
|/ | | | | | | | | | | | | | | | | | | The idioms fixer makes the following replacements. 1) int <- bool 2) comparison or identity of types <- isinstance 3) a.sort() <- sorted(a) There were two problems that needed to be dealt with after the application of the fixer. First, the replacement of comparison or identity of types by isinstance was not always correct. The isinstance function returns true for subtypes whereas many of the places where the fixer made a substitution needed to check for exact type equality. Second, the sorted function was applied to arrays, but because it treats them as iterators and constructs a sorted list from the result, that is the wrong thing to do. Closes #3062.
* MAINT: Remove the tools/py3tool.py file.Charles Harris2013-04-241-301/+0
| | | | | The tools/py3tool.py file was responsible for running 2to3. Now that 2to3 is no longer run it is not needed and can be removed.
* 2to3: Apply unicode fixer.Charles Harris2013-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The unicode fixer strips the u from u'hi' and converts the unicode type to str. The first won't work for Python 2 and instead we replace the u prefix with the sixu function borrowed from the six compatibility package. That function calls the unicode constructor with the 'unicode_escape' encoder so that the many tests using escaped unicode characters like u'\u0900' will be handled correctly. That makes the sixu function a bit different from the asunicode function currently in numpy.compat and also provides a target that can be converted back to the u prefix when support for Python 3.2 is dropped. Python 3.3 reintroduced the u prefix for compatibility. The unicode fixer also replaces 'unicode' with 'str' as 'unicode' is no longer a builtin in Python 3. For code compatibility, 'unicode' is defined either as 'str' or 'unicode' in numpy.compat so that checks like if isinstance(x, unicode): ... will work properly for all python versions. Closes #3089.
* Merge pull request #3242 from charris/2to3-apply-types-fixerCharles Harris2013-04-211-1/+1
|\ | | | | 2to3: Apply types fixer.
| * 2to3: Apply types fixer.Charles Harris2013-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 3 removes the builtin types from the types module. The types fixer replaces such references with the builtin types where possible and also takes care of some special cases: types.TypeNone <- type(None) types.NotImplementedType <- type(NotImplemented) types.EllipsisType <- type(Ellipsis) The only two tricky substitutions are types.StringType <- bytes types.LongType <- int These are fixed up to support both Python 3 and Python 2 code by importing the long and bytes types from numpy.compat. Closes #3240.
* | Merge pull request #3249 from charris/2to3-apply-next-fixerCharles Harris2013-04-151-1/+1
|\ \ | | | | | | 2to3: Apply next fixer.
| * | 2to3: Apply next fixer.Charles Harris2013-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The next builtin has been available since Python 2.6 and allows `it.next()` to be replaced by `next(it)`. In Python 3 the `next` method is gone entirely, replaced entirely by the `__next__` method. The next fixer changes all the `it.next()` calls to the new form and renames the `next` methods to `__next__`. In order to keep Numpy code backwards compatible with Python 2, a `next` method was readded to all the Numpy iterators after the fixer was run so they all contain both methods. The presence of the appropriate method could have been made version dependent, but that looked unduly complicated. Closes #3072.
* | | 2to3: Apply urllib fixer.Charles Harris2013-04-141-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | Various functions have been moved around in the stdlib for Python 3, this fixes that up so that the code is valid in both Python 2 and Python 3. Note: monkey patching the stlib urlopen for testing looks a bit hokey to me, but I don't see an easier, more reliable way to do the test. Closes #3090.
* | 2to3: Skip isinstance fixer.Charles Harris2013-04-141-1/+1
|/ | | | | | | | | | | | | The isinstance fixer removes duplicate types in the second argument of isinstance(). For example, isinstance(x, (int, int)) is converted to isinstance(x, (int)). This would certainly apply if we let the long fixer replace long by int, but as is it does nothing. Duplicate entries are supposedly deprecated in Python 3, I'm not sure why or how, but it does not seem to be a problem at this point. If it ever becomes so, we can deal with it then. Closes #3085
* Merge pull request #3244 from charris/2to3-apply-zip-fixerCharles Harris2013-04-141-1/+1
|\ | | | | 2to3: Apply zip fixer.
| * 2to3: Apply zip fixer.Charles Harris2013-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | In Python 3 zip returns an iterator instead of a list. Consequently, in places where an iterator won't do it must be enclosed in list(...). Lists instead of iterators are also used in array constructors as using iterators there usually results in an object array containing an iterator object. Closes #3094
* | Merge pull request #3241 from charris/2to3-apply-nonzero-fixerCharles Harris2013-04-141-1/+1
|\ \ | | | | | | 2to3: Apply nonzero fixer.
| * | 2to3: Apply nonzero fixer.Charles Harris2013-04-131-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | In Python 3 the `__nonzero__` class method is replaced by `__bool__`. This only affects the MaskedArray class in numpy/oldnumeric/ma.py file and the simplest solution is to provide both methods. I have my doubts that the fixed up Python 3 version was correct or even tested, but I think the current solution should work for as long as oldnumeric stays in numpy. Closes #3073.
* | Merge pull request #3238 from charris/2to3-apply-renames-fixerCharles Harris2013-04-141-1/+1
|\ \ | | | | | | 2to3: Apply renames fixer.
| * | 2to3: Apply renames fixer.Charles Harris2013-04-131-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Rename sys.maxint to sys.maxsize when the Python version is >= 3. This change was made in Python 3 because all integers are 'long' integers and their maximum value bears no relationship to the C type that int used to represent. The new sys.maxsize value is the maximum value of Py_ssize_t. This change has not led to any reported problems since the numpy 1.5 release. Closes #3082