copier-org / copier

Library and command-line utility for rendering projects templates.
https://readthedocs.org/projects/copier/
MIT License
2.07k stars 183 forks source link

`pip install copier` fails on windows #889

Closed wilsonwaters closed 1 year ago

wilsonwaters commented 1 year ago

Describe the problem Running pip install copier with python 3.10 fails on Windows when the Microsoft C++ build tools package is not installed. I would prefer not install the heavy (7GB) c++ compiler installed just to use copier.

This seems to be caused by the iteration_utilities package lacking a python 3.10 wheel file in pypi and it doesn't look like they are planning to generate wheel files for python 3.10 any time soon.

To Reproduce

  1. Run pip install copier on Windows with python 3.10 and without visual c++ compiler installed

Logs

Running pip install copier

``` PS C:\Users\wilson> pip install copier Collecting copier Using cached copier-7.0.1-py3-none-any.whl (34 kB) Collecting iteration_utilities>=0.11.0 Using cached iteration_utilities-0.11.0.tar.gz (124 kB) Preparing metadata (setup.py) ... done Collecting pygments>=2.7.1 Downloading Pygments-2.13.0-py3-none-any.whl (1.1 MB) ---------------------------------------- 1.1/1.1 MB 6.3 MB/s eta 0:00:00 Requirement already satisfied: plumbum>=1.6.9 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier) (1.8.0) Collecting pyyaml-include>=1.2 Downloading pyyaml_include-1.3-py3-none-any.whl (20 kB) Collecting questionary>=1.8.1 Downloading questionary-1.10.0-py3-none-any.whl (31 kB) Collecting jinja2-ansible-filters>=1.3.1 Downloading jinja2_ansible_filters-1.3.2-py3-none-any.whl (18 kB) Requirement already satisfied: packaging>=21.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier) (21.3) Collecting jinja2>=3.1.1 Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB) ---------------------------------------- 133.1/133.1 kB 4.0 MB/s eta 0:00:00 Collecting pydantic>=1.10.2 Downloading pydantic-1.10.2-cp310-cp310-win_amd64.whl (2.1 MB) ---------------------------------------- 2.1/2.1 MB 6.3 MB/s eta 0:00:00 Collecting dunamai>=1.7.0 Downloading dunamai-1.15.0-py3-none-any.whl (23 kB) Collecting pyyaml>=5.3.1 Using cached PyYAML-6.0-cp310-cp310-win_amd64.whl (151 kB) Requirement already satisfied: colorama>=0.4.3 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier) (0.4.5) Requirement already satisfied: pathspec>=0.9.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier) (0.10.2) Collecting MarkupSafe>=2.0 Downloading MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl (17 kB) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from packaging>=21.0->copier) (3.0.9) Requirement already satisfied: pywin32 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from plumbum>=1.6.9->copier) (305) Requirement already satisfied: typing-extensions>=4.1.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from pydantic>=1.10.2->copier) (4.4.0) Collecting prompt_toolkit<4.0,>=2.0 Downloading prompt_toolkit-3.0.33-py3-none-any.whl (383 kB) ---------------------------------------- 383.6/383.6 kB 5.9 MB/s eta 0:00:00 Collecting wcwidth Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB) Building wheels for collected packages: iteration_utilities Building wheel for iteration_utilities (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [15 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_additional_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_classes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_convenience.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_utils.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\__init__.py -> build\lib.win-amd64-cpython-310\iteration_utilities running build_ext building 'iteration_utilities._iteration_utilities' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for iteration_utilities Running setup.py clean for iteration_utilities Failed to build iteration_utilities Installing collected packages: wcwidth, pyyaml, pygments, pydantic, prompt_toolkit, MarkupSafe, iteration_utilities, questionary, pyyaml-include, jinja2, dunamai, jinja2-ansible-filters, copier Running setup.py install for iteration_utilities ... error error: subprocess-exited-with-error × Running setup.py install for iteration_utilities did not run successfully. │ exit code: 1 ╰─> [17 lines of output] running install C:\Users\wilson\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_additional_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_classes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_convenience.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_utils.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\__init__.py -> build\lib.win-amd64-cpython-310\iteration_utilities running build_ext building 'iteration_utilities._iteration_utilities' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> iteration_utilities note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. [notice] A new release of pip available: 22.2.1 -> 22.3.1 [notice] To update, run: python.exe -m pip install --upgrade pip ```

