WinPython 2.7.9.4 发行版解析:Python 2.7 科学计算发行版的软件清单、版本变迁与生成机制

原创2026-10-14 18:46:361,460 阅读
文章标签:包管理器开发工具CLI构建工具

WinPython 2.7.9.4 发行版解析:Python 2.7 科学计算发行版的软件清单、版本变迁与生成机制

本文以仓库内 WinPython-2.7.9.4.md(及其历史对比文件 WinPython-2.7.9.4_History.md)为绝对主体,完整梳理该版本随附的 3 项工具与近百个 Python 包清单,逐条还原自 2.7.9.3 以来的新增与升级内容,并结合本仓库(WinPython 的 wppm 包管理工具与构建工具链源码)说明这类"包索引"文档的生成、比对与校验机制。读完本文,你将能:读懂任意一份 WinPython changelog 的清单结构与字段含义;使用 wppm -md 为自己的环境生成同格式索引、用 wppm -diff 对任意两个版本做增量对比;并了解这些文档在构建流水线中的产生与测试约束。

版本背景:2.7.9.4 在 WinPython 历史中的位置

WinPython 是一个面向 Windows 平台的免费、可移植 Python 发行版(portable Python distribution),其特点是把 Python 解释器与大量预编译的科学计算扩展打包在一起,解压即用,不依赖系统级安装。本仓库正是该发行版的配套工具与构建工具链所在:按 README.rst 的说明,它包含两大能力——wppm(WinPython Package Manager,包管理器)与历史构建工具链(generate_a_winpython_distropy_meta.bat + TOML 配置驱动构建)。

WinPython 2.7.9.4 是 2015 年发布的一个 Python 2.7 分支版本,其发行依据是 Python 2.7.9 解释器。它的软件清单文档(本篇文章的主体)以标准的两段式结构呈现:

  • ### Tools:随发行版附带的独立工具(3 项);
  • ### Python packages:已预装的 Python 包(含 Python 本体在内共 91 项)。

而 WinPython-2.7.9.4_History.md 则以"自 2.7.9.3 以来的变化"为主线,列出新增包与升级包。两份文件合在一起,构成了该版本完整、可追溯的交付说明。需要指出的是:如今 Python 2.7 系列早已结束官方维护,这份清单属于历史归档资料,但它所揭示的"发行版交付物 + 版本增量"文档格式,至今仍是 WinPython 现代版本 changelog 的骨架。

随发行版提供的工具(Tools)

2.7.9.4 随发行版附带了 3 项独立工具,覆盖翻译工具链、文本编辑与 C/C++/Fortran 编译三个场景:

Name Version Description
gettext 0.14.4 GNU gettext Win32 porting —— GNU 翻译工具(配合标准库 pygettext 使用)
SciTE 3.3.7 基于 SCIntilla 的多语言、轻量级文本编辑器
MinGW32 4.9.2 C/C++ 与 Fortran 编译器(Mingw64 static toolchain Numpy 版本)

这三项工具各有明确用途:gettext 服务于国际化(i18n)工作流,与 Python 标准库的 gettext/pygettext 模块协同;SciTE 是 Scintilla 编辑组件之上的轻量编辑器,适合快速脚本编辑;MinGW32 则提供了在 Windows 上编译 C 扩展所需的本机工具链——其描述中特意标注的"Numpy 静态工具链版本"说明它与 numpy 官方构建所用的编译体系保持一致,保证预编译扩展与源码编译产物 ABI 兼容。

随发行版提供的 Python 包清单(完整索引)

这是 2.7.9.4 文档的核心部分。以下表格完整继承原文档的全部 91 项条目(名称、版本、描述均按原文保留,仅去除原文中的外部链接),读者可将其视为该发行版"出厂预装软件"的权威清单:

