From 2c1aa631d9b82a5c7389fd0c1286a5ceb14562a5 2012-04-27 22:23:59 From: Min RK Date: 2012-04-27 22:23:59 Subject: [PATCH] Merge pull request #1642 from fperez/cherry-0.12.1 Cherry-picked commits from 0.12.1 release Principally documentation and build/release tweaks. --- diff --git a/IPython/core/release.py b/IPython/core/release.py index fe468cb..a4b7760 100644 --- a/IPython/core/release.py +++ b/IPython/core/release.py @@ -2,8 +2,8 @@ """Release data for the IPython project.""" #----------------------------------------------------------------------------- -# Copyright (c) 2008-2011, IPython Development Team. -# Copyright (c) 2001-2007, Fernando Perez +# Copyright (c) 2008, IPython Development Team. +# Copyright (c) 2001, Fernando Perez # Copyright (c) 2001, Janko Hauser # Copyright (c) 2001, Nathaniel Gray # @@ -45,9 +45,12 @@ IPython provides a rich toolkit to help you make the most out of using Python interactively. Its main components are: * Powerful interactive Python shells (terminal- and Qt-based). +* A web-based interactive notebook environment with all shell features plus + support for embedded figures, animations and rich media. * Support for interactive data visualization and use of GUI toolkits. * Flexible, embeddable interpreters to load into your own projects. -* Tools for high level and interactive parallel computing. +* A high-performance library for high level and interactive parallel computing + that works in multicore systems, clusters, supercomputing and cloud scenarios. The enhanced interactive Python shells have the following main features: @@ -58,13 +61,14 @@ The enhanced interactive Python shells have the following main features: * Caching of output results during a session with automatically generated references. -* Readline based name completion. +* Extensible tab completion, with support by default for completion of python + variables and keywords, filenames and function keywords. * Extensible system of 'magic' commands for controlling the environment and performing many tasks related either to IPython or the operating system. -* Configuration system with easy switching between different setups (simpler - than changing $PYTHONSTARTUP environment variables every time). +* A rich configuration system with easy switching between different setups + (simpler than changing $PYTHONSTARTUP environment variables every time). * Session logging and reloading. @@ -72,7 +76,7 @@ The enhanced interactive Python shells have the following main features: * Access to the system shell with user-extensible alias system. -* Easily embeddable in other Python programs and wxPython GUIs. +* Easily embeddable in other Python programs and GUIs. * Integrated access to the pdb debugger and the Python profiler. @@ -108,7 +112,8 @@ authors = {'Fernando' : ('Fernando Perez','fperez.net@gmail.com'), 'Nathan' : ('Nathaniel Gray','n8gray@caltech.edu'), 'Ville' : ('Ville Vainio','vivainio@gmail.com'), 'Brian' : ('Brian E Granger', 'ellisonbg@gmail.com'), - 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com') + 'Min' : ('Min Ragan-Kelley', 'benjaminrk@gmail.com'), + 'Thomas' : ('Thomas A. Kluyver', 'takowl@gmail.com'), } author = 'The IPython Development Team' @@ -121,9 +126,10 @@ url = 'http://ipython.org' # those are the ones we want pip/easy_install to be able to find. download_url = 'http://archive.ipython.org/release/%s' % version -platforms = ['Linux','Mac OSX','Windows XP/2000/NT'] +platforms = ['Linux','Mac OSX','Windows XP/2000/NT/Vista/7'] -keywords = ['Interactive','Interpreter','Shell','Parallel','Distributed'] +keywords = ['Interactive','Interpreter','Shell','Parallel','Distributed', + 'Web-based computing', 'Qt console', 'Embedding'] classifiers = [ 'Intended Audience :: Developers', diff --git a/IPython/frontend/html/notebook/static/unminified/README b/IPython/frontend/html/notebook/static/unminified/README new file mode 100644 index 0000000..bc54e72 --- /dev/null +++ b/IPython/frontend/html/notebook/static/unminified/README @@ -0,0 +1,14 @@ +We use minified versions of JQuery / jQueryUI and google-code-prettify in the Notebook. + +Some package managers require full versions alongside minified, and they can be +dropped in here, if necessary. + +origins of our minified js: +prettify: http://google-code-prettify.googlecode.com/files/prettify-small-1-Jun-2011.tar.bz2 +jQuery-1.6.2: http://code.jquery.com/jquery-1.6.2.min.js +jQueryUI-1.8.14: generated by https://jqueryui.com/download + +And their unminified counterparts: +prettify: http://google-code-prettify.googlecode.com/files/prettify-1-Jun-2011.tar.bz2 +jQuery-1.6.2: http://code.jquery.com/jquery-1.6.2.js +jQueryUI-1.8.14: https://github.com/jquery/jquery-ui/tarball/1.8.14 diff --git a/MANIFEST.in b/MANIFEST.in index 98c6b34..33ce435 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,4 @@ +include README.rst include ipython.py include setup2.py include setup3.py @@ -20,7 +21,7 @@ include IPython/frontend/qt/console/resources/icon/IPythonConsole.svg # Documentation graft docs exclude docs/\#* -exclude docs/man/*.1 +exclude docs/man/*.1.gz # docs subdirs we want to skip prune docs/attic diff --git a/README.rst b/README.rst index 42b2038..05bba58 100644 --- a/README.rst +++ b/README.rst @@ -5,11 +5,11 @@ Overview ======== -Welcome to IPython. Our full documentation, including PDF versions of our -manual, is available on `our website `_; -if you downloaded a built source distribution the ``docs/html`` directory -contains an HTML version of the manual. The ``docs/source`` directory contains -the plaintext version of these manuals. +Welcome to IPython. Our full documentation is available on `our website +`_; if you downloaded a built source +distribution the ``docs/source`` directory contains the plaintext version of +these manuals. If you have Sphinx installed, you can build them by typing +``make html`` for local browsing. Dependencies and supported Python versions diff --git a/docs/source/development/release.txt b/docs/source/development/release.txt index a24dc21..a14df23 100644 --- a/docs/source/development/release.txt +++ b/docs/source/development/release.txt @@ -26,8 +26,7 @@ Most of the release process is automated by the :file:`release` script in the installer. It posts them to the site and registers the release with PyPI. #. Update the website with announcements and links to the updated changes.txt - in html form. Remember to put a short note both on the news page of the - site and on Launcphad. + in html form. Remember to put a short note on the news page of the site. #. Drafting a short release announcement with i) highlights and ii) a link to the html version of the :ref:`Whats new ` section of the @@ -43,4 +42,4 @@ Most of the release process is automated by the :file:`release` script in the - Run ``git add`` for all the new files and commit. - Run ``git push`` to update the public version of the docs on gh-pages. -#. Celebrate! \ No newline at end of file +#. Celebrate! diff --git a/docs/source/install/install.txt b/docs/source/install/install.txt index b95aa21..855cdfd 100644 --- a/docs/source/install/install.txt +++ b/docs/source/install/install.txt @@ -7,7 +7,6 @@ All of the subpackages come with IPython, so you don't need to download and install them separately. However, to use a given subpackage, you will need to install all of its dependencies. - Please let us know if you have problems installing IPython or any of its dependencies. Officially, IPython requires Python 2.6, 2.7, 3.1, or 3.2. @@ -17,38 +16,40 @@ dependencies. Officially, IPython requires Python 2.6, 2.7, 3.1, or 3.2. longer work on Python <= 2.5. You can find older versions of IPython which supported Python <= 2.5 `here `_ -Some of the installation approaches use the :mod:`setuptools` package and its +Some of the installation approaches use the :mod:`distribute` package and its :command:`easy_install` command line program. In many scenarios, this provides -the most simple method of installing IPython and its dependencies. It is not -required though. More information about :mod:`setuptools` can be found on its -website. +the most simple method of installing IPython and its dependencies. More +information about :mod:`distribute` can be found on `its PyPI page +`__. .. note:: - On Windows, IPython *does* depend on :mod:`setuptools`, and it is recommended - that you install the :mod:`distribute` package, which improves - :mod:`setuptools` and fixes various bugs. Installing on Python 3 requires - :mod:`distribute` on all platforms. - - We hope to remove this dependency in the future. + On Windows, IPython has a hard dependency on :mod:`distribute`. We hope to + change this in the future, but for now on Windows, you *must* install + :mod:`distribute`. More general information about installing Python packages can be found in -Python's documentation at http://www.python.org/doc/. +`Python's documentation `_. + Quickstart ========== -If you have :mod:`setuptools` installed and you are on OS X or Linux (not +If you have :mod:`distribute` installed and you are on OS X or Linux (not Windows), the following will download and install IPython *and* the main optional dependencies: .. code-block:: bash - $ easy_install ipython[zmq,test] + $ easy_install ipython[zmq,qtconsole,notebook,test] -This will get pyzmq, which is needed for -IPython's parallel computing features as well as the nose package, which will -enable you to run IPython's test suite. +This will get: + +- pyzmq, needed for IPython's parallel computing features, qt console and + notebook. +- pygments, used by the Qt console for syntax highlighting. +- tornado, needed by the web-based notebook +- nose, used by the test suite. To run IPython's test suite, use the :command:`iptest` command: @@ -56,8 +57,7 @@ To run IPython's test suite, use the :command:`iptest` command: $ iptest -Read on for more specific details and instructions for Windows. - + Installing IPython itself ========================= @@ -66,15 +66,16 @@ with no external dependencies. However, some Python distributions (particularly on Windows and OS X), don't come with a working :mod:`readline` module. The IPython shell will work without :mod:`readline`, but will lack many features that users depend on, such as tab completion and command line -editing. If you install IPython with :mod:`setuptools`, (e.g. with `easy_install`), -then the appropriate :mod:`readline` for your platform will be installed. -See below for details of how to make sure you have a working :mod:`readline`. +editing. If you install IPython with :mod:`distribute`, (e.g. with +`easy_install`), then the appropriate :mod:`readline` for your platform will be +installed. See below for details of how to make sure you have a working +:mod:`readline`. Installation using easy_install ------------------------------- -If you have :mod:`setuptools` installed, the easiest way of getting IPython is -to simple use :command:`easy_install`: +If you have :mod:`distribute` installed, the easiest way of getting IPython is +to simply use :command:`easy_install`: .. code-block:: bash @@ -101,24 +102,22 @@ permissions, you may need to run the last command with :command:`sudo`. Windows ------- -.. note:: - - On Windows, IPython requires :mod:`setuptools` or :mod:`distribute`. - - We hope to remove this dependency in the future. +As mentioned above, on Windows, IPython requires :mod:`distribute`, and it also +requires the PyReadline library to properly support coloring and keyboard +management (features that the default windows console doesn't have). So on +Windows, the installation procedure is: -There are a few caveats for Windows users. The main issue is that a basic -``python setup.py install`` approach won't create ``.bat`` file or Start Menu -shortcuts, which most users want. To get an installation with these, you can -use any of the following alternatives: +1. Install `distribute `_. -1. Install using :command:`easy_install`. +2. Install `pyreadline `_. You can use + the command ``easy_install pyreadline`` from a terminal, or the binary + installer appropriate for your platform from the PyPI page. -2. Install using our binary ``.exe`` Windows installer, which can be found - `here `_ - -3. Install from source, but using :mod:`setuptools` (``python setupegg.py - install``). +3. Install IPython itself, which you can download from `PyPI + `_ or from `our site + `_. Note that on Windows 7, you *must* + right-click and 'Run as administrator' for the Start menu shortcuts to be + created. IPython by default runs in a terminal window, but the normal terminal application supplied by Microsoft Windows is very primitive. You may want to @@ -129,14 +128,6 @@ from the working terminal. .. _Console: http://sourceforge.net/projects/console -Note for Windows 64 bit users: you may have difficulties with the stock -installer on 64 bit systems; in this case (since we currently do not have 64 -bit builds of the Windows installer) your best bet is to install from source -with the setuptools method indicated in #3 above. See `this bug report`_ for -further details. - -.. _this bug report: https://bugs.launchpad.net/ipython/+bug/382214 - Installing the development version ---------------------------------- @@ -151,11 +142,8 @@ need to have Git installed on your system. Then just do: $ cd ipython $ python setup.py install -Again, this last step on Windows won't create ``.bat`` files or Start Menu -shortcuts, so you will have to use one of the other approaches listed above. - Some users want to be able to follow the development branch as it changes. If -you have :mod:`setuptools` installed, this is easy. Simply replace the last +you have :mod:`distribute` installed, this is easy. Simply replace the last step by: .. code-block:: bash @@ -170,6 +158,7 @@ just do: $ git pull + Basic optional dependencies =========================== @@ -186,33 +175,24 @@ read on for more details. readline -------- -In principle, all Python distributions should come with a working -:mod:`readline` module. But, reality is not quite that simple. There are two -common situations where you won't have a working :mod:`readline` module: - -* If you are using the built-in Python on Mac OS X. - -* If you are running Windows, which doesn't have a :mod:`readline` module. - -When IPython is installed with :mod:`setuptools`, (e.g. with `easy_install`), -readline is added as a dependency on OS X, and PyReadline on Windows, and will -be installed on your system. However, if you do not use setuptools, you may -have to install one of these packages yourself. +As indicated above, on Windows, PyReadline is a *mandatory* dependency. +PyReadline is a separate, Windows only implementation of readline that uses +native Windows calls through :mod:`ctypes`. The easiest way of installing +PyReadline is you use the binary installer available `here +`_. -On OS X, the built-in Python doesn't not have :mod:`readline` because of -license issues. Starting with OS X 10.5 (Leopard), Apple's built-in Python has -a BSD-licensed not-quite-compatible readline replacement. As of IPython 0.9, -many of the issues related to the differences between readline and libedit seem -to have been resolved. While you may find libedit sufficient, we have -occasional reports of bugs with it and several developers who use OS X as their -main environment consider libedit unacceptable for productive, regular use with -IPython. +On OSX, if you are using the built-in Python shipped by Apple, you will be +missing a full readline implementation as Apple ships instead a library called +``libedit`` that provides only some of readline's functionality. While you may +find libedit sufficient, we have occasional reports of bugs with it and several +developers who use OS X as their main environment consider libedit unacceptable +for productive, regular use with IPython. Therefore, we *strongly* recommend that on OS X you get the full :mod:`readline` module. We will *not* consider completion/history problems to be bugs for IPython if you are using libedit. -To get a working :mod:`readline` module, just do (with :mod:`setuptools` +To get a working :mod:`readline` module, just do (with :mod:`distribute` installed): .. code-block:: bash @@ -225,14 +205,11 @@ installed): python.org binaries) already have readline installed so you likely don't have to do this step. -If needed, the readline egg can be build and installed from source (see the -wiki page at -http://web.archive.org/web/20090614162410/ipython.scipy.org/moin/InstallationOSXLeopard). +When IPython is installed with :mod:`distribute`, (e.g. using the +``easy_install`` command), readline is added as a dependency on OS X, and +PyReadline on Windows, and will be installed on your system. However, if you +do not use distribute, you may have to install one of these packages yourself. -On Windows, you will need the PyReadline module. PyReadline is a separate, -Windows only implementation of readline that uses native Windows calls through -:mod:`ctypes`. The easiest way of installing PyReadline is you use the binary -installer available `here `_. nose ---- @@ -281,13 +258,12 @@ Dependencies for IPython.parallel (parallel computing) :mod:`IPython.kernel` has been replaced by :mod:`IPython.parallel`, which uses ZeroMQ for all communication. -IPython.parallel provides a nice architecture for parallel computing. The -main focus of this architecture is on interactive parallel computing. These -features require just one package: PyZMQ. See the next section for PyZMQ -details. +IPython.parallel provides a nice architecture for parallel computing, with a +focus on fluid interactive workflows. These features require just one package: +PyZMQ. See the next section for PyZMQ details. On a Unix style platform (including OS X), if you want to use -:mod:`setuptools`, you can just do: +:mod:`distribute`, you can just do: .. code-block:: bash @@ -346,8 +322,8 @@ started withe command ``ipython notebook``. pyzmq ----- -Like the :mod:`IPython.parallel` and :mod:`IPython.frontend.qt.console` packages, -the HTML notebook requires ZeroMQ and PyZMQ. +Like the :mod:`IPython.parallel` and :mod:`IPython.frontend.qt.console` +packages, the HTML notebook requires ZeroMQ and PyZMQ. Tornado ------- @@ -370,8 +346,9 @@ the proper location:: from IPython.external.mathjax import install_mathjax install_mathjax() -This function does require write access to the IPython install directory, so if you -have a system-wide Python install, it may need to be done from a ``sudo python`` session. +This function does require write access to the IPython install directory, so if +you have a system-wide Python install, it may need to be done from a ``sudo +python`` session. Browser Compatibility --------------------- diff --git a/docs/source/whatsnew/github-stats-0.12.txt b/docs/source/whatsnew/github-stats-0.12.txt index 21c09d4..6503f22 100644 --- a/docs/source/whatsnew/github-stats-0.12.txt +++ b/docs/source/whatsnew/github-stats-0.12.txt @@ -3,6 +3,98 @@ Issues closed in the 0.12 development cycle =========================================== +Issues closed in 0.12.1 +----------------------- + +GitHub stats for bugfix release 0.12.1 (12/28/2011-04/16/2012), backporting +pull requests from 0.13. + +We closed a total of 71 issues: 44 pull requests and 27 issues; this is the +full list (generated with the script `tools/github_stats.py`). + +This list is automatically generated, and may be incomplete: + +Pull Requests (44): + +* :ghpull:`1175`: core.completer: Clean up excessive and unused code. +* :ghpull:`1187`: misc notebook: connection file cleanup, first heartbeat, startup flush +* :ghpull:`1190`: Fix link to Chris Fonnesbeck blog post about 0.11 highlights. +* :ghpull:`1196`: docs: looks like a file path might have been accidentally pasted in the middle of a word +* :ghpull:`1206`: don't preserve fixConsole output in json +* :ghpull:`1207`: fix loadpy duplicating newlines +* :ghpull:`1213`: BUG: Minor typo in history_console_widget.py +* :ghpull:`1218`: Added -q option to %prun for suppression of the output, along with editing the dochelp string. +* :ghpull:`1222`: allow Reference as callable in map/apply +* :ghpull:`1229`: Fix display of SyntaxError in Python 3 +* :ghpull:`1246`: Skip tests that require X, when importing pylab results in RuntimeError. +* :ghpull:`1253`: set auto_create flag for notebook apps +* :ghpull:`1257`: use self.kernel_manager_class in qtconsoleapp +* :ghpull:`1262`: Heartbeat no longer shares the app's Context +* :ghpull:`1283`: HeartMonitor.period should be an Integer +* :ghpull:`1284`: a fix for GH 1269 +* :ghpull:`1289`: Make autoreload extension work on Python 3. +* :ghpull:`1306`: Fix %prun input parsing for escaped characters (closes #1302) +* :ghpull:`1312`: minor heartbeat tweaks +* :ghpull:`1318`: make Ctrl-D in qtconsole act same as in terminal (ready to merge) +* :ghpull:`1341`: Don't attempt to tokenize binary files for tracebacks +* :ghpull:`1353`: Save notebook as script using unicode file handle. +* :ghpull:`1363`: Fix some minor color/style config issues in the qtconsole +* :ghpull:`1364`: avoid jsonlib returning Decimal +* :ghpull:`1369`: load header with engine id when engine dies in TaskScheduler +* :ghpull:`1370`: allow draft76 websockets (Safari) +* :ghpull:`1374`: remove calls to meaningless ZMQStream.on_err +* :ghpull:`1377`: Saving non-ascii history +* :ghpull:`1396`: Fix for %tb magic. +* :ghpull:`1402`: fix symlinked /home issue for FreeBSD +* :ghpull:`1413`: get_home_dir expands symlinks, adjust test accordingly +* :ghpull:`1414`: ignore errors in shell.var_expand +* :ghpull:`1430`: Fix for tornado check for tornado < 1.1.0 +* :ghpull:`1445`: Don't build sphinx docs for sdists +* :ghpull:`1463`: Fix completion when importing modules in the cwd. +* :ghpull:`1477`: fix dangling `buffer` in IPython.parallel.util +* :ghpull:`1495`: BUG: Fix pretty-printing for overzealous objects +* :ghpull:`1496`: BUG: LBYL when clearing the output history on shutdown. +* :ghpull:`1514`: DOC: Fix references to IPython.lib.pretty instead of the old location +* :ghpull:`1517`: Fix indentation bug in IPython/lib/pretty.py +* :ghpull:`1538`: store git commit hash in utils._sysinfo instead of hidden data file +* :ghpull:`1599`: Fix for %run -d in Python 3 +* :ghpull:`1602`: Fix %env for Python 3 +* :ghpull:`1607`: cleanup sqlitedb temporary db file after tests + +Issues (27): + +* :ghissue:`676`: IPython.embed() from ipython crashes twice on exit +* :ghissue:`846`: Autoreload extension doesn't work with Python 3.2 +* :ghissue:`1187`: misc notebook: connection file cleanup, first heartbeat, startup flush +* :ghissue:`1191`: profile/startup files not executed with "notebook" +* :ghissue:`1197`: Interactive shell trying to: from ... import history +* :ghissue:`1198`: Kernel Has Died error in Notebook +* :ghissue:`1201`: %env magic fails with Python 3.2 +* :ghissue:`1204`: double newline from %loadpy in python notebook (at least on mac) +* :ghissue:`1208`: should dv.sync_import print failed imports ? +* :ghissue:`1225`: SyntaxError display broken in Python 3 +* :ghissue:`1232`: Dead kernel loop +* :ghissue:`1241`: When our debugger class is used standalone `_oh` key errors are thrown +* :ghissue:`1254`: typo in notebooklist.js breaks links +* :ghissue:`1260`: heartbeat failure on long gil-holding operation +* :ghissue:`1268`: notebook %reset magic fails with StdinNotImplementedError +* :ghissue:`1269`: Another strange input handling error +* :ghissue:`1281`: in Hub: registration_timeout must be an integer, but heartmonitor.period is CFloat +* :ghissue:`1302`: Input parsing with %prun clobbers escapes +* :ghissue:`1304`: controller/server load can disrupt heartbeat +* :ghissue:`1317`: Very slow traceback construction from Cython extension +* :ghissue:`1345`: notebook can't save unicode as script +* :ghissue:`1375`: %history -g -f file encoding issue +* :ghissue:`1401`: numpy arrays cannot be used with View.apply() in Python 3 +* :ghissue:`1408`: test_get_home_dir_3 failed on Mac OS X +* :ghissue:`1412`: Input parsing issue with %prun +* :ghissue:`1421`: ipython32 %run -d breaks with NameError name 'execfile' is not defined +* :ghissue:`1484`: unhide .git_commit_info.ini + + +Issues closed in 0.12 +--------------------- + In this cycle, from August 1 to December 28 2011, we closed a total of 515 issues, 257 pull requests and 258 regular issues; this is the full list (generated with the script `tools/github_stats.py`). diff --git a/docs/source/whatsnew/version0.12.txt b/docs/source/whatsnew/version0.12.txt index 8dfc497..586fe4a 100644 --- a/docs/source/whatsnew/version0.12.txt +++ b/docs/source/whatsnew/version0.12.txt @@ -2,6 +2,15 @@ 0.12 Series ============= +Release 0.12.1 +============== + +IPython 0.12.1 is a bugfix release of 0.12, pulling only bugfixes and minor +cleanup from 0.13, timed for the Ubuntu 12.04 LTS release. + +See the :ref:`list of fixed issues ` for specific backported issues. + + Release 0.12 ============ diff --git a/scripts/ipython_win_post_install.py b/scripts/ipython_win_post_install.py index 6e5d962..2177637 100755 --- a/scripts/ipython_win_post_install.py +++ b/scripts/ipython_win_post_install.py @@ -118,11 +118,18 @@ def install(): cmdbase += '-script.pyw' cmd = '"%s"' % cmdbase mkshortcut(pythonw, 'IPython Qt Console', link, cmd, workdir) - # Create documentation shortcuts ... - t = prefix + r'\share\doc\ipython\manual\index.html' - f = ip_start_menu + r'\Manual in HTML.lnk' - mkshortcut(t,'IPython Manual - HTML-Format',f) + + # FIXME: These below are commented out because we don't ship the html built + # docs anymore. We should make the shortcut to continue existing, but as a + # URL to the online the docs for the right version of IPython. The stable + # URLs have the pattern: + # http://ipython.org/ipython-doc/rel-X.Y.Z/html + # For IPython version X.Y.Z. + ## # Create documentation shortcuts ... + ## t = prefix + r'\share\doc\ipython\manual\index.html' + ## f = ip_start_menu + r'\Manual in HTML.lnk' + ## mkshortcut(t,'IPython Manual - HTML-Format',f) def remove(): """Routine to be run by the win32 installer with the -remove switch.""" diff --git a/tools/build_release b/tools/build_release index 6077c30..0db7cf0 100755 --- a/tools/build_release +++ b/tools/build_release @@ -1,6 +1,9 @@ #!/usr/bin/env python """IPython release build script. """ + +import os + from toollib import * # Get main ipython dir, this will raise if it doesn't pass some checks @@ -20,16 +23,16 @@ for d in ['build', 'dist', pjoin('docs', 'build'), pjoin('docs', 'dist'), remove_tree(d) # Build source and binary distros -sh('./setup.py sdist --formats=gztar,zip') +sh(sdists) # Build eggs -sh('python ./setupegg.py bdist_egg') +sh(eggs) -# Call the windows build separately, so that the extra Windows scripts don't -# get pulled into Unix builds (setup.py has code which checks for -# bdist_wininst) -sh("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") +# Run windows builds +map(sh, win_builds) # Change name so retarded Vista runs the installer correctly -sh("rename 's/linux-i686/win32-setup/' dist/*.exe") -sh("rename 's/linux-x86_64/win32-setup/' dist/*.exe") +sh("rename 's/linux-i686/win32/' dist/*.exe") +sh("rename 's/linux-x86_64/win32/' dist/*.exe") +# exe files aren't really executable under *nix. +sh("chmod -x dist/*.exe") diff --git a/tools/release b/tools/release index ecf07d0..59a7e1a 100755 --- a/tools/release +++ b/tools/release @@ -49,7 +49,8 @@ cd(ipdir) sh('./setup.py register') # Upload all files -sh('./setup.py sdist --formats=gztar,zip upload') +for cmd in [sdists, eggs] + win_builds: + sh(cmd + ' upload') cd(distdir) print( 'Uploading distribution files...') diff --git a/tools/toollib.py b/tools/toollib.py index 0396204..b4e70cf 100644 --- a/tools/toollib.py +++ b/tools/toollib.py @@ -19,6 +19,27 @@ archive_user = 'ipython@archive.ipython.org' archive_dir = 'archive.ipython.org' archive = '%s:%s' % (archive_user, archive_dir) +# Build commands +# Source dists +sdists = './setup.py sdist --formats=gztar,zip' +# Eggs +eggs = './setupegg.py bdist_egg' + +# Windows builds. +# We do them separately, so that the extra Windows scripts don't get pulled +# into Unix builds (setup.py has code which checks for bdist_wininst). Note +# that the install scripts args are added to the main distutils call in +# setup.py, so they don't need to be passed here. +# +# The Windows 64-bit installer can't be built by a Linux/Mac Python because ofa +# bug in distutils: http://bugs.python.org/issue6792. +# So we have to build it with a wine-installed native Windows Python... +win_builds = ["python setup.py bdist_wininst", + r"%s/.wine/dosdevices/c\:/Python27/python.exe setup.py build " + "--plat-name=win-amd64 bdist_wininst " + "--install-script=ipython_win_post_install.py" % + os.environ['HOME'] ] + # Utility functions def sh(cmd): """Run system command in shell, raise SystemExit if it returns an error."""