[Python-modules-commits] [cookiecutter] 03/04: Convert from git-dpm to patches unapplied format

Vincent Bernat bernat at moszumanska.debian.org
Sat Sep 16 14:44:49 UTC 2017


This is an automated email from the git hooks/post-receive script.

bernat pushed a commit to branch debian/master
in repository cookiecutter.

commit 48bba045d81085bd9b19f561f82d74580790a50d
Author: Vincent Bernat <bernat at debian.org>
Date:   Sat Sep 16 16:37:17 2017 +0200

    Convert from git-dpm to patches unapplied format
---
 README.rst                   | 29 ++++++++++++++++++++++++++++-
 cookiecutter/config.py       |  6 +++---
 debian/.git-dpm              | 11 -----------
 debian/gbp.conf              |  2 ++
 docs/cookiecutter_medium.png |  1 -
 setup.py                     |  2 +-
 tests/test_generate_files.py |  2 ++
 7 files changed, 36 insertions(+), 17 deletions(-)

diff --git a/README.rst b/README.rst
index 15afbb9..23b67be 100644
--- a/README.rst
+++ b/README.rst
@@ -2,6 +2,33 @@
 Cookiecutter
 =============
 
+.. image:: https://img.shields.io/pypi/v/cookiecutter.svg
+        :target: https://pypi.python.org/pypi/cookiecutter
+
+.. image:: https://travis-ci.org/audreyr/cookiecutter.png?branch=master
+        :target: https://travis-ci.org/audreyr/cookiecutter
+
+.. image:: https://ci.appveyor.com/api/projects/status/github/audreyr/cookiecutter?branch=master
+        :target: https://ci.appveyor.com/project/audreyr/cookiecutter/branch/master
+
+.. image:: https://codecov.io/github/audreyr/cookiecutter/coverage.svg?branch=master
+        :target: https://codecov.io/github/audreyr/cookiecutter?branch=master
+
+.. image:: https://badges.gitter.im/Join Chat.svg
+        :target: https://gitter.im/audreyr/cookiecutter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
+
+.. image:: https://readthedocs.org/projects/cookiecutter/badge/?version=latest
+        :target: https://readthedocs.org/projects/cookiecutter/?badge=latest
+        :alt: Documentation Status
+
+.. image:: https://landscape.io/github/audreyr/cookiecutter/master/landscape.svg?style=flat
+        :target: https://landscape.io/github/audreyr/cookiecutter/master
+        :alt: Code Health
+
+.. image:: https://img.shields.io/scrutinizer/g/audreyr/cookiecutter.svg
+        :target: https://scrutinizer-ci.com/g/audreyr/cookiecutter/?branch=master
+        :alt: Scrutinizer Code Quality
+
 A command-line utility that creates projects from **cookiecutters** (project
 templates), e.g. creating a Python package project from a Python package project template.
 
@@ -10,7 +37,7 @@ templates), e.g. creating a Python package project from a Python package project
 * Free software: BSD license
 * PyPI: https://pypi.python.org/pypi/cookiecutter
 
-.. image:: cookiecutter_medium.png
+.. image:: https://raw.github.com/audreyr/cookiecutter/aa309b73bdc974788ba265d843a65bb94c2e608e/cookiecutter_medium.png
 
 We are proud to be an open source sponsor of `PyCon 2016`_.
 
diff --git a/cookiecutter/config.py b/cookiecutter/config.py
index cd3bd23..060e6ca 100644
--- a/cookiecutter/config.py
+++ b/cookiecutter/config.py
@@ -13,7 +13,7 @@ import logging
 import os
 import io
 
-import yaml
+import poyo
 
 from .exceptions import ConfigDoesNotExistException
 from .exceptions import InvalidConfiguration
@@ -54,8 +54,8 @@ def get_config(config_path):
     logger.debug('config_path is {0}'.format(config_path))
     with io.open(config_path, encoding='utf-8') as file_handle:
         try:
-            yaml_dict = yaml.safe_load(file_handle.read())
-        except yaml.error.YAMLError as e:
+            yaml_dict = poyo.parse_string(file_handle.read())
+        except poyo.exceptions.PoyoException as e:
             raise InvalidConfiguration(
                 'Unable to parse YAML file {}. Error: {}'
                 ''.format(config_path, e)
diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index 4c2e672..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,11 +0,0 @@
-# see git-dpm(1) from git-dpm package
-3105ab76eb8f09bc974e42fc17ce859e453e2062
-3105ab76eb8f09bc974e42fc17ce859e453e2062
-119be0b58de22342b1850173629a4db9cfc7d1d6
-119be0b58de22342b1850173629a4db9cfc7d1d6
-cookiecutter_1.5.0.orig.tar.gz
-be2134effee7314c5a305b5cc984feac9c3f7182
-246654
-debianTag="debian/%e%v"
-patchedTag="patched/%e%v"
-upstreamTag="upstream/%e%u"
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..3879982
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+debian-branch=debian/master
diff --git a/docs/cookiecutter_medium.png b/docs/cookiecutter_medium.png
deleted file mode 120000
index a643810..0000000
--- a/docs/cookiecutter_medium.png
+++ /dev/null
@@ -1 +0,0 @@
-../cookiecutter_medium.png
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 2805cd0..5a45b5c 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ requirements = [
     'jinja2>=2.7',
     'click>=5.0',
     'whichcraft>=0.4.0',
-    'PyYAML',
+    'poyo>=0.1.0',
     'jinja2-time>=0.1.0'
 ]
 
diff --git a/tests/test_generate_files.py b/tests/test_generate_files.py
index b425fc6..f71192f 100644
--- a/tests/test_generate_files.py
+++ b/tests/test_generate_files.py
@@ -112,9 +112,11 @@ def test_generate_files_binaries():
     )
 
     assert os.path.isfile('inputbinary_files/logo.png')
+    assert os.path.isfile('inputbinary_files/.DS_Store')
     assert os.path.isfile('inputbinary_files/readme.txt')
     assert os.path.isfile('inputbinary_files/some_font.otf')
     assert os.path.isfile('inputbinary_files/binary_files/logo.png')
+    assert os.path.isfile('inputbinary_files/binary_files/.DS_Store')
     assert os.path.isfile('inputbinary_files/binary_files/readme.txt')
     assert os.path.isfile('inputbinary_files/binary_files/some_font.otf')
     assert os.path.isfile(

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/cookiecutter.git



More information about the Python-modules-commits mailing list