Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion {{cookiecutter.project_repo_name}}/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tag = True
[metadata]
description-file = README.rst

[bumpversion:file:{{ cookiecutter.project_slug }}/__init__.py]
[bumpversion:file:{{ cookiecutter.project_slug }}/__version__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

Expand Down
11 changes: 7 additions & 4 deletions {{cookiecutter.project_repo_name}}/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@

from setuptools import setup, find_packages

version = __import__('{{ cookiecutter.project_slug }}').__version__
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()

about = {}
with open(os.path.join(here, '{{ cookiecutter.project_slug }}', '__version__.py'), 'r') as f:
exec(f.read(), about)

reqs = [line.strip() for line in open('requirements.txt')]

{%- set license_classifiers = {
Expand Down Expand Up @@ -41,11 +44,11 @@
]

setup(name='{{ cookiecutter.project_slug }}',
version=version,
version=about['__version__'],
description="{{ cookiecutter.project_short_description }}",
long_description=README + '\n\n' + CHANGES,
author="{{ cookiecutter.full_name.replace('\"', '\\\"') }}",
author_email='{{ cookiecutter.email }}',
author=about['__author__'],
author_email=about['__email__'],
url='https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_repo_name }}',
classifiers=classifiers,
{%- if cookiecutter.open_source_license in license_classifiers %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

"""Top-level package for {{ cookiecutter.project_name }}."""

from .wsgi import application
from .__version__ import __author__, __email__, __version__

__author__ = """{{ cookiecutter.full_name }}"""
__email__ = '{{ cookiecutter.email }}'
__version__ = '{{ cookiecutter.version }}'
from .wsgi import application
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-

# This information is located in its own file so that it can be loaded
# without importing the main package when its dependencies are not installed.
# See: https://packaging.python.org/guides/single-sourcing-package-version

__author__ = """{{ cookiecutter.full_name }}"""
__email__ = '{{ cookiecutter.email }}'
__version__ = '{{ cookiecutter.version }}'