Likewise when running poetry install as part of the copier contribution dev guidelines

``` PS D:\repositories\MakerX\copier> poetry config virtualenvs.in-project true --local PS D:\repositories\MakerX\copier> poetry install --with docs Creating virtualenv copier in D:\repositories\MakerX\copier\.venv Installing dependencies from lock file Package operations: 83 installs, 1 update, 0 removals • Installing six (1.16.0) • Installing colorama (0.4.6) • Installing markupsafe (2.1.1) • Installing pyparsing (3.0.9) • Installing python-dateutil (2.8.2) • Installing pyyaml (6.0) • Installing zipp (3.8.1) • Installing attrs (22.1.0) • Installing click (8.1.3) • Installing ghp-import (2.1.0) • Installing jinja2 (3.1.2) • Installing mergedeep (1.3.4) • Installing markdown (3.3.5) • Installing packaging (21.3) • Installing pluggy (1.0.0) • Installing importlib-metadata (4.2.0) • Installing pyyaml-env-tag (0.1) • Installing py (1.11.0) • Installing iniconfig (1.1.1) Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 • Installing tomli (2.0.1) • Installing watchdog (2.1.9) • Installing wcwidth (0.2.5) • Installing distlib (0.3.6) • Installing filelock (3.8.0) • Installing mkdocs (1.2.4) • Installing mccabe (0.7.0) • Installing griffe (0.22.1) • Installing pyflakes (2.5.0) • Installing pytest (7.1.3) • Installing pycodestyle (2.9.1) • Installing platformdirs (2.5.2) • Installing mkdocstrings (0.19.0) • Installing prompt-toolkit (3.0.31) • Updating setuptools (65.5.1 -> 65.3.0) Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 • Installing argcomplete (1.12.3) • Installing astor (0.8.1) • Installing cfgv (3.3.1) • Installing decli (0.5.2) • Installing coverage (6.4.4) • Installing mkdocs-autorefs (0.4.1) • Installing mkdocstrings-python (0.7.1) • Installing identify (2.5.5) • Installing execnet (1.9.0) • Installing charset-normalizer (2.1.1) • Installing flake8 (5.0.4) • Installing mkdocs-material-extensions (1.0.3) Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 • Installing mypy-extensions (0.4.3) • Installing nodeenv (1.7.0) • Installing pastel (0.2.1) • Installing pathspec (0.10.1) • Installing ptyprocess (0.7.0) • Installing pygments (2.13.0) • Installing pymdown-extensions (9.5) • Installing pytest-forked (1.4.0) • Installing pywin32 (304) • Installing questionary (1.10.0) • Installing termcolor (1.1.0) • Installing toml (0.10.2) • Installing tomlkit (0.11.4) • Installing typing-extensions (4.4.0) • Installing virtualenv (20.16.2) • Installing autoflake (1.6.1) • Installing black (22.8.0) • Installing flake8-bugbear (22.9.23) • Installing dunamai (1.14.1) • Installing commitizen (2.35.0) • Installing iteration-utilities (0.11.0) • Installing jinja2-ansible-filters (1.3.2) • Installing flake8-simplify (0.19.3) • Installing mkdocs-material (8.2.6) • Installing flake8-comprehensions (3.10.0) • Installing isort (5.10.1) • Installing flake8-debugger (4.1.2) Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 Connection pool is full, discarding connection: pypi.org. Connection pool size: 10 • Installing mypy (0.981) • Installing pexpect (4.8.0) • Installing plumbum (1.8.0) • Installing poethepoet (0.16.2) • Installing pre-commit (2.20.0) • Installing pydantic (1.10.2) • Installing pytest-cov (4.0.0) • Installing pytest-xdist (2.5.0) • Installing pyyaml-include (1.3) • Installing types-backports (0.1.3) • Installing types-pyyaml (6.0.12) CalledProcessError Command 'D:\repositories\MakerX\copier\.venv\Scripts\python.exe -m pip install --use-pep517 --disable-pip-version-check --prefix D:\repositories\MakerX\copier\.venv --no-deps C:\Users\wilson\AppData\Local\pypoetry\Cache\artifacts\13\fe\58\dd3a5413393eab8ca2c5b884ff40af30da952dbdc4598df1d7b6cf61b0\iteration_utilities-0.11.0.tar.gz' returned non-zero exit status 1. at ~\AppData\Local\Programs\Python\Python310\lib\subprocess.py:524 in run 520│ # We don't call process.wait() as .__exit__ does that for us. 521│ raise 522│ retcode = process.poll() 523│ if check and retcode: → 524│ raise CalledProcessError(retcode, process.args, 525│ output=stdout, stderr=stderr) 526│ return CompletedProcess(process.args, retcode, stdout, stderr) 527│ 528│ The following error occurred when trying to handle this error: EnvCommandError Command D:\repositories\MakerX\copier\.venv\Scripts\python.exe -m pip install --use-pep517 --disable-pip-version-check --prefix D:\repositories\MakerX\copier\.venv --no-deps C:\Users\wilson\AppData\Local\pypoetry\Cache\artifacts\13\fe\58\dd3a5413393eab8ca2c5b884ff40af30da952dbdc4598df1d7b6cf61b0\iteration_utilities-0.11.0.tar.gz errored with the following return code 1, and output: Processing c:\users\wilson\appdata\local\pypoetry\cache\artifacts\13\fe\58\dd3a5413393eab8ca2c5b884ff40af30da952dbdc4598df1d7b6cf61b0\iteration_utilities-0.11.0.tar.gz Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: iteration-utilities Building wheel for iteration-utilities (pyproject.toml): started Building wheel for iteration-utilities (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error Building wheel for iteration-utilities (pyproject.toml) did not run successfully. exit code: 1 [15 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_additional_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_classes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_convenience.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_recipes.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\_utils.py -> build\lib.win-amd64-cpython-310\iteration_utilities copying src\iteration_utilities\__init__.py -> build\lib.win-amd64-cpython-310\iteration_utilities running build_ext building 'iteration_utilities._iteration_utilities' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for iteration-utilities Failed to build iteration-utilities ERROR: Could not build wheels for iteration-utilities, which is required to install pyproject.toml-based projects at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\poetry\utils\env.py:1476 in _run 1472│ output = subprocess.check_output( 1473│ command, stderr=subprocess.STDOUT, env=env, **kwargs 1474│ ) 1475│ except CalledProcessError as e: → 1476│ raise EnvCommandError(e, input=input_) 1477│ 1478│ return decode(output) 1479│ 1480│ def execute(self, bin: str, *args: str, **kwargs: Any) -> int: The following error occurred when trying to handle this error: PoetryException Failed to install C:/Users/wilson/AppData/Local/pypoetry/Cache/artifacts/13/fe/58/dd3a5413393eab8ca2c5b884ff40af30da952dbdc4598df1d7b6cf61b0/iteration_utilities-0.11.0.tar.gz at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\poetry\utils\pip.py:51 in pip_install 47│ 48│ try: 49│ return environment.run_pip(*args) 50│ except EnvCommandError as e: → 51│ raise PoetryException(f"Failed to install {path.as_posix()}") from e 52│ Warning: The file chosen for install of markdown 3.3.5 (Markdown-3.3.5-py3-none-any.whl) is yanked. Reason for being yanked: Invalid dependency specified. Fixed in 3.3.6. ```