Name Version Description
Python 2.7.9 Python programming language with standard library
astroid 1.3.6 Rebuild a new abstract syntax tree from Python's ast (required for pylint)
backports.ssl_match_hostname 3.4.0.2 The ssl.match_hostname() function from Python 3.4
baresql 0.7.1 playing SQL directly on Python datas
beautifulsoup4 4.3.2 Screen-scraping library
brewer2mpl 1.4.1 Connect colorbrewer2.org color maps to Python and matplotlib
certifi 14.5.14 Python package for providing Mozilla's CA Bundle.
cffi 0.9.2 Foreign Function Interface for Python calling C code.
colorama 0.3.3 Cross-platform colored terminal text
configparser 3.5.0b2 This library brings the updated configparser from Python 3.5 to Python 2.6-3.5.
cvxopt 1.1.7 Convex optimization library
cx_Freeze 4.3.4 Deployment tool which converts Python scripts into stand-alone Windows executables (i.e. target machine does not require Python or any other library to be installed)
Cython 0.22 Cython is a language that makes writing C extensions for the Python language as easy as Python
db.py 0.4.1 a db package that doesn't suck
decorator 3.4.2 Better living through Python with decorators
docutils 0.12 Text processing system for processing plaintext documentation into useful formats, such as HTML or LaTeX (includes reStructuredText)
enum34 1.0.4 Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4
fonttools 2.4 Tools to manipulate font files
formlayout 1.0.15 Module for creating form dialogs/widgets to edit various type of parameters without having to write any GUI code
funcsigs 0.4 Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+
ggplot 0.6.5 ggplot for python
guidata 1.6.2 Automatically generated graphical user interfaces for easy data set edition and display
guiqwt 2.3.2 Efficient curve/image plotting and other GUI tools for scientific data processing software development
h5py 2.4.0 General-purpose Python interface to HDF5 files (unlike PyTables, h5py provides direct access to the full HDF5 C library)
husl 4.0.1 Human-friendly HSL (Hue-Saturation-Lightness)
ipython 3.0.0 Enhanced Python shell
ipython_sql 0.3.5 RDBMS access via IPython
Jinja2 2.7.3 Sandboxed template engine (provides a Django-like non-XML syntax and compiles templates into executable python code)
joblib 0.8.4 Lightweight pipelining: using Python functions as pipeline jobs.
jsonschema 2.4.0 An implementation of JSON Schema validation for Python
julia 0.1.1.8 Python interface to the Julia language
llvmlite 0.2.2 lightweight wrapper around basic LLVM functionality
lmfit 0.8.3 Least-Squares Minimization with Bounds and Constraints
logilab_common 0.63.2 Collection of low-level Python packages and modules used by Logilab projects (required for pylint)
logutils 0.3.3 Logging utilities
lxml 3.4.2 Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.
mahotas 1.2.4 Computer Vision library
MarkupSafe 0.23 Implements a XML/HTML/XHTML Markup safe string for Python
matplotlib 1.4.3 2D plotting library (embeddable in GUIs created with PyQt)
mistune 0.5.1 The fastest markdown parser in pure Python, inspired by marked.
mpld3 0.2 D3 Viewer for Matplotlib
mysql_connector_python 2.0.3 MySQL driver written in Python
networkx 1.9.1 Python package for creating and manipulating graphs and networks
nltk 3.0.2 The Natural Language Toolkit (NLTK) is a Python package for natural language processing.
nose 1.3.4 nose is a discovery-based unittest extension (e.g. NumPy test module is using nose)
numba 0.17.0 compiling Python code using LLVM
numexpr 2.4 Fast evaluation of array expressions elementwise by using a vector-based virtual machine
numpy 1.9.2+mkl NumPy: multidimensional array processing for numbers, strings, records and objects (SciPy's core module)
numpydoc 0.5 Sphinx extension to support docstrings in Numpy format
oct2py 3.1.0 Python to GNU Octave bridge --> run m-files from python.
pandas 0.16.0 Powerful data structures for data analysis, time series and statistics
patsy 0.3.0 Describing statistical models using symbolic formulas
pep8 1.6.2 Python style guide checker
pg8000 1.10.1 PostgreSQL interface library
Pillow 2.7.0 Python Imaging Library (fork)
pip 6.0.8 A tool for installing and managing Python packages
Polygon2 2.0.7 Polygon2 is a Python-2 package that handles polygonal shapes in 2D
prettytable 0.7.2 A simple Python library for easily displaying tabular data in a visually appealing ASCII table format.
psutil 2.2.1 Provides an interface for retrieving information on all running processes and system utilization (CPU, disk, memory, network) in a portable way
PuLP 1.5.6 PuLP is an LP modeler written in python. PuLP can generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to solve linear problems
pybars3 0.9.1 Handlebars.js templating for Python 3 and 2
pycparser 2.10 C parser in Python
pyflakes 0.8.1 passive checker of Python programs
Pygments 2.0.2 Generic syntax highlighter for general use in all kinds of software
pyhdf 0.8.3 Python interface to HDF4 files (Hierarchical Data Format version 4)
pylint 1.4.3 Logilab code analysis module: analyzes Python source code looking for bugs and signs of poor quality
PyMeta3 0.5.1 Pattern-matching language based on Meta for Python 3 and 2
pyodbc 3.0.7 DB API Module for ODBC
PyOpenGL 3.1.0 Cross platform Python binding to OpenGL and related APIs
pyparsing 2.0.3 A Python Parsing Module
PyQt4 4.11.3 Python bindings for the Qt cross platform GUI toolkit
PyQtdesignerplugins 1.1 PyQtdesignerplugins installs Python Qt designer plugins (Matplotlib, guiqwt, etc.) for PyQt4
PyQwt 5.2.1 2D plotting library (set of Python bindings for the Qwt library featuring fast plotting)
pyserial 2.7 Library encapsulating the access for the serial port
python_dateutil 2.4.0 Powerful extensions to the standard datetime module
pytz 2015.2 World Timezone Definitions for Python
pywin32 219 Python library for Windows
PyYAML 3.11 YAML parser and emitter for Python
pyzmq 14.5.0 Lightweight and super-fast messaging based on ZeroMQ library (required for IPython Qt console)
reportlab 3.1.44 The PDF generation library
requests 2.6.0 Requests is an Apache2 Licensed HTTP library, written in Python, for human beings.
rope 0.10.2 a python refactoring library...
rpy2 2.5.6 Python interface to the R language (embedded R)
runipy 0.1.3 Run IPython notebooks from the command line
scikit_image 0.11.2 Image processing toolbox for SciPy
scikit_learn 0.16.0 A set of Python modules for machine learning and data mining
scilab2py 0.6 Python to Scilab bridge
scipy 0.15.1 SciPy: Scientific Library for Python (advanced math, signal processing, optimization, statistics, ...)
seaborn 0.5.1 statistical data visualization
setuptools 14.3.1 Download, build, install, upgrade, and uninstall Python packages - easily
simplejson 3.6.5 Simple, fast, extensible JSON (JavaScript Object Notation) encoder/decoder
singledispatch 3.4.0.3 This library brings functools.singledispatch from Python 3.4 to Python 2.6-3.3
six 1.9.0 Python 2 and 3 compatibility utilities
Sphinx 1.3.1 Tool for generating documentation which uses reStructuredText as its markup language
spyder 2.3.4 Scientific PYthon Development EnviRonment: designed for interactive computing and data visualisation with a simple and intuitive user interface
SQLAlchemy 0.9.9 SQL Toolkit and Object Relational Mapper
sqlite_bro 0.8.7.4 a graphic SQLite Client in 1 Python file
sqlparse 0.1.14 Non-validating SQL parser
statsmodels 0.6.1 Statistical computations and models for use with SciPy
sympy 0.7.6 Symbolic Mathematics Library
tables 3.1.1 Package based on HDF5 library for managing hierarchical datasets (extremely large amounts of data)
tornado 4.1 Scalable, non-blocking web server and tools (required for IPython notebook)
tqdm 1.0 A Simple Python Progress Meter
TTFQuery 1.0.5 FontTools-based package for querying system fonts
ViTables 2.1 Graphical tool for browsing and editing files in both HDF5 and PyTables formats
VPython 5.74 A free, open-source module for producing real-time 3D scenes with Python
wheel 0.24.0 A built-package format for Python.
winpython 1.1 WinPython distribution tools, including WPPM (package manager)
wsgiref 0.1.2 WSGI (PEP 333) Reference Library
xlrd 0.9.3 Extract data from Microsoft Excel spreadsheet files
XlsxWriter 0.7.1 A Python module for creating Excel XLSX files.

按功能域解读这份清单

从表格可以清晰看出该发行版的定位——"开箱即用的科学计算环境":

  • 科学计算核心栈:numpy 1.9.2+mkl(注意 +mkl 表示绑定了 Intel MKL 数学核心库的构建)、scipy 0.15.1、pandas 0.16.0、statsmodels 0.6.1、sympy 0.7.6、cvxopt 1.1.7(凸优化)、numexpr 2.4(向量化表达式求值)、numba 0.17.0 + llvmlite 0.2.2(基于 LLVM 的 JIT 编译)。
  • 交互与 IDE:ipython 3.0.0、spyder 2.3.4(科学计算 IDE)、pyzmq 14.5.0 与 tornado 4.1(分别为 IPython Qt 控制台与 notebook 的依赖)。
  • 可视化:matplotlib 1.4.3、PyQt4 4.11.3、PyQwt 5.2.1、guiqwt 2.3.2、guidata 1.6.2、seaborn 0.5.1、ggplot 0.6.5、mpld3 0.2,以及 PyQtdesignerplugins(为 Qt Designer 注入 Matplotlib/guiqwt 插件)。
  • 机器学习与图像/文本处理:scikit_learn 0.16.0、scikit_image 0.11.2、mahotas 1.2.4、nltk 3.0.2、beautifulsoup4 4.3.2、lxml 3.4.2。
  • 数据存取:h5py 2.4.0 与 tables 3.1.1(HDF5 两条技术路线)、pyhdf 0.8.3(HDF4)、sqlite_bro 0.8.7.4、SQLAlchemy 0.9.9、pg8000(PostgreSQL)、mysql_connector_python、pyodbc、xlrd/XlsxWriter(Excel 读写)。
  • 工程与打包:Cython 0.22、cx_Freeze 4.3.4(打包为独立 exe)、pip 6.0.8、setuptools 14.3.1、wheel 0.24.0。
  • 代码质量与文档:pylint 1.4.3、pyflakes 0.8.1、pep8 1.6.2、rope 0.10.2、Sphinx 1.3.1、docutils 0.12。
  • 跨语言桥接:rpy2(R)、oct2py(GNU Octave)、scilab2py(Scilab)、julia 0.1.1.8(Julia)。
  • 发行版自带工具:winpython 1.1 正是本仓库 wppm 包管理器在当年发行版中的对应物,负责包的安装、卸载与发行版注册。

相对 2.7.9.3 的变化(History 增量)

WinPython-2.7.9.4_History.md 逐条记录了自 2.7.9.3 以来的变化,分为"新增包"与"升级包"两类,完整继承如下。

新增的 6 个包

Name Version Description
Polygon2 2.0.7 Python-2 包,处理 2D 多边形形状
PyMeta3 0.5.1 基于 Meta 的模式匹配语言(兼容 Python 3 与 2)
TTFQuery 1.0.5 基于 FontTools 的系统字体查询包
fonttools 2.4 字体文件操作工具
pybars3 0.9.1 Python 3/2 的 Handlebars.js 模板实现
wsgiref 0.1.2 WSGI(PEP 333)参考库

其中 fonttools + TTFQuery 的组合补齐了字体处理能力,pybars3 引入了 Handlebars 模板语法,Polygon2 面向 2D 几何计算,wsgiref 则提供了 WSGI 标准实现。

升级的 19 个包

Name 版本变化 Description
SQLAlchemy 0.9.8 → 0.9.9 SQL 工具包与 ORM
Sphinx 1.2.3 → 1.3.1 reStructuredText 文档生成工具
XlsxWriter 0.6.6 → 0.7.1 生成 Excel XLSX 文件的模块
astroid 1.3.4 → 1.3.6 从 Python ast 重建抽象语法树(pylint 依赖)
cffi 0.8.6 → 0.9.2 调用 C 代码的 FFI
db.py 0.3.5 → 0.4.1 数据库访问包
decorator 3.4.0 → 3.4.2 装饰器工具库
ipython 2.4.1 → 3.0.0 增强版 Python shell
mistune 0.5 → 0.5.1 纯 Python Markdown 解析器
nltk 3.0.1 → 3.0.2 自然语言处理工具包
numpy 1.9.2rc1+mkl → 1.9.2+mkl 多维数组处理(SciPy 核心模块)
pandas 0.15.2 → 0.16.0 数据分析、时间序列与统计
pylint 1.4.1 → 1.4.3 代码分析模块
pytz 2014.10 → 2015.2 世界时区定义
requests 2.5.3 → 2.6.0 HTTP 库
scikit_image 0.10.1 → 0.11.2 图像处理工具箱
scikit_learn 0.15.2 → 0.16.0 机器学习与数据挖掘模块
setuptools 12.3 → 14.3.1 包安装/构建/升级/卸载工具
spyder 2.3.3 → 2.3.4 科学 Python 开发环境

增量背后的几个信号

  • numpy 由候选版转正式版:1.9.2rc1+mkl → 1.9.2+mkl 意味着本版本是该里程碑的正式发布(去掉了 rc1 候选标识),整个科学计算栈随之稳定。
  • IPython 大版本跨越:2.4.1 → 3.0.0 是一次主版本升级(IPython 3.0 引入了 notebook 架构重构等变化),其配套的 pyzmq、tornado 等依赖也在清单中与之呼应。
  • 数据科学栈整体前移:pandas 与 scikit_learn 双双进入 0.16 系列,scikit_image 升至 0.11.2,说明该版本对数据分析与机器学习用户是实质性的功能更新。

仓库源码级解读:这份清单是怎么"生成"的

这类 changelog 并非手写,而是由本仓库的工具链自动生成,其格式约定在源码中都有迹可循。

索引文档的模板:wppm -md

wppm/wppm.py 中的 Distribution 类实现了完整的"包索引 Markdown"生成流程:

  • get_package_index_data() 负责收集数据:通过 utils.get_python_infos() 读取目标解释器的 Python 版本与位数,通过 get_installed_tools() 枚举随附工具,通过 get_installed_packages()(内部调用 piptree.PipData.pip_list(full=True))枚举已安装包,若存在 WheelHouse 目录还会收集 included.wheels 下的轮子清单;
  • render_markdown_for_list(title, items) 生成每个分节的表格——标题、Name | Version | Description 表头与分隔行、按名称排序的条目行,与 2.7.9.4 文档中的表格格式完全一致;
  • generate_package_index_markdown() 将这些分节拼装为 ## WinPython X + ### Tools / ### Python packages / ### WheelHouse packages 的完整索引。

也就是说,2.7.9.4 清单中的 "Tools" 与 "Python packages" 两节,正对应今天 wppm -md(-md 意为 markdown summary of the installation)命令的输出结构;现代版本若带 WheelHouse 还会多出第三节。命令行入口定义在 wppm/wppm.py 的 main() 中,-md 同时支持 -j 输出 JSON(顶层键为 distribution / tools / packages / wheelhouse),这一点在 tests/test_cli.py 中也有端到端断言。

历史对比文档的模板:wppm/diff.py

WinPython-2.7.9.4_History.md 的版式——"History of changes … since version …"标题、"New packages:"与"Upgraded packages:"分节、条目以 * name version (description) 呈现、文末 * * * 分隔线——与 wppm/diff.py 中 compare_package_indexes() 的输出模板逐项对应:

  • compare_packages() 对两个包索引求差集,产出 added(新增)、upgraded(版本不同)、removed(被移除)三类,升级条目按 old.version → new.version 格式书写;
  • find_previous_version() 通过 changelog_versions() 扫描 changelogs 目录下的文件名(正则 WinPython{flavor}-{architecture}bit-(.+).md)并解析版本号,找出"最近的前一版本"作为对比基准——2.7.9.4 对比的就是 2.7.9.3;
  • 需要强调的是,对比只依赖文件名携带的版本号,且采用 PEP 440 版本解析:3.14.7.0 < 3.14.7.1b1 < 3.14.7.1 这类带发布级(b1/rc1 等)的版本也能正确排序。这条约束在 tests/test_diff_versions.py 中有专门测试(例如 b1 版本会被正确选为 3.14.7.1 的对比对象),保证了增量文档的基准选择永远正确。

一份值得注意的"不生成"约定

有趣的是,当前构建流水线不再自动生成 _History.md 伴生文件。tests/test_changelog_files.py 的模块 docstring 明确记载了这一决策:历史文件是与"紧邻上一版"对比的结果,而各 flavor 的发布节奏不同、读者通常每年只升级一次,固定链式的历史意义有限;更有价值的对比是让读者自己挑选任意两个索引做 wppm -diff a.md b.md。因此该测试断言:构建产物中不会出现 *_History.md,且 hashes_*.md(描述单个构建二进制的哈希表,见 wppm/hash.py 的 MD5/SHA-1/SHA-256/blake2b 输出格式)也不属于 changelogs 目录。换言之,2.7.9.4_History.md 是早期构建链产出的历史档案,而它的"增量对比"能力已由 wppm -diff 以更通用的形式继承。

读者如何利用这类清单:命令行实操

wppm 是当前仓库随附的包管理器(Python 3.10+ 可运行,见 README.rst),以下命令可帮你把"读 changelog"转化为"查自己环境":

# 1. 列出目标环境的全部已安装包(支持正则过滤)
python -m wppm -t <target-python-dir> -ls
python -m wppm -t <target-python-dir> -ls "^numpy$" -j   # JSON 输出

# 2. 为当前环境生成与 changelog 同格式的包索引 Markdown
python -m wppm -t <target-python-dir> -md
python -m wppm -t <target-python-dir> -md -j            # 生成 JSON 清单

# 3. 对任意两个索引文件做增量对比(不要求相邻版本)
python -m wppm -diff changelogs/WinPython-2.7.9.4.md changelogs/WinPython-2.7.9.5.md

其中 -diff 的实现细节值得展开:compare_files() 默认以 full 模式对两份索引的 tools、python、wheelhouse 三个分节逐一求差,输出格式与 2.7.9.4_History.md 一致(New / Upgraded / Removed),方向由参数顺序决定(先旧后新),升级行固定写作 旧版本 → 新版本,避免读者看反方向把升级误读成降级。对比两个真实历史版本(如 2.7.9.4 与 2.7.9.5,仓库中均有对应文件)即可复现本篇文章第四节的增量内容。

如果你希望以"仅装轮子"的方式复现一个 WinPython 发行版的包集合,README.rst 给出的方式是直接以哈希锁定方式安装其 requirements 文件,或在包管理器支持时使用 pylock.toml 锁文件;现代构建的 flavor(如 slim、dot)与 Python 目标的组合关系定义在 winpython_builds.toml 中。

命名演变与历史定位

对比仓库 changelogs 目录可以发现命名惯例的演变:早期文件如 WinPython-2.7.9.4.md 只带版本号;3.7 时代出现 WinPython-64bit-3.7.0.0.md(含位数);如今则演进为 WinPythondot-64bit-3.13.15.0.md 这种"flavor + 位数 + 版本(含 PEP 440 发布级)"的完整命名,tests/test_changelog_files.py 的 parse_changelog_name 测试正是对这种命名的解析约束。理解这一演变,有助于在翻阅历史清单时快速对应到当时的发行版形态。

最后需要明确的是:2.7.9.4 基于 Python 2.7,该解释器系列早已结束官方维护,文中列出的包版本亦均为 2015 年前后状态,不应作为现代项目的依赖选择依据。它的价值在于三点:作为 WinPython 发行版历史交付的权威记录;作为"索引文档 + 增量文档"双文档格式的范式样本;以及作为验证 wppm 工具链生成与对比逻辑的真实历史输入。想继续深入,可从 README.rst 了解工具链全貌,从 wppm/wppm.py 与 wppm/diff.py 追踪生成逻辑,并用 tests/test_changelog_files.py、tests/test_diff_versions.py、tests/test_cli.py 验证上述机制的行为边界。

登录后查看全文
winpython