Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Mar 4, 2013
1 parent 4e68464 commit eb3cee2
Show file tree
Hide file tree
Showing 20 changed files with 75 additions and 39 deletions.
6 changes: 4 additions & 2 deletions docs/narr/MyProject/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
12 changes: 8 additions & 4 deletions docs/narr/commandline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,10 @@ top-level directory your ``setup.py`` file will look something like this:
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = ['pyramid', 'pyramid_debugtoolbar']
Expand Down Expand Up @@ -830,8 +832,10 @@ The result will be something like:
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = ['pyramid', 'pyramid_debugtoolbar']
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/authorization/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/basiclayout/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/tests/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki/src/views/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/wiki/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``.
.. literalinclude:: src/tests/setup.py
:linenos:
:language: python
:lines: 9-19
:lines: 11-21
:emphasize-lines: 10

After we've added a dependency on WebTest in ``setup.py``, we need to rerun
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/wiki2/definingviews.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Open ``tutorial/setup.py`` and edit it to look like the following:
.. literalinclude:: src/views/setup.py
:linenos:
:language: python
:emphasize-lines: 17
:emphasize-lines: 19

(Only the highlighted line needs to be added.)

Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki2/src/authorization/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki2/src/basiclayout/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki2/src/models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki2/src/tests/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions docs/tutorials/wiki2/src/views/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/wiki2/tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Change the ``requires`` list in ``setup.py`` to include ``WebTest``.
.. literalinclude:: src/tests/setup.py
:linenos:
:language: python
:lines: 9-20
:lines: 11-21
:emphasize-lines: 10

After we've added a dependency on WebTest in ``setup.py``, we need to rerun
Expand Down
6 changes: 4 additions & 2 deletions pyramid/scaffolds/alchemy/setup.py_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import os
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions pyramid/scaffolds/starter/setup.py_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import os
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions pyramid/scaffolds/zodb/setup.py_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import os
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = [
'pyramid',
Expand Down
6 changes: 4 additions & 2 deletions pyramid/tests/test_scaffolds/fixture_scaffold/setup.py_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import os
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.txt')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()

requires = ['pyramid', 'pyramid_debugtoolbar']

Expand Down
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@

here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
except IOError:
README = CHANGES = ''

Expand Down

0 comments on commit eb3cee2

Please sign in to comment.