Expected behavior pip install copier should install copier without error

Environment

wilsonwaters commented 1 year ago

Result of pip install pip install git+https://github.com/wilsonwaters/copier@remove-iteration-utilities using #890

``` PS C:\Users\wilson> pip install git+https://github.com/wilsonwaters/copier@remove-iteration-utilities Collecting git+https://github.com/wilsonwaters/copier@remove-iteration-utilities Cloning https://github.com/wilsonwaters/copier (to revision remove-iteration-utilities) to c:\users\wilson\appdata\local\temp\pip-req-build-7odx6nug Running command git clone --filter=blob:none --quiet https://github.com/wilsonwaters/copier 'C:\Users\wilson\AppData\Local\Temp\pip-req-build-7odx6nug' Running command git checkout -b remove-iteration-utilities --track origin/remove-iteration-utilities branch 'remove-iteration-utilities' set up to track 'origin/remove-iteration-utilities'. Switched to a new branch 'remove-iteration-utilities' Resolved https://github.com/wilsonwaters/copier to commit bcbf8bb6d335f6cdab78ab091122f79a9a12e89b Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: pyyaml-include>=1.2 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (1.3) Requirement already satisfied: plumbum>=1.6.9 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (1.8.0) Requirement already satisfied: pathspec>=0.9.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (0.10.2) Collecting questionary>=1.8.1 Using cached questionary-1.10.0-py3-none-any.whl (31 kB) Collecting dunamai>=1.7.0 Using cached dunamai-1.15.0-py3-none-any.whl (23 kB) Requirement already satisfied: jinja2>=3.1.1 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (3.1.2) Collecting jinja2-ansible-filters>=1.3.1 Using cached jinja2_ansible_filters-1.3.2-py3-none-any.whl (18 kB) Requirement already satisfied: packaging>=21.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (21.3) Requirement already satisfied: pygments>=2.7.1 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (2.13.0) Requirement already satisfied: pydantic>=1.10.2 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (1.10.2) Requirement already satisfied: colorama>=0.4.3 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (0.4.5) Requirement already satisfied: pyyaml>=5.3.1 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from copier==0.0.0.post998.dev0+bcbf8bb) (6.0) Requirement already satisfied: MarkupSafe>=2.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from jinja2>=3.1.1->copier==0.0.0.post998.dev0+bcbf8bb) (2.1.1) Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from packaging>=21.0->copier==0.0.0.post998.dev0+bcbf8bb) (3.0.9) Requirement already satisfied: pywin32 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from plumbum>=1.6.9->copier==0.0.0.post998.dev0+bcbf8bb) (305) Requirement already satisfied: typing-extensions>=4.1.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from pydantic>=1.10.2->copier==0.0.0.post998.dev0+bcbf8bb) (4.4.0) Requirement already satisfied: prompt_toolkit<4.0,>=2.0 in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from questionary>=1.8.1->copier==0.0.0.post998.dev0+bcbf8bb) (3.0.33) Requirement already satisfied: wcwidth in c:\users\wilson\appdata\local\programs\python\python310\lib\site-packages (from prompt_toolkit<4.0,>=2.0->questionary>=1.8.1->copier==0.0.0.post998.dev0+bcbf8bb) (0.2.5) Building wheels for collected packages: copier Building wheel for copier (pyproject.toml) ... done Created wheel for copier: filename=copier-0.0.0.post998.dev0+bcbf8bb-py3-none-any.whl size=36607 sha256=a75e6d71dc3b2bef69e0281564dcfda19adf4b7375d74592f4c64c706d900572 Stored in directory: C:\Users\wilson\AppData\Local\Temp\pip-ephem-wheel-cache-25gx88lg\wheels\65\54\c4\6dd96628bae65f653a95d6873900342483c5ddb2919b777d2b Successfully built copier Installing collected packages: questionary, jinja2-ansible-filters, dunamai, copier Successfully installed copier-0.0.0.post998.dev0+bcbf8bb dunamai-1.15.0 jinja2-ansible-filters-1.3.2 questionary-1.10.0 [notice] A new release of pip available: 22.2.1 -> 22.3.1 [notice] To update, run: python.exe -m pip install --upgrade pip ```
pawamoy commented 1 year ago

