# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['copier', 'copier.config']

package_data = \
{'': ['*']}

install_requires = \
['colorama>=0.4.0,<1.0.0',
 'jinja2>=2.10.0,<3.0.0',
 'packaging>=20.1,<21.0',
 'pathspec>=0.7.0,<0.8.0',
 'plumbum>=1.6.0,<2.0.0',
 'pydantic>=1.0b1',
 'pyyaml-include>=1.2,<2.0',
 'pyyaml>=5.3,<6.0',
 'regex>=2020.2.20,<2021.0.0',
 'semver>=2.10.0,<3.0.0']

entry_points = \
{'console_scripts': ['copier = copier.cli:CopierApp.run']}

setup_kwargs = {
    'name': 'copier',
    'version': '3.1.0',
    'description': 'A library for rendering project templates.',
    'long_description': '## Think this library is awesome? Vote with a 👍 to include it in the awesome-python list: https://github.com/vinta/awesome-python/pull/1350\n\n# ![Copier](https://github.com/pykong/copier/raw/master/img/copier-logotype.png)\n\n[![codecov](https://codecov.io/gh/pykong/copier/branch/master/graph/badge.svg)](https://codecov.io/gh/pykong/copier)\n![](https://github.com/pykong/copier/workflows/CI/badge.svg)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n![](https://img.shields.io/pypi/pyversions/copier)\n![](https://img.shields.io/pypi/v/copier)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nA library for rendering project templates.\n\n- Works with **local** paths and **git URLs**.\n- Your project can include any file and `Copier` can dynamically replace values in any\n  kind of text file.\n- It generates a beautiful output and takes care of not overwrite existing files unless\n  instructed to do so.\n\n![Sample output](https://github.com/pykong/copier/raw/master/img/copier-output.png)\n\n<details>\n<!-- prettier-ignore-start -->\n<!-- START doctoc generated TOC please keep comment here to allow auto update -->\n<!-- DON\'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->\n<summary>Table of contents</summary>\n\n- [Installation](#installation)\n- [Quick usage](#quick-usage)\n- [Creating a template](#creating-a-template)\n  - [The `copier.yml` file](#the-copieryml-file)\n    - [Prompt the user for information](#prompt-the-user-for-information)\n      - [Advanced prompt formatting](#advanced-prompt-formatting)\n      - [Prompt templating](#prompt-templating)\n    - [Special options](#special-options)\n      - [Patterns syntax](#patterns-syntax)\n        - [Examples for pattern matching](#examples-for-pattern-matching)\n    - [Include other yaml files](#include-other-yaml-files)\n  - [The `.copier-answers.yml` file](#the-copier-answersyml-file)\n  - [Template helpers](#template-helpers)\n    - [Builtin variables/functions](#builtin-variablesfunctions)\n    - [Builtin filters](#builtin-filters)\n- [Generating a project](#generating-a-project)\n- [Updating a project](#updating-a-project)\n- [Browse or tag public templates](#browse-or-tag-public-templates)\n- [API](#api)\n  - [copier.copy()](#copiercopy)\n- [Comparison with other project generators](#comparison-with-other-project-generators)\n  - [Cookiecutter](#cookiecutter)\n- [Credits](#credits)\n\n<!-- END doctoc generated TOC please keep comment here to allow auto update -->\n<!-- prettier-ignore-end -->\n</details>\n\n## Installation\n\n1. Install Git 2.24 or newer.\n1. To use as a CLI app: `pipx install copier`\n1. To use as a library: `pip install copier`\n\n## Quick usage\n\n- Use it in your Python code:\n\n```python\nfrom copier import copy\n\n# Create a project from a local path\ncopy("path/to/project/template", "path/to/destination")\n\n# Or from a git URL.\ncopy("https://github.com/pykong/copier.git", "path/to/destination")\n\n# You can also use "gh:" as a shortcut of "https://github.com/"\ncopy("gh:pykong/copier.git", "path/to/destination")\n\n# Or "gl:" as a shortcut of "https://gitlab.com/"\ncopy("gl:pykong/copier.git", "path/to/destination")\n```\n\n- Or as a command-line tool:\n\n```bash\ncopier path/to/project/template path/to/destination\n```\n\n## Creating a template\n\nA template is a directory: usually the root folder of a git repository.\n\nThe content of the files inside the project template is copied to the destination\nwithout changes, **unless they end with `.tmpl`** (or your chosen `templates_suffix`).\nIn that case, the templating engine will be used to render them.\n\nA slightly customized Jinja2 templating is used. The main difference is those variables\nare referenced with `[[ name ]]` instead of `{{ name }}` and blocks are `[% if name %]`\ninstead of `{% if name %}`. To read more about templating see the\n[Jinja2 documentation](https://jinja.palletsprojects.com/).\n\nIf a **YAML** file named `copier.yml` is found in the root of the project\n(alternatively, a YAML file named `copier.yaml`), the user will be prompted to fill in\nor confirm the default values.\n\nSince version 3.0, only Python 3.6 or later are supported. Please use the 2.5.1 version\nif your project runs on a previous Python version.\n\n### The `copier.yml` file\n\nIf a `copier.yml`, or `copier.yaml` is found in the root of the template, it will be\nread and used for two purposes:\n\n- prompting the user for information\n- configuring project generation (excluding files, setting arguments defaults, etc.)\n\n#### Prompt the user for information\n\nFor each key found, Copier will prompt the user to fill or confirm the values before\nthey become available to the project template. So content like this:\n\n```yaml\nname_of_the_project: My awesome project\nnumber_of_eels: 1234\nyour_email: ""\n```\n\nwill result in this series of questions:\n\n<pre>\n  <b>name_of_the_project</b>? Format: yaml\n🎤 [My awesome project]:\n\n  <b>number_of_eels</b>? Format: yaml\n🎤 [1234]:\n\n  <b>your_email</b>? Format: yaml\n🎤 []:\n</pre>\n\n##### Advanced prompt formatting\n\nApart from the simplified format, as seen above, Copier supports a more advanced format\nto ask users for data. To use it, the value must be a dict.\n\nSupported keys:\n\n- **type**: User input must match this type. Options are: bool, float, int, json, str,\n  yaml.\n- **help**: Additional text to help the user know what\'s this question for.\n- **default**: Leave empty to force the user to answer. Provide a default to save him\n  from typing it if it\'s quite common. When using **choices**, the default must be the\n  choice _value_, not its _key_. If values are quite long, you can use\n  [YAML anchors](https://confluence.atlassian.com/bitbucket/yaml-anchors-960154027.html).\n\n```yaml\nlove_copier:\n  type: bool # This makes Copier ask for y/n\n  help: Do you love Copier?\n  default: yes # Without a default, you force the user to answer\n\nproject_name:\n  type: str # Any value will be treated raw as a string\n  help: An awesome project needs an awesome name. Tell me yours.\n  default: paradox-specifier\n\nrocket_launch_password:\n  type: str\n  secret: true # This value will not be logged into .copier-answers.yml\n  default: my top secret password\n\n# I\'ll avoid default and help here, but you can use them too\nage:\n  type: int\n\nheight:\n  type: float\n\nany_json:\n  help: Tell me anything, but format it as a one-line JSON string\n  type: json\n\nany_yaml:\n  help: Tell me anything, but format it as a one-line YAML string\n  type: yaml # This is the default type, also for short syntax questions\n\nyour_favorite_book:\n  # User will type 1 or 2, but your template will get the value\n  choices:\n    - The Bible\n    - The Hitchhiker\'s Guide to the Galaxy\n\nproject_license:\n  # User will type 1 or 2 and will see only the dict key, but you will\n  # get the dict value in your template\n  choices:\n    MIT: &mit_text |\n      Here I can write the full text of the MIT license.\n      This will be a long text, shortened here for example purposes.\n    Apache2: |\n      Full text of Apache2 license.\n  # When using choices, the default value is the value, **not** the key;\n  # that\'s why I\'m using the YAML anchor declared above to avoid retyping the\n  # whole license\n  default: *mit_text\n  # You can still define the type, to make sure answers that come from --data\n  # CLI argument match the type that your template expects\n  type: str\n\nclose_to_work:\n  help: Do you live close to your work?\n  # This format works just like the dict one\n  choices:\n    - [at home, I work at home]\n    - [less than 10km, quite close]\n    - [more than 10km, not so close]\n    - [more than 100km, quite far away]\n```\n\n##### Prompt templating\n\nValues of prompted keys can use Jinja templates.\n\nKeep in mind that the configuration is loaded as **YAML**, so the contents must be\n**valid YAML** and respect **Copier\'s structure**. That is why we explicitly wrap some\nstrings in double-quotes in the following examples.\n\nAnswers provided through interactive prompting will not be rendered with Jinja, so you\ncannot use Jinja templating in your answers.\n\n```yaml\n# default\nusername:\n  type: str\n\norganization:\n  type: str\n\nemail:\n  type: str\n  default: "[[ username ]]@[[ organization ]].com"\n\n# help\ncopyright_holder:\n  type: str\n  help: The person or entity within [[ organization ]] that holds copyrights.\n\n# type\ntarget:\n  type: str\n  choices:\n    - humans\n    - machines\n\nuser_config:\n  type: "[% if target == \'humans\' %]yaml[% else %]json[% endif %]"\n\n# choices\ntitle:\n  type: str\n  help: Your title within [[ organization ]]\n\ncontact:\n  choices:\n    Copyright holder: "[[ copyright_holder ]]"\n    CEO: Alice Bob\n    CTO: Carl Dave\n    "[[ title ]]": "[[ username ]]"\n```\n\n#### Special options\n\nCopier will also read special configuration options from the `copier.yml` file. They all\nstart with an underscore.\n\n```yaml\n# Specify the minimum required version of Copier to generate a project from this template.\n# The version must be follow the semantic versioning syntax: https://semver.org/.\n# Upon generating or updating a project, if the installed version of Copier is less than the required one,\n# the generation will be aborted and an error will be shown to the user.\n_min_copier_version: "4.1.0"\n\n# File where answers will be recorded. Defaults to `.copier-answers.yml`.\n# Remember to add that file to your template if you want to support updates.\n_answers_file: .my-custom-answers.yml\n\n# Suffix that instructs which files are to be processed by Jinja as templates\n_templates_suffix: .tmpl\n\n# gitignore-style patterns files/folders that must not be copied.\n# Can be overridden with the `exclude` CLI/API option.\n_exclude:\n  - "*.bar"\n  - ".git"\n\n# gitignore-style patterns files to skip, without asking, if they already exists\n# in the destination folder\n# Can be overridden with the `skip_if_exist` API option.\n_skip_if_exists:\n\n# Commands to execute after generating or updating a project from your template.\n# They run ordered, and with the $STAGE=task variable in their environment.\n# Can be overridden with the `tasks` API option.\n_tasks:\n  # Strings get executed under system\'s default shell\n  - "git init"\n  - "rm [[ name_of_the_project / \'README.md\' ]]"\n  # Arrays are executed without shell, saving you the work of escaping arguments\n  - [invoke, "--search-root=[[ _copier_conf.src_path ]]", after-copy]\n  # You are able to output the full conf to JSON, to be parsed by your script,\n  # but you cannot use the normal `|tojson` filter; instead, use `.json()`\n  - [invoke, end-process, "--full-conf=[[ _copier_conf.json() ]]"]\n\n# Migrations are like tasks, but they are executed:\n# - Evaluated using PEP 440\n# - In the same order as declared here (so you could even run a migration for a higher\n#   version before running a migration for a lower version if the higher one is declared\n#   before and the update passes through both)\n# - Only when new version >= declared version > old version\n# - Only when updating\n# - After being rendered with Jinja, with the same context as the rest of the template\n# - With $VERSION_FROM, $VERSION_TO, $VERSION_CURRENT and $STAGE (before/after)\n#   environment variables\n_migrations:\n  - version: v1.0.0\n    before:\n      - rm ./old-folder\n    after:\n      # [[ _copier_conf.src_path ]] points to the path where the template was\n      # cloned, so it can be helpful to run migration scripts stored there.\n      - invoke -r [[ _copier_conf.src_path ]] -c migrations migrate $VERSION_CURRENT\n\n# Additional paths, from where to search for templates\n# Can be overridden with the `extra_paths` API option.\n_extra_paths:\n  - ~/Projects/templates\n```\n\n##### Patterns syntax\n\nCopier supports matching names against patterns in a gitignore style fashion. This works\nfor the options `exclude` and `skip`. This means you can write patterns as you would for\nany `.gitignore` file. The full range of the gitignore syntax ist supported via\n[pathspec]([https://github.com/cpburnz/python-path-specification](https://github.com/cpburnz/python-path-specification).\n\n###### Examples for pattern matching\n\nPutting the following settings in your `copier.yaml` file would exclude all files ending\nwith "txt" from being copied to the destination folder, except the file `a.txt`.\n\n```yaml\n_exclude:\n  # match all text files...\n  - "*.txt"\n  # .. but not this one:\n  - "!a.txt"\n```\n\n#### Include other yaml files\n\nTo reuse configurations across templates you can reference other yaml files. You just\nneed to state the `!include` together with the absolute or relative path to the file to\nbe included. Multiple files can be included per `copier.yml`. For more detailed\ninstructions, see [pyyaml-include](https://github.com/tanbro/pyyaml-include#usage).\n\n```yaml\n# other_place/include_me.yml\ncommon_setting: "1"\n\n# copier.yml\n!include other_place/include_me.yml\n```\n\n### The `.copier-answers.yml` file\n\nIf the destination path exists and a `.copier-answers.yml` file is present there, it\nwill be used to load the last user\'s answers to the questions made in\n[the `copier.yml` file](#the-copieryml-file).\n\nThis makes projects easier to update because when the user is asked, the default answers\nwill be the last ones he used.\n\nTo make sure projects based on your templates can make use of this nice feature, **add a\nfile called `[[ _copier_conf.answers_file ]].tmpl`** (or your chosen `templates_suffix`)\nin your template\'s root folder, with this content:\n\n```yml\n# Changes here will be overwritten by Copier\n[[_copier_answers|to_nice_yaml]]\n```\n\nIf this file is called different than `[[ _copier_conf.answers_file ]].tmpl` your users\nwill not be able to choose a custom answers file name, and thus they will not be able to\nintegrate several updatable templates into one destination directory.\n\nThe builtin `_copier_answers` variable includes all data needed to smooth future updates\nof this project. This includes (but is not limited to) all JSON-serializable values\ndeclared as user questions in [the `copier.yml` file](#the-copieryml-file).\n\nAs you can see, you also have the power to customize what will be logged here. Keys that\nstart with an underscore (`_`) are specific to Copier. Other keys should match questions\nin `copier.yml`.\n\nIf you plan to integrate several templates into one single downstream project, you can\nuse a different path for this file:\n\n```yaml\n# In your `copier.yml`:\n_answers_file: .my-custom-answers.yml\n```\n\n### Template helpers\n\nIn addition to\n[all the features Jinja supports](https://jinja.palletsprojects.com/en/2.11.x/templates/),\nCopier includes:\n\n#### Builtin variables/functions\n\n- `now()` to get current UTC time.\n- `make_secret()` to get a random string.\n- `_copier_answers` includes the current answers dict, but slightly modified to make it\n  suitable to [autoupdate your project safely](#the-answers-file):\n  - It doesn\'t contain secret answers.\n  - It doesn\'t contain any data that is not easy to render to JSON or YAML.\n  - It contains special keys like `_commit` and `_src_path`, indicating how the last\n    template update was done.\n- `_copier_conf` includes the current copier `ConfigData` object, also slightly\n  modified:\n  - It only contains JSON-serializable data.\n  - But you have to serialize it with `[[ _copier_conf.json() ]]` instead of\n    `[[ _copier_conf|tojson ]]`.\n  - ⚠️ It contains secret answers inside its `.data` key.\n  - Modifying it doesn\'t alter the current rendering configuration.\n\n#### Builtin filters\n\n- `anything|to_nice_yaml` to print as pretty-formatted YAML.\n\n  Without arguments it defaults to:\n  `anything|to_nice_yaml(indent=2, width=80, allow_unicode=True)`, but you can modify\n  those.\n\n## Generating a project\n\n**Warning:** Generate projects only from trusted templates as their tasks run with the\nsame level of access as your user.\n\nAs seen in the quick usage section, you can generate a project from a template using the\n`copier` command-line tool:\n\n```bash\ncopier path/to/project/template path/to/destination\n```\n\nOr within Python code:\n\n```python\ncopier.copy("path/to/project/template", "path/to/destination")\n```\n\nThe "template" parameter can be a local path, an URL, or a shortcut URL:\n\n- GitHub: `gh:namespace/project`\n- GitLab: `gl:namespace/project`\n\nUse the `--data` command-line argument or the `data` parameter of the `copier.copy()`\nfunction to pass whatever extra context you want to be available in the templates. The\narguments can be any valid Python value, even a function.\n\nUse the `--vcs-ref` command-line argument to checkout a particular git ref before\ngenerating the project.\n\nAll the available options are described with the `--help-all` option.\n\n## Updating a project\n\nThe best way to update a project from its template is when all of these conditions are\ntrue:\n\n1. The template includes a valid `.copier-answers.yml` file.\n2. The template is versioned with git (with tags).\n3. The destination folder is versioned with git.\n\nIf that\'s your case, then just enter the destination folder, make sure `git status`\nshows it clean, and run:\n\n```bash\ncopier update\n```\n\nThis will read all available git tags, will compare them using\n[PEP 440](https://www.python.org/dev/peps/pep-0440/), and will check out the latest one\nbefore updating. To update to the latest commit, add `--vcs-ref=HEAD`. You can use any\nother git ref you want.\n\nWhen updating, Copier will do its best to respect your project evolution by using the\nanswers you provided when copied last time. However, sometimes it\'s impossible for\nCopier to know what to do with a diff code hunk. In those cases, you will find `*.rej`\nfiles that contain the unresolved diffs. _You should review those manually_ before\ncommitting.\n\nYou probably don\'t want `*.rej` files in your git history, but if you add them to\n`.gitignore`, some important changes could pass unnoticed to you. That\'s why the\nrecommended way to deal with them is to _not_ add them to add a\n[pre-commit](https://pre-commit.com/) (or equivalent) hook that forbids them, just like\nthis:\n\n```yaml\n# .pre-commit-config.yaml\nrepos:\n  - repo: local\n    hooks:\n      - id: forbidden-files\n        name: forbidden files\n        entry: found copier update rejection files; review them and remove them\n        language: fail\n        files: "\\\\.rej$"\n```\n\n## Browse or tag public templates\n\nYou can browse public copier templates in GitHub using\n[the `copier-template` topic](https://github.com/topics/copier-template). Use them as\ninspiration!\n\nIf you want your template to appear in that list, just add the topic to it! 🏷\n\n## API\n\n### copier.copy()\n\n```python\ncopier.copy(\n    src_path,\n    dst_path,\n\n    data=DEFAULT_DATA,\n    *,\n    exclude=DEFAULT_FILTER,\n    skip_if_exists=[],\n    tasks=[],\n\n    envops={},\n    extra_paths=[],\n\n    pretend=False,\n    force=False,\n    skip=False,\n    quiet=False,\n    cleanup_on_error=True\n)\n```\n\nUses the template in _src_path_ to generate a new project at _dst_path_.\n\n**Arguments**:\n\n- **src_path** (str):<br> Absolute path to the project skeleton, which can also be a\n  version control system URL.\n\n- **dst_path** (str):<br> Absolute path to where to render the skeleton.\n\n- **data** (dict):<br> Data to be passed to the templates in addition to the user data\n  from a `copier.yml`.\n\n- **exclude** (list):<br> A list of names or gitignore-style patterns matching files or\n  folders that must not be copied.\n\n- **skip_if_exists** (list):<br> A list of names or gitignore-style patterns matching\n  files or folders, that are skipped if another with the same name already exists in the\n  destination folder. (It only makes sense if you are copying to a folder that already\n  exists).\n\n- **tasks** (list):<br> Optional lists of commands to run in order after finishing the\n  copy. Like in the templates files, you can use variables on the commands that will be\n  replaced by the real values before running the command. If one of the commands fails,\n  the rest of them will not run.\n\n- **envops** (dict):<br> Extra options for the Jinja template environment. See available\n  options in\n  [Jinja\'s docs](https://jinja.palletsprojects.com/en/2.10.x/api/#jinja2.Environment).\n\n  Copier uses these defaults that are different from Jinja\'s:\n\n  ```yml\n  # copier.yml\n  _envops:\n    block_start_string: "[%"\n    block_end_string: "%]"\n    comment_start_string: "[#"\n    comment_end_string: "#]"\n    variable_start_string: "[["\n    variable_end_string: "]]"\n    keep_trailing_newline: true\n  ```\n\n  You can use default Jinja syntax with:\n\n  ```yml\n  # copier.yml\n  _envops:\n    block_start_string: "{%"\n    block_end_string: "%}"\n    comment_start_string: "{#"\n    comment_end_string: "#}"\n    variable_start_string: "{{"\n    variable_end_string: "}}"\n    keep_trailing_newline: false\n  ```\n\n- **extra_paths** (list):<br> Additional paths, from where to search for templates. This\n  is intended to be used with shared parent templates, files with macros, etc. outside\n  the copied project skeleton.\n\n- **pretend** (bool):<br> Run but do not make any changes.\n\n- **force** (bool):<br> Overwrite files that already exist, without asking.\n\n- **skip** (bool):<br> Skip files that already exist, without asking.\n\n- **quiet** (bool):<br> Suppress the status output.\n\n- **cleanup_on_error** (bool):<br> Remove the destination folder if the copy process or\n  one of the tasks fails. True by default.\n\n## Comparison with other project generators\n\n### Cookiecutter\n\nCookiecutter and Copier are quite similar in functionality, except that:\n\n- Cookiecutter uses a subdirectory to generate the project, while Copier uses the root\n  directory.\n- Cookiecutter uses default Jinja templating characters: `{{`, `{%`, etc., while Copier\n  uses `[[`, `[%`, etc., and can be configured to change those.\n- Cookiecutter puts context variables in a namespace: `{{ cookiecutter.name }}`, while\n  Copier sets them directly: `[[ name ]]`.\n- You configure your template in `copier.yml` instead of `cookiecutter.json`.\n- Prompts are enhanced in Copier:\n  - Type-casting and verifications\n  - YAML native types + `json` and `yaml`\n  - Descriptions (help message for prompts)\n  - Conditional prompts (_soon_)\n- Copier has very useful features that are missing in Cookiecutter (or require extra\n  software), like the ability to **update a generated project** when the original\n  template changes, and to run **migrations** when updating.\n\n## Credits\n\nSpecial thanks go to [jpscaletti](https://github.com/jpscaletti) for originally creating\n`Copier`. This project would not be a thing without him.\n\nBig thanks also go to [Yajo](https://github.com/Yajo) for his relentless zest for\nimproving `Copier` even further.\n\nThanks a lot, [pawamoy](https://github.com/pawamoy) for polishing very important rough\nedges and improving the documentation and UX a lot.\n',
    'author': 'Ben Felder',
    'author_email': 'ben@felder.io',
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/pykong/copier',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.6,<4.0',
}


setup(**setup_kwargs)
