diff options
| author | Jannis Leidel <jannis@leidel.info> | 2009-10-08 15:11:48 +0200 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2009-10-08 15:11:48 +0200 |
| commit | dcc66e813d10098aa88eaa3be169cbc2e8b301b6 (patch) | |
| tree | 3934040b50ea6adb96a0ee4fe1f123785ca6037a /docs/python3.txt | |
| parent | 079951a1532a2c9e3295253c65e06091758f9150 (diff) | |
| download | python-setuptools-git-dcc66e813d10098aa88eaa3be169cbc2e8b301b6.tar.gz | |
Added a bunch of code-block directives for better highlighting with Pygments, fixed typo
--HG--
branch : distribute
extra : rebase_source : e000e29a4c561a0397b134d2e451080b34f84b5d
Diffstat (limited to 'docs/python3.txt')
| -rw-r--r-- | docs/python3.txt | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/docs/python3.txt b/docs/python3.txt index 9b5fa797..d5c3da67 100644 --- a/docs/python3.txt +++ b/docs/python3.txt @@ -36,20 +36,21 @@ to a list of names of packages containing fixers. A typical setup.py can look something like this:: - from setuptools import setup - - setup(name='your.module', - version = '1.0', - description='This is your awesome module', - author='You', - author_email='your@email', - package_dir = {'': 'src'}, - packages = ['your', 'you.module'], - test_suite = 'your.module.tests', - use_2to3 = True, - convert_2to3_doctests = ['src/your/module/README.txt'], - use_2to3_fixers = ['your.fixers'] - ) + from setuptools import setup + + setup( + name='your.module', + version = '1.0', + description='This is your awesome module', + author='You', + author_email='your@email', + package_dir = {'': 'src'}, + packages = ['your', 'you.module'], + test_suite = 'your.module.tests', + use_2to3 = True, + convert_2to3_doctests = ['src/your/module/README.txt'], + use_2to3_fixers = ['your.fixers'] + ) Differential conversion ----------------------- @@ -96,25 +97,26 @@ install process will continue as normal, but if you want to get rid of that error this is easy. Simply conditionally add the new parameters into an extra dict and pass that dict into setup():: - from setuptools import setup - import sys - - extra = {} - if sys.version_info >= (3,): - extra['use_2to3'] = True - extra['convert_2to3_doctests'] = ['src/your/module/README.txt'] - extra['use_2to3_fixers'] = ['your.fixers'] - - setup(name='your.module', - version = '1.0', - description='This is your awesome module', - author='You', - author_email='your@email', - package_dir = {'': 'src'}, - packages = ['your', 'you.module'], - test_suite = 'your.module.tests', - **extra - ) + from setuptools import setup + import sys + + extra = {} + if sys.version_info >= (3,): + extra['use_2to3'] = True + extra['convert_2to3_doctests'] = ['src/your/module/README.txt'] + extra['use_2to3_fixers'] = ['your.fixers'] + + setup( + name='your.module', + version = '1.0', + description='This is your awesome module', + author='You', + author_email='your@email', + package_dir = {'': 'src'}, + packages = ['your', 'you.module'], + test_suite = 'your.module.tests', + **extra + ) This way the parameters will only be used under Python 3, where you have to use Distribute. |