iteration-utilities provides wheels for up to Python 3.9, but not 3.10/3.11 unfortunately. You could try to open an issue on their bugtracker to ask for 3.10/3.11 wheels. This way you'd just have to pre-install wheel in your venv before installing Copier, and pip would pick the precompiled wheel instead of building it.

wilsonwaters commented 1 year ago

Hi @pawamoy, thanks for the suggestion. I agree that asking the iteration-utilities team to build wheels for python 3.10 would be the best solution. However the existing issue on their bugtracker has been open for 6+ months so it seems it may not get resolved. I also note the project hasn't had any commits for 2+ years.

I thought it might be better to solve the issue by removing the dependency on iteration-utilities. Which is done in #890 .

yajo commented 1 year ago

Hello!

Ah I'm so sad you already opened the PR with tests and all that... 😣 I'm sorry for answering this late.

Sadly I can't accept #890. At least for this reason. It means adding more maintenance burden on copier, where we have a big scope already.

Besides, we can't just absorb every project that doesn't provide a wheel. Sooner or later you'll find one of those you need, and you'll have to add the dependencies needed to compile it.

So, the fix copier really needs is docs. Just explain how to install on windows. Or what to do if you encounter this error. That should settle the case now and potentially for any other windows + architecture + python version combination.

robdmoore commented 1 year ago

