Commits

Daniel Holth  committed 00d9b63

docs update

  • Participants
  • Parent commits ccb8d95

Comments (0)

Files changed (2)

File docs/index.rst

     [bdist_wheel]
     python-tag = py32
 
+Defining conditional dependencies
+---------------------------------
+
+In wheel, the only way to have conditional dependencies (that might only be
+needed on certain platforms) is to use environment markers as defined by
+PEP 426.
+
+As of wheel 0.24.0, the recommended way to do this is in the setuptools
+`extras_require` parameter. A `:` separates the extra name from the marker.
+Wheel's own setup.py has an example::
+      extras_require={
+          ':python_version=="2.6"': ['argparse'],
+          'signatures': ['keyring'],
+          'signatures:sys_platform!="win32"': ['pyxdg'],
+          'faster-signatures': ['ed25519ll'],
+          'tool': []
+          },
+
+The extra named '' signifies a default requirement, as if it was passed to
+`install_requires`.
+
+Older versions of bdist_wheel supported passing requirements in a
+now-deprecated [metadata] section in setup.cfg.
+
 Automatically sign wheel files
 ------------------------------
 
                  encoding='utf8') as version_file:
     metadata = dict(re.findall(r"""__([a-z]+)__ = "([^"]+)""", version_file.read()))
 
-#
-# All these requirements are overridden by setup.cfg when wheel is built
-# as a wheel:
-#
-signature_reqs = ['keyring']
-if sys.platform != 'win32':
-    signature_reqs.append('pyxdg')
-install_requires = []
-if sys.version_info[:2] < (2, 7):
-    install_requires.append('argparse')
-
 setup(name='wheel',
       version=metadata['version'],
       description='A built-package format for Python.',
         "Programming Language :: Python :: 3",
         "Programming Language :: Python :: 3.2",
         "Programming Language :: Python :: 3.3",
+        "Programming Language :: Python :: 3.4",
         ],
       author='Daniel Holth',
       author_email='dholth@fastmail.fm',
           'wheel.tool',
           'wheel.signatures'
           ],
-      install_requires=install_requires,
       extras_require={
           ':python_version=="2.6"': ['argparse'],
           'signatures': ['keyring'],