claird / PyPDF4

A utility to read and write PDFs with Python
obsolete-https://pythonhosted.org/PyPDF2/
Other
328 stars 61 forks source link

Ignore the auto-generated `dist/` subdirectory #46

Closed kurtmckee closed 5 years ago

kurtmckee commented 5 years ago

Ignoring this file will make things easier when creating a source distribution file using the python setup.py sdist command.

Fixes #45

acsor commented 5 years ago

I haven't done any type of research on the subject matter, but what about using .gitignore in the negative? Its syntax provides an ! specifier that "reaccepts" a previously excluded file. So one can exclude them all first, and later specify a "white list" basically.

For more info, have man gitignore or similar.

kurtmckee commented 5 years ago

While it's possible to do, I don't recommend inverting the logic like that. Blacklisting auto-generated files and cache files is pretty universally standardized, and inverting that would break developer expectations.

It's so universally done, in fact, that Github maintains a very large repository of gitignore files that developers can freely use. The gitignore files are categorized by operating system, programming language, version control system, etc. Here's the Python one:

https://github.com/github/gitignore/blob/master/Python.gitignore

However, this was a one-line fix, so that's what I submitted. =)