diff options
author | Paul Moore <p.f.moore@gmail.com> | 2014-03-27 09:43:49 +0000 |
---|---|---|
committer | Paul Moore <p.f.moore@gmail.com> | 2014-03-27 09:43:49 +0000 |
commit | 65eabd5766f6edf1d208d249e1938702014cebc3 (patch) | |
tree | cd7f2e495ea64f21e5ab9c21311914b13266a3bd | |
parent | 90f7aeb1572f05aadefc9bd1de0399cc540f6b6b (diff) | |
download | wheel-65eabd5766f6edf1d208d249e1938702014cebc3.tar.gz |
Updates following review comments (docs, setup.cfg)
-rw-r--r-- | docs/index.rst | 37 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | wheel/test/test_tagopt.py | 2 |
3 files changed, 39 insertions, 2 deletions
diff --git a/docs/index.rst b/docs/index.rst index 595469b..af5abd3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -97,6 +97,43 @@ contain the setuptools script wrappers. The wheel tool `python -m wheel install-scripts packagename` calls setuptools to write the appropriate scripts wrappers after an install. +Defining the Python version +--------------------------- + +The `bdist_wheel` command automatically determines the correct tags to use for +the generated wheel. These are based on the Python interpreter used to +generate the wheel and whether the project contains C extension code or not. +While this is usually correct for C code, it can be too conservative for pure +Python code. The bdist_wheel command therefore supports two flags that can be +used to specify the Python version tag to use more precisely:: + + --universal Specifies that a pure-python wheel is "universal" + (i.e., it works on any version of Python). This + equates to the tag "py2.py3". + --python-tag XXX Specifies the precide python version tag to use for + a pure-python wheel. + +Neither of these two flags have any effect when used on a project that includes +C extension code. + +A reasonable use of the `--python-tag` argument would be for a project that +uses Python syntax only introduced in a particular Python version. There are +no current examples of this, but if wheels had been available when Python 2.5 +was released (the first version containing the `with` statement), wheels for a +project that used the `with` statement would typically use `--python-tag py25`. + +Typically, projects would not specify python tags on the command line, but +would use `setup.cfg` to set them as a project default:: + + [bdist_wheel] + universal=1 + +or:: + + [bdist_wheel] + python-tag = py32 + + Automatically sign wheel files ------------------------------ @@ -13,6 +13,6 @@ requires-dist = ed25519ll; extra == 'faster-signatures' license-file = LICENSE.txt -[wheel] +[bdist_wheel] # use py2.py3 tag for pure-python dist: universal=1 diff --git a/wheel/test/test_tagopt.py b/wheel/test/test_tagopt.py index 1635857..e013092 100644 --- a/wheel/test/test_tagopt.py +++ b/wheel/test/test_tagopt.py @@ -1,5 +1,5 @@ """ -Tests for the bdist_wheel --python-tag option +Tests for the bdist_wheel tag options (--python-tag and --universal) """ import os |