[PATCH v7 29/31] python: add .gitignore

John Snow posted 31 patches 4 years, 8 months ago
There is a newer version of this series
[PATCH v7 29/31] python: add .gitignore
Posted by John Snow 4 years, 8 months ago
Ignore *Python* build and package output (build, dist, qemu.egg-info);
these files are not created as part of a QEMU build. They are created by
running the commands 'python3 setup.py <sdist|bdist>' when preparing
tarballs to upload to e.g. PyPI.

Ignore miscellaneous cached python confetti (mypy, pylint, et al)

Ignore .idea (pycharm) .vscode, and .venv (pipenv et al).

Signed-off-by: John Snow <jsnow@redhat.com>
---
 python/.gitignore | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 python/.gitignore

diff --git a/python/.gitignore b/python/.gitignore
new file mode 100644
index 00000000000..4ed144ceac3
--- /dev/null
+++ b/python/.gitignore
@@ -0,0 +1,15 @@
+# linter/tooling cache
+.mypy_cache/
+.cache/
+
+# python packaging
+build/
+dist/
+qemu.egg-info/
+
+# editor config
+.idea/
+.vscode/
+
+# virtual environments (pipenv et al)
+.venv/
-- 
2.31.1


Re: [PATCH v7 29/31] python: add .gitignore
Posted by Vladimir Sementsov-Ogievskiy 4 years, 8 months ago
26.05.2021 03:24, John Snow wrote:
> Ignore *Python* build and package output (build, dist, qemu.egg-info);
> these files are not created as part of a QEMU build. They are created by
> running the commands 'python3 setup.py <sdist|bdist>' when preparing
> tarballs to upload to e.g. PyPI.
> 
> Ignore miscellaneous cached python confetti (mypy, pylint, et al)
> 
> Ignore .idea (pycharm) .vscode, and .venv (pipenv et al).
> 
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>   python/.gitignore | 15 +++++++++++++++
>   1 file changed, 15 insertions(+)
>   create mode 100644 python/.gitignore
> 
> diff --git a/python/.gitignore b/python/.gitignore
> new file mode 100644
> index 00000000000..4ed144ceac3
> --- /dev/null
> +++ b/python/.gitignore
> @@ -0,0 +1,15 @@
> +# linter/tooling cache
> +.mypy_cache/
> +.cache/
> +
> +# python packaging
> +build/
> +dist/
> +qemu.egg-info/
> +
> +# editor config
> +.idea/
> +.vscode/
> +
> +# virtual environments (pipenv et al)
> +.venv/
> 

after make venv, I also have untracked pyproject.toml. It probably should be ignored too.

With it or not:

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

-- 
Best regards,
Vladimir

Re: [PATCH v7 29/31] python: add .gitignore
Posted by John Snow 4 years, 8 months ago
On 5/26/21 5:18 AM, Vladimir Sementsov-Ogievskiy wrote:
> 26.05.2021 03:24, John Snow wrote:
>> Ignore *Python* build and package output (build, dist, qemu.egg-info);
>> these files are not created as part of a QEMU build. They are created by
>> running the commands 'python3 setup.py <sdist|bdist>' when preparing
>> tarballs to upload to e.g. PyPI.
>>
>> Ignore miscellaneous cached python confetti (mypy, pylint, et al)
>>
>> Ignore .idea (pycharm) .vscode, and .venv (pipenv et al).
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>>   python/.gitignore | 15 +++++++++++++++
>>   1 file changed, 15 insertions(+)
>>   create mode 100644 python/.gitignore
>>
>> diff --git a/python/.gitignore b/python/.gitignore
>> new file mode 100644
>> index 00000000000..4ed144ceac3
>> --- /dev/null
>> +++ b/python/.gitignore
>> @@ -0,0 +1,15 @@
>> +# linter/tooling cache
>> +.mypy_cache/
>> +.cache/
>> +
>> +# python packaging
>> +build/
>> +dist/
>> +qemu.egg-info/
>> +
>> +# editor config
>> +.idea/
>> +.vscode/
>> +
>> +# virtual environments (pipenv et al)
>> +.venv/
>>
> 
> after make venv, I also have untracked pyproject.toml. It probably 
> should be ignored too.
> 

Hm, I noticed that too ... I don't know which component in the python 
ecosystem is making it. I suspect there's some compatibility layer for 
setup.cfg that is trying to make one for itself.

I'll have to investigate this piece a little more.

> With it or not:
> 
> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> 

Thanks though :)


Re: [PATCH v7 29/31] python: add .gitignore
Posted by Cleber Rosa 4 years, 8 months ago
On Wed, May 26, 2021 at 12:18:55PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> 26.05.2021 03:24, John Snow wrote:
> > Ignore *Python* build and package output (build, dist, qemu.egg-info);
> > these files are not created as part of a QEMU build. They are created by
> > running the commands 'python3 setup.py <sdist|bdist>' when preparing
> > tarballs to upload to e.g. PyPI.
> > 
> > Ignore miscellaneous cached python confetti (mypy, pylint, et al)
> > 
> > Ignore .idea (pycharm) .vscode, and .venv (pipenv et al).
> > 
> > Signed-off-by: John Snow <jsnow@redhat.com>
> > ---
> >   python/.gitignore | 15 +++++++++++++++
> >   1 file changed, 15 insertions(+)
> >   create mode 100644 python/.gitignore

Reviewed-by: Cleber Rosa <crosa@redhat.com>