diff --git a/{{cookiecutter.package_name}}/.gitignore b/{{cookiecutter.package_name}}/.gitignore index ded6067..09b079c 100644 --- a/{{cookiecutter.package_name}}/.gitignore +++ b/{{cookiecutter.package_name}}/.gitignore @@ -1,13 +1,16 @@ +# General things to ignore +build/ +dist/ *.py[cod] +__pycache__/ +*~ # C extensions *.so # Packages *.egg -*.egg-info -dist -build +*.egg-info/ eggs parts bin @@ -17,7 +20,6 @@ develop-eggs .installed.cfg lib lib64 -__pycache__ # Installer logs pip-log.txt @@ -26,6 +28,7 @@ pip-log.txt .coverage .tox nosetests.xml +.cache # Translations *.mo diff --git a/{{cookiecutter.package_name}}/README.rst b/{{cookiecutter.package_name}}/README.rst index ae90f36..18fdcf5 100644 --- a/{{cookiecutter.package_name}}/README.rst +++ b/{{cookiecutter.package_name}}/README.rst @@ -1,6 +1,7 @@ {{ cookiecutter.package_name }} {{ cookiecutter.package_name|count * "=" }} + {% if cookiecutter.readme_pypi_badge -%} .. image:: https://img.shields.io/pypi/v/{{ cookiecutter.package_name }}.svg :target: https://pypi.python.org/pypi/{{ cookiecutter.package_name }} @@ -27,7 +28,7 @@ Requirements Compatibility ------------- -Licence +License ------- Authors diff --git a/{{cookiecutter.package_name}}/setup.py b/{{cookiecutter.package_name}}/setup.py index 1457c6f..3194dc4 100644 --- a/{{cookiecutter.package_name}}/setup.py +++ b/{{cookiecutter.package_name}}/setup.py @@ -1,17 +1,12 @@ -import io -import os -import re +from os import path +from io import open +from setuptools import find_packages, setup -from setuptools import find_packages -from setuptools import setup - - -def read(filename): - filename = os.path.join(os.path.dirname(__file__), filename) - text_type = type(u"") - with io.open(filename, mode="r", encoding='utf-8') as fd: - return re.sub(text_type(r':[a-z]+:`~?(.*?)`'), text_type(r'``\1``'), fd.read()) +here = path.abspath(path.dirname(__file__)) +# Get the long description from the README file. +with open(path.join(here, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() setup( name="{{ cookiecutter.package_name }}", @@ -23,14 +18,17 @@ def read(filename): author_email="{{ cookiecutter.author_email }}", description="{{ cookiecutter.package_description }}", - long_description=read("README.rst"), + long_description=long_description, packages=find_packages(exclude=('tests',)), install_requires=[], + zip_safe=False, + classifiers=[ 'Development Status :: 2 - Pre-Alpha', + 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python', 'Programming Language :: Python :: 2', diff --git a/{{cookiecutter.package_name}}/tests/test_sample.py b/{{cookiecutter.package_name}}/tests/test_sample.py index 2b3a488..0bb2ba7 100644 --- a/{{cookiecutter.package_name}}/tests/test_sample.py +++ b/{{cookiecutter.package_name}}/tests/test_sample.py @@ -1,4 +1,4 @@ # Sample Test passing with nose and pytest -def test_pass(): - assert True, "dummy sample test" +def test_success(): + assert True diff --git a/{{cookiecutter.package_name}}/tox.ini b/{{cookiecutter.package_name}}/tox.ini index b9c4fd6..1df6407 100644 --- a/{{cookiecutter.package_name}}/tox.ini +++ b/{{cookiecutter.package_name}}/tox.ini @@ -1,6 +1,6 @@ [tox] -envlist = py27,py34,py35,py36,py37 +envlist = py{27,34,35,36,37} [testenv] -commands = py.test {{ cookiecutter.package_name }} deps = pytest +commands = py.test tests \ No newline at end of file