I'm writing bash script that should archive some directory with python code.
I'd like to avoid archiving .pyc files, `__pycache__` directories, IPython notebooks and their checkpoints.
However, `__pycache__` subdirectories are archived anyway.

The script

```
#!/bin/bash

py_filelist='__main__.py pkg'
py_exclude='*.pyc *.ipynb \*__pycache__\* *ipynb_checkpoints*'  # <<-- Have tried many variants, nothing helps
archive_name=archive.zip

zip -rp $archive_name $py_filelist -x $py_exclude

```

On run, I'm getting the following output

```
$ bash -x script.sh

+ zip -rp archive.zip __main__.py pkg -x '*.pyc' '*.ipynb' '\*__pycache__\*' '*ipynb-checkpoints*'
adding: __main__.py (deflated 61%)
adding: pkg/ (stored 0%)
adding: pkg/file.py (deflated 62%)
adding: pkg/engine/ (stored 0%)
adding: pkg/engine/tools.py (deflated 73%)
...
adding: pkg/engine/templates/__pycache__/ (stored 0%)
...
adding: pkg/__pycache__/ (stored 0%)

```

So, only .pyc and .ipynb files have been excluded.

What is the correct way to specify exclusion pattern for `__pycache__` in script?