Hi @yajo,

I understand and agree with the general principle that you've outlined of minimising code, especially for functionality that's not part of the core of copier. Every bit of code you add of course has a cost. However, in this case I'd ask that you reconsider given:

  • The package in question is used by one line of code in copier, for use of a single function from a package that has 91 functions (i.e. we are using a trivial part of the library that is being taken as a dependency)
  • The function in question isn't terribly complex either and is replaced with a simple and elegant 8 line Python function
  • This new Python function is "done" - the function does one clear thing, does it well, shouldn't need to change, and also has full test coverage
  • The dependency itself (iteration_utilities) is clearly out of date (no commits for 2 years), and while if it was full of pure Python functions that were similarly "done" it wouldn't be an issue, but in this case the library is full of C code that needs either wheels to be maintained as new Python versions (which isn't happening) or a source build when you install, which slows down the install time of copier on all systems
  • On Windows the problem is significantly worse, given the C++ build tools are not on by default, even with standard developer setups it means that you need to download a 7GB install and reboot your computer, just to use copier
  • We have incorporated copier into a CLI tool that we have created to create an amazing dev experience for a particular technology ecosystem, that includes an init command with templating. Copier is frankly incredible for this use case, the functionality is top class and the experience we are able to provide is phenominal. Thank you!
    • Importantly, the goal of the tool we are building, which will be used by thousands of developers, is to make it really easy to quickly get up and running, regardless of what the setup is on your computer or your operating system. It's not feasible to ask people to install a 7GB install and reboot their machine just to use the CLI tool - they won't do it.

Given all of that, hopefully you can agree that in this instance, swapping out iteration_utilities is a no brainer option that will significantly improve the copier experience?

yajo commented 1 year ago

I've be thinking about this. Thanks for the detailed explanation, it helps me understand better the magnitude of the issue. 🙂

After some research, i think we can get to a solution good for everybody: using a different library which is pure python. See https://stackoverflow.com/a/55305409

What do you think? Wanna open the PR?

robdmoore commented 1 year ago

Definitely. Thanks for engaging with us on this :)

We'll get a pull request over early in the week.

wilsonwaters commented 1 year ago

Nice find @yajo. The funcy package should solve this without introducing additional code.

New PR opened with this change #898

wilsonwaters commented 1 year ago

Thanks @yajo.

Any thoughts on when the next release/PyPi package will be? I see there's plenty left in your soon milestone.

yajo commented 1 year ago

I don't have a specific plan, but there are some pending things I'd like to be in the next release. Usually you can install from master, but if you need wheels or stuff like that, I can push an alpha tag.

wilsonwaters commented 1 year ago

Pushing an alpha tagged release to pypi would be amazing if you don't mind @yajo. Thanks.

wilsonwaters commented 1 year ago

Hey @yajo. Thought I would check in and see if you're able to push an alpha tag release to pypi? Hopefully it's not a time consuming task for you! Thanks

yajo commented 1 year ago

Yep sorry, I was waiting to have some time to analyze what changelog is produced. I use commitizen for tags and it has https://github.com/commitizen-tools/commitizen/issues/364.

Well, it won't be the changelog I'd love to have, but it's something. When fixed upstream, we'll have a better one.

Summarizing, there you have: https://github.com/copier-org/copier/releases/tag/v7.1.0a0 (in some minutes there should be a wheel pushed on pypi)

fcollonval commented 1 year ago

Thanks @wilsonwaters to pointing out the discussion in the issue and that an alpha has been released. My question for the release is: do you have a rough estimation of the next final release that will include this feature? I don't want to put any pressure here; just some idea to know if I can move fast to a migration from cookiecutter to copier or not.

yajo commented 1 year ago

Sorry my friend, I don't have a schedule as this project is maintained in my free time. In the best case I need to fix https://github.com/copier-org/copier/issues/883 before the next release, or I'll have a lot of bug reports like that, which I don't want to have. 😆

I have a fix in the oven but I didn't have much free time last weeks.

In any case, IMHO you can proceed with the migration from cookiecutter. All you have to do is instruct your windows users to install Copier with pip install copier==7.1.0a0.

fcollonval commented 1 year ago

Thanks @yajo