Skip to content

Commit

Permalink
Added a CHANGES file
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Wilhelm authored and Florian Wilhelm committed Mar 23, 2015
1 parent c109d16 commit 1ed30bc
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ Version 2.1, 2015-??-??
=======================

- Use alabaster as default Sphinx theme
- FIX: data_files are installed in share/PACKAGE instead of root
- Parameter data_files is now a section in setup.cfg
- Allow definition of extras_require in setup.cfg
- Added a CHANGES.rst file for logging changes

Version 2.0.4, 2015-03-17
=========================
Expand Down
5 changes: 2 additions & 3 deletions pyscaffold/data/setup_cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ classifiers = ${classifiers}
putup = pyscaffold.runner:run

[data_files]
# Add here data to include which lies OUTSIDE your package, e.g.
# Add here data to be included which lies OUTSIDE your package, e.g.
# path/to/destination = files/to/include, others/to/include
# This is equivalent to adding files to MANIFEST.in which is not needed.
# The destination is relative to the root of your virtual environment, e.g.
# The destination is relative to the root of your virtual environment.
share/${package} = *.rst, *.txt

[extras_require]
Expand All @@ -35,7 +35,6 @@ share/${package} = *.rst, *.txt
cov-report = html
junitxml = junit.xml


# Options for py.test
[pytest]
flakes-ignore =
Expand Down
1 change: 1 addition & 0 deletions pyscaffold/data/sphinx_index.template
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Contents

License <license>
Authors <authors>
Changelog <changes>
Module Reference <_rst/modules>


Expand Down
3 changes: 3 additions & 0 deletions pyscaffold/structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ def make_structure(args):
"authors.rst": templates.sphinx_authors(args),
"index.rst": templates.sphinx_index(args),
"license.rst": templates.sphinx_license(args),
"changes.rst": templates.sphinx_changes(args),
"Makefile": templates.sphinx_makefile(args),
"_static": {
".gitignore": templates.gitignore_empty(args)}},
"README.rst": templates.readme(args),
"AUTHORS.rst": templates.authors(args),
"LICENSE.txt": templates.license(args),
"CHANGES.rst": templates.changes(args),
"setup.py": templates.setup_py(args),
"setup.cfg": templates.setup_cfg(args),
"requirements.txt": templates.requirements(args),
Expand All @@ -119,6 +121,7 @@ def make_structure(args):
".gitattributes": None,
"setup.cfg": None,
"README.rst": None,
"CHANGES.rst": None,
"LICENSE.txt": None,
"AUTHORS.rst": None,
"requirements.txt": None,
Expand Down
22 changes: 22 additions & 0 deletions pyscaffold/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@ def sphinx_authors(args):
return template.substitute(vars(args))


def sphinx_changes(args):
"""
Template of changes.rst
:param args: command line parameters as :obj:`argparse.Namespace`
:return: file content as string
"""
template = get_template("sphinx_changes")
return template.substitute(vars(args))


def version(args):
"""
Template of _version.py
Expand Down Expand Up @@ -310,3 +321,14 @@ def skeleton(args):
"""
template = get_template("skeleton")
return template.substitute(vars(args))


def changes(args):
"""
Template of CHANGES.rst
:param args: command line parameters as :obj:`argparse.Namespace`
:return: file content as string
"""
template = get_template("changes")
return template.substitute(vars(args))
9 changes: 3 additions & 6 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ url = http://pyscaffold.readthedocs.org/
# Comma separated list of data INSIDE your package to include.
# DO NOT prepend the package name when specifying files and folders.
package_data = data/*


# Add here all kinds of additional classifiers as defined under
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = Development Status :: 5 - Production/Stable,
Expand All @@ -33,10 +31,10 @@ classifiers = Development Status :: 5 - Production/Stable,
putup = pyscaffold.runner:run

[data_files]
# Add here data to include which lies OUTSIDE your package, e.g.
# path/to/destination = files/to/include, others/to/include
# Add here data to be included which lies OUTSIDE your package, e.g.
# path/to/destination = files/to/include
# This is equivalent to adding files to MANIFEST.in which is not needed.
# The destination is relative to the root of your virtual environment, e.g.
# The destination is relative to the root of your virtual environment.
share/pyscaffold = *.rst, *.txt

[extras_require]
Expand All @@ -49,7 +47,6 @@ ALL = django, cookiecutter
cov-report = html
junitxml = junit.xml


# Options for py.test
[pytest]
flakes-ignore =
Expand Down

0 comments on commit 1ed30bc

Please sign in to comment.